Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 private void _statesStopButton_Click(object sender, EventArgs e)
 {
     _deviceModel.StopSignal();
     _emotionsChartPresenter?.Dispose();
     _emotionsChartPresenter = null;
     _statesChart.Mode       = EmotionBarMode.Empty;
     _deviceModel.StartSignal();
 }
Exemplo n.º 3
0
        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);
            }
        }