void AddProtractorProperties(List <PropertyDescriptor> properties, string category) { UnitsAbbreviationDescriptor annUnitsDescriptor = new UnitsAbbreviationDescriptor((_object as AnnProtractorObject).AngularUnitsAbbreviation, "Angular Units Abbreviation"); foreach (PropertyDescriptor property in annUnitsDescriptor.GetProperties()) { properties.Add(property); } properties.Add(new CustomPropertyDescriptor(_type.GetProperty("AngularUnit"), _object, "Unit", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("Acute"), _object, "Acute", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("AnglePrecision"), _object, "Precision", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("ArcRadius"), _object, "Arc Radius", category)); if (_object.Id != NorbergObjectId) { AddLabelProperties(new LabelDescriptor(_object.Labels["FirstRulerLength"], "First Ruler Length Properties", _automation), properties, category); AddLabelProperties(new LabelDescriptor(_object.Labels["SecondRulerLength"], "Second Ruler Length Properties", _automation), properties, category); } AddLabelProperties(new LabelDescriptor(_object.Labels["AngleText"], "Angle Properties", _automation), properties, category); }
void AddRulerProperties(List <PropertyDescriptor> properties, string category) { properties.Add(new CustomPropertyDescriptor(_type.GetProperty("MeasurementUnit"), _object, "Unit", category)); UnitsAbbreviationDescriptor annUnitsDescriptor = new UnitsAbbreviationDescriptor((_object as AnnPolyRulerObject).UnitsAbbreviation, "Ruler Units Abbreviation"); foreach (PropertyDescriptor property in annUnitsDescriptor.GetProperties()) { properties.Add(property); } properties.Add(new CustomPropertyDescriptor(_type.GetProperty("GaugeLength"), _object, "GaugeLength", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("TickMarksLength"), _object, "TickMarksLength", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("Precision"), _object, "Precision", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("ShowGauge"), _object, "ShowGauge", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("ShowTickMarks"), _object, "ShowTickMarks", category)); properties.Add(new CustomPropertyDescriptor(_type.GetProperty("ShowTickValue"), _object, "ShowTickValue", category)); if (!(_object is AnnCrossProductObject) && !(_object is AnnProtractorObject)) { AddLabelProperties(new LabelDescriptor(_object.Labels["RulerLength"], "Ruler Length Properties", _automation), properties, category); } }