//There is only one CoordinateHolder object per runtime.
        public static coordinateRecorder getInstance(MovementWindow observee)
        {
            if (instance == null)
                instance = new coordinateRecorder();

            return instance;
        }
예제 #2
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
        }
예제 #3
0
        //There is only one CoordinateHolder object per runtime.
        public static coordinateRecorder getInstance(MovementWindow observee)
        {
            if (instance == null)
            {
                instance = new coordinateRecorder();
            }

            return(instance);
        }
예제 #4
0
        /*Creates self-paced movement stimuly window */
        private void SelfPacedMovement()
        {
            Action action = () =>
            {
                System.Windows.Media.Color color1 = (System.Windows.Media.Color)Subject1.SelectedColor;
                System.Windows.Media.Color color2 = (System.Windows.Media.Color)Subject2.SelectedColor;
                System.Windows.Media.Color color3 = (System.Windows.Media.Color)CourseColorPicker.SelectedColor;
                stimulyWindow = new MovementWindow(this, color1, color2, color3, (int)LineThicknessPicker.Value);
            };

            this.Dispatcher.Invoke(action);
        }
예제 #5
0
        /*Creates synchronous movement stimuly window */
        private void SyncMovement()
        {
            Action action = () =>
            {
                System.Windows.Media.Color color1 = (System.Windows.Media.Color)Subject1.SelectedColor;
                System.Windows.Media.Color color2 = (System.Windows.Media.Color)Subject2.SelectedColor;
                System.Windows.Media.Color color3 = (System.Windows.Media.Color)CourseColorPicker.SelectedColor;
                stimulyWindow = new MovementWindow(this, "Synchronous", (int)complexitySlider.Value, (int)SpeedSlider.Value, color1, color2, color3);
            };

            this.Dispatcher.Invoke(action);
        }
예제 #6
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++;
            }
        }
예제 #7
0
 /*Creates synchronous movement stimuly window */
 private void SyncMovement()
 {
     Action action = () =>
     {
         System.Windows.Media.Color color1 = (System.Windows.Media.Color)Subject1.SelectedColor;
         System.Windows.Media.Color color2 = (System.Windows.Media.Color)Subject2.SelectedColor;
         System.Windows.Media.Color color3 = (System.Windows.Media.Color)CourseColorPicker.SelectedColor;
         stimulyWindow = new MovementWindow(this, "Synchronous", (int)complexitySlider.Value, (int)SpeedSlider.Value, color1, color2, color3);
     };
     this.Dispatcher.Invoke(action);
 }
예제 #8
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++;
            }
        }
예제 #9
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
        }
예제 #10
0
 /*Creates self-paced movement stimuly window */
 private void SelfPacedMovement()
 {
     Action action = () =>
     {
         System.Windows.Media.Color color1 = (System.Windows.Media.Color)Subject1.SelectedColor;
         System.Windows.Media.Color color2 = (System.Windows.Media.Color)Subject2.SelectedColor;
         System.Windows.Media.Color color3 = (System.Windows.Media.Color)CourseColorPicker.SelectedColor;
         stimulyWindow = new MovementWindow(this, color1, color2, color3, (int)LineThicknessPicker.Value);
     };
     this.Dispatcher.Invoke(action);
 }