private void _emotionsStartButton_Click(object sender, System.EventArgs e) { if (_emotionsChartPresenter != null) { return; } try { var channel = _deviceModel.CreateEmotionChannel(); _emotionsChartPresenter = new EmotionsChartPresenter( _statesChart, channel, _deviceModel.AlphaLeftPowerChannel, _deviceModel.BetaLeftPowerChannel, _deviceModel.AlphaRightPowerChannel, _deviceModel.BetaRightPowerChannel, _deviceModel.IndexChannel ); SetDestination(); } catch (Exception exc) { Console.WriteLine(exc); } }
private void _statesStopButton_Click(object sender, EventArgs e) { _deviceModel.StopSignal(); _emotionsChartPresenter?.Dispose(); _emotionsChartPresenter = null; _statesChart.Mode = EmotionBarMode.Empty; _deviceModel.StartSignal(); }
private void _emotionsStartButton_Click(object sender, System.EventArgs e) { if (_emotionsChartPresenter != null) { return; } try { var channel = _deviceModel.CreateEmotionChannel(); _emotionsChartPresenter = new EmotionsChartPresenter(_statesChart, channel); _statesSettingsPresenter = new StatesSettingsPresenter(_emotionCoefficientsControl, channel); _emotionCoefficientsControl.Enabled = true; SetDestination(); } catch (Exception exc) { Console.WriteLine(exc); } }