示例#1
0
文件: Utils.cs 项目: mario007/renmas
 public static UserControl build_editor(PyWrapper.RenmasProperty property)
 {
     Type t = property.GetType();
     if (t == typeof(PyWrapper.IntProperty))
     {
         IntEditor ed = new IntEditor();
         ed.set_target((PyWrapper.IntProperty)property);
         return ed;
     }
     else if (t == typeof(PyWrapper.FloatProperty))
     {
         FloatEditor ed = new FloatEditor();
         ed.set_target((PyWrapper.FloatProperty)property);
         return ed;
     }
     else
     {
         //TODO -- better message
         string msg = "Unknown type";
         throw new Exception(msg);
     }
 }