ソースを参照

Added default editor for EditorType

Kenric Nugteren 8 ヶ月 前
コミット
2bf4e2ba7b
1 ファイル変更2 行追加5 行削除
  1. 2 5
      InABox.Core/Objects/Editors/Utils/EditorTypeUtils.cs

+ 2 - 5
InABox.Core/Objects/Editors/Utils/EditorTypeUtils.cs

@@ -18,21 +18,18 @@ namespace InABox.Core
 
             if (type == typeof(bool))
                 editor = new CheckBoxEditor();
-
             else if (type == typeof(DateTime))
                 editor = new DateTimeEditor();
-
             else if (type == typeof(string))
                 editor = new TextBoxEditor();
-
             else if (type.IsFloatingPoint())
                 editor = new DoubleEditor();
-
             else if (type.IsOrdinal())
                 editor = new IntegerEditor();
-
             else if (typeof(IPackable).IsAssignableFrom(type))
                 editor = new NullEditor();
+            else if(type.IsEnum)
+                editor = new EnumLookupEditor(type);
 
             return editor;
         }