예제 #1
0
        private Action buttonForReinicializeClickedObserver;       //calback pro stisknutí tačítka pro reinicializaci robota

        private MainWindow()
        {
            InitializeComponent();

            controllView      = ControllView.getInstance();
            controllView.Dock = DockStyle.Fill;

            absoluteControllView      = AbsoluteControllView.getInstance();
            absoluteControllView.Dock = DockStyle.Fill;

            diagnosticView      = DiagnosticView.getInstance();
            diagnosticView.Dock = DockStyle.Fill;

            recalibrView      = RecalibrView.getInstance();
            recalibrView.Dock = DockStyle.Fill;

            splitContainer1.Panel1.Controls.Add(controllView);
            splitContainer1.Panel2.Controls.Add(diagnosticView);
        }
예제 #2
0
        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();
        }