public void InitEnumTypeSelector(Type baseType, string enumTypeVar) { this.enumTypeFieldName = enumTypeVar; if (enumTypeSelector == null) { enumTypeSelector = new TypeSelector(baseType); } else { enumTypeSelector.SetBaseType(baseType); } string enumTypeName = obj.GetFieldValue <string>(enumTypeVar); enumTypeSelector.SetSelected(TypeEx.GetType(enumTypeName)); }