I am currently working with the .NET technology for joints and I find it a very convenient and efficient way to create steel joints. Many thanks to the development team! I also find the functionality of creating the user interface very good. But to create even more user-friendly dialogs, I'm missing a few functions.
In the SDK in the document "Joints NET.docx" I read that the functions are still limited, but there are plans to expand them according to user feedback.
So I would like to contribute and make the following suggestions:
On point 1: How should this be implemented from the user's point of view?
Let's start with the following constellation:
public class MyJoint : IRule
{
public int CreateHeadPlate { get; set; }
public double HeadPlateThickness { get; set; }
public void GetRulePages(IRuleUIBuilder builder)
{
//...
builder.AddCheckBox(1, "Create head plate", nameof(CreateHeadPlate));
builder.AddTextBox(1, "Head plate thickness", nameof(HeadPlateThickness), typeof(double));
}
}
Instead of adding even more parameters to IRuleUIBuilder's methods, I could imagine working with attributes:
public class MyJoint : IRule
{
public int CreateHeadPlate { get; set; }
public bool HeadPlateVisibility { get => CreateHeadPlate == 1; }
[RuleUIVisibility(nameof(HeadPlateVisibility))]
// OR
[RuleUIEnabled(nameof(HeadPlateVisibility))]
public double HeadPlateThickness { get; set; }
public void GetRulePages(IRuleUIBuilder builder)
{
//...
builder.AddCheckBox(1, "Create head plate", nameof(CreateHeadPlate));
builder.AddTextBox(1, "Head plate thickness", nameof(HeadPlateThickness), typeof(double));
}
}
On each change, the properties specified in the attributes are retrieved and depending on the return(Boolean) the control is hidden or disabled. In the case of the AddBoltSelector() I would use typePropertyName.
Can't find what you're looking for? Ask the community or share your knowledge.