Beispiel #1
0
        public Resources.IResourceUI CreateResourceUI(Resources.IResourceValue value)
        {
            IResourceUI ui = null;

            switch (value.MyType.Typename)
            {
            case "text":
                ui = new SNAP.ResourceFields.TextFieldControl();
                ui.LoadFromFieldValue(value);
                break;

            case "external_ref":
                ui = new SNAP.ResourceFields.ExternalRefFieldControl();
                ui.LoadFromFieldValue(value);
                break;

            case "internal_ref":
                ui = new SNAP.ResourceFields.InternalRefFieldControl();
                ui.LoadFromFieldValue(value);
                break;

            case "numeric":
                ui = new SNAP.ResourceFields.NumericFieldControl();
                ui.LoadFromFieldValue(value);
                break;

            case "enum":
                ui = new SNAP.ResourceFields.EnumFieldControl();
                ui.LoadFromFieldValue(value);
                break;
            }

            return(ui);
        }
Beispiel #2
0
 public static Resources.IResourceUI CreateResourceUI(Resources.IResourceValue value)
 {
     return(Implementation.CreateResourceUI(value));
 }