public MultiTypeOptions GetOptions() { var options = this; if (options == null) { options = new MultiTypeOptions(true); } if (options.MultiTypes == null) { options.MultiTypes = new List<MultiType>(); options.Limit = 0; } return options; }
public MultiTypeOptions GetOptions() { var options = this; if (options == null) { options = new MultiTypeOptions(true); } if (options.MultiTypes == null) { options.MultiTypes = new List <MultiType>(); options.Limit = 0; } return(options); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); MultiTypeOptions options = this.GetPreValueOptions<MultiTypeOptions>(); if (options == null) { options = new MultiTypeOptions(true); } _options = options.GetOptions(); multiTypePrevalueEditorControl = (MultiTypePrevalueEditorControl)Page.LoadControl("~/umbraco/plugins/MultiType4Ben/MultiTypePrevalueEditorControl.ascx"); multiTypePrevalueEditorControl.Limit = _options.Limit; multiTypePrevalueEditorControl.MacroId = _options.MacroId; multiTypePrevalueEditorControl.MultiTypes = _options.MultiTypes; multiTypePrevalueEditorControl.DeletedMultiType += new MultiTypePrevalueEditorControl.DeleteMultiType(multiTypePrevalueEditorControl_DeletedMultiType); this.Controls.Add(multiTypePrevalueEditorControl); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); MultiTypeOptions options = this.GetPreValueOptions <MultiTypeOptions>(); if (options == null) { options = new MultiTypeOptions(true); } _options = options.GetOptions(); multiTypePrevalueEditorControl = (MultiTypePrevalueEditorControl)Page.LoadControl("~/umbraco/plugins/MultiType4Ben/MultiTypePrevalueEditorControl.ascx"); multiTypePrevalueEditorControl.Limit = _options.Limit; multiTypePrevalueEditorControl.MacroId = _options.MacroId; multiTypePrevalueEditorControl.MultiTypes = _options.MultiTypes; multiTypePrevalueEditorControl.DeletedMultiType += new MultiTypePrevalueEditorControl.DeleteMultiType(multiTypePrevalueEditorControl_DeletedMultiType); this.Controls.Add(multiTypePrevalueEditorControl); }
public MultiTypeDataEditor(umbraco.interfaces.IData data, MultiTypeOptions options) { _data = data; _options = options.GetOptions(); }