void control_PatchingUpdated(object sender, EventArgs e) { if (_currentElementControl != null) { _currentElementControl.UpdatePatching(); } if (_currentControllersControl != null) { _currentControllersControl.UpdatePatching(); } }
private void activateElementControl(ISetupElementsControl control) { if (_currentElementControl != null) { _currentElementControl.ElementSelectionChanged -= control_ElementSelectionChanged; _currentElementControl.ElementsChanged -= control_ElementsChanged; } _currentElementControl = control; control.ElementSelectionChanged += control_ElementSelectionChanged; control.ElementsChanged += control_ElementsChanged; tableLayoutPanelElementSetup.Controls.Clear(); tableLayoutPanelElementSetup.Controls.Add(control.SetupElementsControl); control.UpdatePatching(); }