Пример #1
0
        public static bool DisplayTypeSelected(IDisplayType currentDisplayType, string name)
        {
            var displaytype     = DisplayType.DisplayType.GetReferenceByName(name);
            var displaytypeType = displaytype.GetType();

            return(currentDisplayType.GetType().Equals(displaytypeType));
        }
Пример #2
0
        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);
        }