/// <summary> /// Binds the specified resource to this control. This effectively initializes /// all the fields in this control and sets up databinding on all fields. All /// subclasses *must* override this method. /// /// Also note that this method may be called more than once (e.g. Returning from /// and XML edit of this resource). Thus subclasses must take this scenario into /// account when implementing /// </summary> /// <param name="service">The editor service</param> protected override void Bind(Maestro.Editors.IEditorService service) { panelBody.Controls.Clear(); var webLayoutEditorCtrl = new WebLayoutEditorCtrl(); webLayoutEditorCtrl.Dock = DockStyle.Fill; panelBody.Controls.Add(webLayoutEditorCtrl); webLayoutEditorCtrl.Bind(service); }
/// <summary> /// Binds the specified resource to this control. This effectively initializes /// all the fields in this control and sets up databinding on all fields. All /// subclasses *must* override this method. /// /// Also note that this method may be called more than once (e.g. Returning from /// and XML edit of this resource). Thus subclasses must take this scenario into /// account when implementing /// </summary> /// <param name="service">The editor service</param> protected override void Bind(Maestro.Editors.IEditorService service) { panelBody.Controls.Clear(); var ssym = service.GetEditedResource() as ISimpleSymbolDefinition; var csym = service.GetEditedResource() as ICompoundSymbolDefinition; if (ssym != null) { var ssymCtrl = new SimpleSymbolDefinitionEditorCtrl(); ssymCtrl.Dock = DockStyle.Fill; panelBody.Controls.Add(ssymCtrl); ssymCtrl.Bind(service); } else if (csym != null) { var csymCtrl = new CompoundSymbolDefinitionEditorCtrl(); csymCtrl.Dock = DockStyle.Fill; panelBody.Controls.Add(csymCtrl); csymCtrl.Bind(service); } }
/// <summary> /// Binds the specified resource to this control. This effectively initializes /// all the fields in this control and sets up databinding on all fields. All /// subclasses *must* override this method. /// /// Also note that this method may be called more than once (e.g. Returning from /// and XML edit of this resource). Thus subclasses must take this scenario into /// account when implementing /// </summary> /// <param name="service">The editor service</param> protected override void Bind(Maestro.Editors.IEditorService service) { panelBody.Controls.Clear(); var lp = (ILoadProcedure)service.GetEditedResource(); //DWG and Raster load procedures cannot be edited with this editor so load placeholder if (lp.SubType.Type == LoadType.Dwg || lp.SubType.Type == LoadType.Raster) { var ctrl = new UnsupportedEditorControl(); ctrl.Dock = DockStyle.Fill; panelBody.Controls.Add(ctrl); } else { var lpEditor = new LoadProcedureEditorCtrl(); lpEditor.Dock = DockStyle.Fill; panelBody.Controls.Add(lpEditor); lpEditor.Bind(service); } }