VixenApplication.DisplaySetup.activatePatchingControl C# (CSharp) Метод

activatePatchingControl() приватный Метод

private activatePatchingControl ( ISetupPatchingControl control ) : void
control ISetupPatchingControl
Результат void
        private void activatePatchingControl(ISetupPatchingControl control)
        {
            if (_currentPatchingControl != null) {
                _currentPatchingControl.FiltersAdded-=  control_FiltersAdded;
                _currentPatchingControl.PatchingUpdated -= control_PatchingUpdated;
            }

            _currentPatchingControl = control;

            control.FiltersAdded += control_FiltersAdded;
            control.PatchingUpdated += control_PatchingUpdated;

            tableLayoutPanelPatchingSetup.Controls.Clear();
            tableLayoutPanelPatchingSetup.Controls.Add(control.SetupPatchingControl);

            if (_currentControllersControl == null) {
                control.UpdateControllerSelection(new ControllersAndOutputsSet());
            } else {
                control.UpdateControllerSelection(_currentControllersControl.SelectedControllersAndOutputs);
            }
            if (_currentElementControl == null) {
                control.UpdateElementSelection(Enumerable.Empty<Vixen.Sys.ElementNode>());
            } else {
                control.UpdateElementSelection(_currentElementControl.SelectedElements);
            }
        }