예제 #1
0
 public override Control GetEditor(object value, string propertyName, PackageBody body, PropertyChangedDelegate onChange, PropertyActivatedDelegate onActivate)
 {
     Control control;
     if (AllowTemplates)
     {
         control = new Editors.CheckBoxTemplateEditor(Name, value, propertyName, onChange, onActivate);
     }
     else
     {
         var boolValue = false;
         if (value is bool)
         {
             boolValue = (bool)value;
         }
         control = new Editors.CheckBoxEditor(Name, boolValue, propertyName, onChange, onActivate);
     }
     return control;
 }
예제 #2
0
        public override Control GetEditor(object value, string propertyName, PackageBody body, PropertyChangedDelegate onChange, PropertyActivatedDelegate onActivate)
        {
            Control control;

            if (AllowTemplates)
            {
                control = new Editors.CheckBoxTemplateEditor(Name, value, propertyName, onChange, onActivate);
            }
            else
            {
                var boolValue = false;
                if (value is bool)
                {
                    boolValue = (bool)value;
                }
                control = new Editors.CheckBoxEditor(Name, boolValue, propertyName, onChange, onActivate);
            }
            return(control);
        }