/// <summary> /// Serialize /// </summary> /// <returns></returns> public void Serialize( XmlTextWriter tw) { tw.WriteStartElement("Aggregation"); tw.WriteAttributeString("Role", Role.ToString()); if (SummaryType != Model.SummaryType) { tw.WriteAttributeString("SummaryType", SummaryType.ToString()); } if (GroupingType != Model.GroupingType) { tw.WriteAttributeString("GroupingType", GroupingType.ToString()); } if (NumericIntervalSize != Model.NumericIntervalSize) { tw.WriteAttributeString("NumericIntervalSize", NumericIntervalSize.ToString()); } tw.WriteEndElement(); return; }
public static AggregationTypeDetail AddGroupingTypeItem( GroupingTypeEnum groupingType, string label, GroupingMethodDelegate groupingDelegate = null, string format = "", Bitmaps16x16Enum image = Bitmaps16x16Enum.None) { AggregationTypeDetail item = new AggregationTypeDetail(); item.Role = AggregationRole.RowGrouping; item.GroupingType = groupingType; item.TypeName = groupingType.ToString(); item.GroupingMethod = groupingDelegate; AddAggTypeDetailItem(item, label, format, image); return(item); }
public static dynamic GetTSObject(GroupingTypeEnum dynEnum) { var tsType = TSActivator.CreateInstance("Tekla.Structures.Model.RebarPropertyModifier.GroupingTypeEnum").GetType(); switch (dynEnum) { case GroupingTypeEnum.AUTOMATIC: return(System.Enum.Parse(tsType, "AUTOMATIC")); case GroupingTypeEnum.MANUAL: return(System.Enum.Parse(tsType, "MANUAL")); case GroupingTypeEnum.NO_GROUPING: return(System.Enum.Parse(tsType, "NO_GROUPING")); default: throw new DynamicAPIException(dynEnum.ToString() + "- enum value is not implemented"); } }