Ejemplo n.º 1
0
        /*Creates synchronous reading stimuly window */
        private void SyncReading()
        {
            Action action = () =>
            {
                System.Windows.Media.Color color1 = (System.Windows.Media.Color)Color1.SelectedColor;
                prompter = new ReadingWIndow((int)TextSizeSlider.Value, pathTxt.Text, (int)SyncTraversalSpeed_Slider.Value, color1);

            };
            this.Dispatcher.Invoke(action);
        }
Ejemplo n.º 2
0
        private void Sequence_Timer_TickEvent(object sender, ElapsedEventArgs args)
        {
            #region CloseWindows
            if (stimulyWindow != null)
            {
                Action close_stimulyWindow_action = () =>
                {
                    stimulyWindow.Close();
                };
                this.Dispatcher.Invoke(close_stimulyWindow_action);
                stimulyWindow = null;
            }

            if (prompter != null)
            {
                Action close_prompter_action = () =>
                {
                    prompter.Close();
                };
                this.Dispatcher.Invoke(close_prompter_action);
                prompter = null;
            }
            #endregion
            if (_window == 2)
            {
                _window = 0;
                ((Timer)sender).Dispose();
            }
            else
            {
                var t = (System.Timers.Timer)sender;
                if (t.Interval <= 1000)
                {
                    Action action = () =>
                    {
                        t.Interval = 1000 * 60 * ((int)Sequence_Duration_Slider.Value + 1);
                    };
                    this.Dispatcher.Invoke(action);
                }
                Mode++;
            }
        }
Ejemplo n.º 3
0
 /*Creates self-paced reading stimuly window */
 private void SelfPacedReading()
 {
     Action action = () =>
     {
         prompter = new ReadingWIndow((int)TextSizeSlider.Value, pathTxt.Text, (int)prompterSpeed.Value);
     };
     this.Dispatcher.Invoke(action);
 }
Ejemplo n.º 4
0
        private void Sequence_Stop_Click(object sender, RoutedEventArgs e)
        {
            StopFullRecording();
            #region CloseWindows
            if (stimulyWindow != null)
            {
                Action close_stimulyWindow_action = () =>
                {
                    stimulyWindow.Close();
                };
                this.Dispatcher.Invoke(close_stimulyWindow_action);
                stimulyWindow = null;
            }

            if (prompter != null)
            {
                Action close_prompter_action = () =>
                {
                    prompter.Close();
                };
                this.Dispatcher.Invoke(close_prompter_action);
                prompter = null;
            }
            #endregion
        }
Ejemplo n.º 5
0
        /*Creates asynchronous reading stimuly window */
        private void AsyncReading()
        {
            Action action = () =>
            {
                System.Windows.Media.Color color1 = (System.Windows.Media.Color)Color1.SelectedColor;
                System.Windows.Media.Color color2 = (System.Windows.Media.Color)Color2.SelectedColor;
                System.Windows.Media.Color color3 = (System.Windows.Media.Color)Color3.SelectedColor;
                prompter = new ReadingWIndow((int)TextSizeSlider.Value, pathTxt.Text, (int)AsyncTraversalSpeed_Slider.Value, (int)Turn_duration_Slider.Value, (int)Switch_Frequency_Slider.Value, color1, color2, color3);
            };

            this.Dispatcher.Invoke(action);
        }