public override Control Create(IExecutionContext context) { bool absoluteInitialValue = context.GetBoolFrom(Value); _control = new Editors.CheckBoxEditor(Caption, absoluteInitialValue, null, null, null); return(_control); }
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; }
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); }