private System.Timers.Timer gamePadChecker; // kontrololor připojeného externího ovladače /// <param name="mainWindow">hlavní okno aplikace</param> public Controller(MainWindow mainWindow) { this.mainWindow = mainWindow; controllView = ControllView.getInstance(); absoluteControllView = AbsoluteControllView.getInstance(); diagnosticView = DiagnosticView.getInstance(); mainWindow.subscribeWindowShownObserver(inicialize); mainWindow.subscribeWindowCloseObserver(closeApplication); mainWindow.subscribeButtonForRecalibrClickObserver(buttonForRecalibrClicked); mainWindow.subscribeButtonForConnectionSettingsClickObserver(buttonForConnectionSettingsClicked); mainWindow.subscribeButtonForReinicializeClickObserver(buttonForReinicializeClicked); controllView.subscribeAbsolutePositioningObserver(buttonForChangeControllModePressed); absoluteControllView.subscribeJoystickPositioningObserver(buttonForChangeControllModePressed); absoluteControllView.subscribeButtonForAbsoluteMoveClickObserver(buttonForAbsoluteMoveClicked); absoluteControllView.subscribeButtonForSetDefaultPositionClickObserver(buttonForSetDefaultStateClicked); absoluteControllView.subscribeButtonForCalibrClickObserver(buttonForCalibrClicked); absoluteControllView.subscribeButtonForCancelCalibrationClickObserver(buttonForCancelCalibrationClicked); absoluteControllView.subscribecheckBoxLimitProtectionObserver(checkBoxLimitProtectionChanged); MotorsSettings.getInstance().subscribeMotorsSetingsChanged(refreshMotorsParameters); createGamePadChecker(); }
private void menuItemMotorsSettings_Click(object sender, EventArgs e) { MotorsSettings.getInstance().ShowDialog(); }