public DialogSectionControl(DialogSectionControl parent, PropertyDescriptorCollection descriptors, PropertyDescriptor parentDesc, bool drawBox) { nested = true; this.descriptors = descriptors; this.drawBox = drawBox; this.title = parentDesc.DisplayName; _registeredProxies.Add(new DescriptorProxy(descriptors)); bindingSource = _registeredProxies; this.parent = parent; parent.StatusChanged += view_StatusChanged; itemFactory = new ItemFactory(this); InitializeComponent(); // if (clientControl != null) { // clientControl.Dock = DockStyle.Fill; // } // // if (enclosure != null) { // enclosure.Dock = DockStyle.Fill; // } // this.PerformLayout(); }
public DialogSectionControl(DialogEditorControl parent, PropertyDescriptorCollection descriptors, bool drawBox, string title) { this.descriptors = descriptors; this.drawBox = drawBox; this.title = title; RegisterView(parent.View); bindingSource = _registeredViews; this.parent = parent; parent.StatusChanged += view_StatusChanged; itemFactory = new ItemFactory(this); InitializeComponent(); ConfigureFirstColumnWidth(); SetChildWidth(minWidth); // if(clientControl != null) { // clientControl.Dock = DockStyle.Fill; // } // // if(enclosure != null) { // enclosure.Dock = DockStyle.Fill; // } // this.PerformLayout(); }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } foreach (Control control in inputControls) { control.DataBindings.Clear(); } parent.StatusChanged -= view_StatusChanged; parent = null; propertyControlMapping.Clear(); if (_registeredViews.Count > 0) { _registeredViews.Clear(); } if (_registeredProxies.Count > 0) { _registeredProxies.Clear(); } // bindingSource.Clear(); base.Dispose(disposing); }