public static bool DisplayTypeSelected(IDisplayType currentDisplayType, string name) { var displaytype = DisplayType.DisplayType.GetReferenceByName(name); var displaytypeType = displaytype.GetType(); return(currentDisplayType.GetType().Equals(displaytypeType)); }
public static string GetPropertyName(IDisplayType displayType) { var name = displayType.GetType().Name; var fields = typeof(DisplayType).GetFields(BindingFlags.Static | BindingFlags.Public); return(fields.Single(x => ("DisplayType" + x.Name) == name).Name); }