Exemple #1
0
        void control_ElementsChanged(object sender, EventArgs e)
        {
            if (_currentPatchingControl != null)
            {
                _currentPatchingControl.UpdateElementDetails(_currentElementControl.SelectedElements);
            }

            // TODO: this is iffy, should really redo the events for this system
            if (_currentControllersControl != null)
            {
                _currentControllersControl.UpdatePatching();
            }
        }
Exemple #2
0
        void control_PatchingUpdated(object sender, EventArgs e)
        {
            if (_currentElementControl != null)
            {
                _currentElementControl.UpdatePatching();
            }

            if (_currentControllersControl != null)
            {
                _currentControllersControl.UpdatePatching();
            }
        }
Exemple #3
0
        void control_ElementsChanged(object sender, ElementsChangedEventArgs e)
        {
            if (_currentPatchingControl != null)
            {
                _currentPatchingControl.UpdateElementDetails(_currentElementControl.SelectedElements);
            }

            if (e.Action == ElementsChangedEventArgs.ElementsChangedAction.Remove ||
                e.Action == ElementsChangedEventArgs.ElementsChangedAction.Edit)
            {
                // TODO: this is iffy, should really redo the events for this system
                // TODO: The above should help a little with the iffiness of this, but I still question the brute force nature of this
                _currentControllersControl?.UpdatePatching();
            }
        }
Exemple #4
0
        private void activateControllersControl(ISetupControllersControl control)
        {
            if (_currentControllersControl != null) {
                _currentControllersControl.ControllerSelectionChanged -=  control_ControllerSelectionChanged;
                _currentControllersControl.ControllersChanged -= control_ControllersChanged;
            }

            _currentControllersControl = control;

            control.ControllerSelectionChanged += control_ControllerSelectionChanged;
            control.ControllersChanged += control_ControllersChanged;

            tableLayoutPanelControllerSetup.Controls.Clear();
            tableLayoutPanelControllerSetup.Controls.Add(control.SetupControllersControl);

            control.UpdatePatching();
        }
Exemple #5
0
        private void activateControllersControl(ISetupControllersControl control)
        {
            if (_currentControllersControl != null)
            {
                _currentControllersControl.ControllerSelectionChanged -= control_ControllerSelectionChanged;
                _currentControllersControl.ControllersChanged         -= control_ControllersChanged;
            }

            _currentControllersControl = control;

            control.ControllerSelectionChanged += control_ControllerSelectionChanged;
            control.ControllersChanged         += control_ControllersChanged;

            tableLayoutPanelControllerSetup.Controls.Clear();
            tableLayoutPanelControllerSetup.Controls.Add(control.SetupControllersControl);

            control.UpdatePatching();
        }