public PropertyTemplate(PropertyTemplate ptSrc) : this() { if (ptSrc != null) { ID = ptSrc.ID; Name = ptSrc.Name; Description = ptSrc.Description; Group = ptSrc.Group; PropertyTypes = ptSrc.PropertyTypes; IsDefault = ptSrc.IsDefault; } }
public int CompareTo(object obj) { TemplateCollection tc = obj as TemplateCollection; // Automatic is always first - so if either this or the other is automatic, sort by ordinal value; otherwise, sort by name if (Group == PropertyTemplateGroup.Automatic || tc.Group == PropertyTemplateGroup.Automatic) { return(((int)Group).CompareTo((int)tc.Group)); } else { return(PropertyTemplate.NameForGroup(Group).CompareCurrentCultureIgnoreCase(PropertyTemplate.NameForGroup(tc.Group))); } }
public PropertyTemplateEventArgs(PropertyTemplate pt) : base() { Template = pt; TemplateID = pt == null ? (int)KnownTemplateIDs.ID_NEW : pt.ID; }