Пример #1
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the SMITracker class.
    /// </summary>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the SMI device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the SMI device.</param>
    /// <param name="trackerCalibrateButton">The <see cref="Button"/>
    /// named "Calibrate" at the tab page of the SMI device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the SMI device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the SMI device.</param>
    /// <param name="trackerSettingsFile">The file with full path to the settings
    /// xml file of the tracking device.</param>
    /// <param name="smiClient">The specialized smi client.</param>
    public SMITracker(
      RecordModule owningRecordModule,
      Button trackerConnectButton,
      Button trackerSubjectButton,
      Button trackerCalibrateButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox,
      string trackerSettingsFile,
      ISMIClient smiClient)
      : base(
      owningRecordModule,
      trackerConnectButton,
      trackerSubjectButton,
      trackerCalibrateButton,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      trackerSettingsFile)
    {
      // Setup client
      this.smiClient = smiClient;

      // Call the initialize methods of derived classes
      this.Initialize();
      this.owningRecordModule = owningRecordModule;
    }
Пример #2
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the SMITracker class.
        /// </summary>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the SMI device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the SMI device.</param>
        /// <param name="trackerCalibrateButton">The <see cref="Button"/>
        /// named "Calibrate" at the tab page of the SMI device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the SMI device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the SMI device.</param>
        /// <param name="trackerSettingsFile">The file with full path to the settings
        /// xml file of the tracking device.</param>
        /// <param name="smiClient">The specialized smi client.</param>
        public SMITracker(
            RecordModule owningRecordModule,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox,
            string trackerSettingsFile,
            ISMIClient smiClient)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                trackerCalibrateButton,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                trackerSettingsFile)
        {
            // Setup client
            this.smiClient = smiClient;

            // Call the initialize methods of derived classes
            this.Initialize();
            this.owningRecordModule = owningRecordModule;
        }
Пример #3
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the TrackerWithStatusControls class.
        /// </summary>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerTrackerControlsContainer">The <see cref="SplitContainer"/>
        /// control which contains two <see cref="SplitContainer"/>s with
        /// track status and calibration plot controls and buttons.</param>
        /// <param name="trackerTrackStatusPanel">The <see cref="Panel"/>
        /// which should contain the track status object.</param>
        /// <param name="trackerCalibrationResultPanel">The <see cref="Panel"/>
        /// which should contain the calibration result object.</param>
        /// <param name="trackerShowOnPresentationScreenButton">The <see cref="Button"/>
        /// named "ShowOnPresentationScreenButton" at the tab page of the tracking device.</param>
        /// <param name="trackerAcceptButton">The <see cref="Button"/>
        /// named "Accept" at the tab page of the tracking device.</param>
        /// <param name="trackerRecalibrateButton">The <see cref="Button"/>
        /// named "Recalibrate" at the tab page of the tracking device.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the tracking device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the tracking device.</param>
        /// <param name="trackerCalibrateButton">The <see cref="Button"/>
        /// named "Calibrate" at the tab page of the tracking device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the tracking device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the tracking device.</param>
        /// <param name="trackerSettingsFile">The file with full path to the settings
        /// xml file of the tracking device.</param>
        protected TrackerWithStatusControls(
            RecordModule owningRecordModule,
            SplitContainer trackerTrackerControlsContainer,
            Panel trackerTrackStatusPanel,
            Panel trackerCalibrationResultPanel,
            Button trackerShowOnPresentationScreenButton,
            Button trackerAcceptButton,
            Button trackerRecalibrateButton,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox,
            string trackerSettingsFile)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                trackerCalibrateButton,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                trackerSettingsFile)
        {
            this.trackerControlsContainer       = trackerTrackerControlsContainer;
            this.trackStatusPanel               = trackerTrackStatusPanel;
            this.calibrationResultPanel         = trackerCalibrationResultPanel;
            this.showOnPresentationScreenButton = trackerShowOnPresentationScreenButton;
            this.acceptButton      = trackerAcceptButton;
            this.recalibrateButton = trackerRecalibrateButton;

            this.showOnPresentationScreenButton.Click += this.BtnShowOnPresentationScreenClick;
            this.recalibrateButton.Click += this.BtnRecalibrateClick;
            this.acceptButton.Click      += this.BtnAcceptCalibrationClick;
        }
Пример #4
0
        /// <summary>
        /// Initializes a new instance of the HaythamTracker class.
        ///   <remarks>
        /// Note that the xml settings file is set, but not used,
        ///     Haytham internally saves it state in another location.
        ///   </remarks>
        /// </summary>
        /// <param name="owningRecordModule">
        /// The <see cref="RecordModule"/> form wich host the recorder.
        /// </param>
        /// <param name="trackerTrackerControlsContainer">
        /// The split container owning the info textbox and the track status
        /// </param>
        /// <param name="trackerTrackStatusControl">
        /// The <see cref="TrackStatusControl"/> that displays information about the
        ///   current track status.
        /// </param>
        /// <param name="trackerStatusTextBox">
        /// The <see cref="TextBox"/> to retreive status messages of the tracker.
        /// </param>
        /// <param name="trackerLaunchButton">
        /// The <see cref="Button"/> named "Launch" at the tab page of the device.
        /// </param>
        /// <param name="trackerConnectButton">
        /// The <see cref="Button"/> named "Connect" at the tab page of the device.
        /// </param>
        /// <param name="trackerSubjectButton">
        /// The <see cref="Button"/> named "Subject" at the tab page of the device.
        /// </param>
        /// <param name="trackerRecordButton">
        /// The <see cref="Button"/> named "Record" at the tab page of the device.
        /// </param>
        /// <param name="trackerSubjectNameTextBox">
        /// The <see cref="TextBox"/> which should contain the subject name at the tab
        ///   page of the device.
        /// </param>
        public HaythamTracker(
            RecordModule owningRecordModule,
            SplitContainer trackerTrackerControlsContainer,
            TrackStatusControl trackerTrackStatusControl,
            TextBox trackerStatusTextBox,
            Button trackerLaunchButton,
            Button trackerConnectButton,
            //Button trackerCalibrateButton,
            Button trackerSubjectButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                //trackerCalibrateButton,
                null,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                Properties.Settings.Default.EyeTrackerSettingsPath + "HaythamSetting.xml")
        {
            this.statusTextBox = trackerStatusTextBox;
            this.trackControlsSplitContainer = trackerTrackerControlsContainer;
            this.trackStatusControl          = trackerTrackStatusControl;
            this.launchButton = trackerLaunchButton;

            // Call the initialize methods of derived classes
            this.Initialize();
        }
Пример #5
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the GazetrackerDirectClientTracker class.
        /// <remarks>
        /// Note that the xml settings file is set, but not used,
        /// GazeTracker internally saves it state in another location.
        /// </remarks>
        /// </summary>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerEyeVideoControl">The <see cref="EyeVideoControl"/>
        /// which displays the eye video of the gazetracker.</param>
        /// <param name="trackerShowOnSecondaryScreenButton">The <see cref="Button"/>
        /// named "ShowOnPresentationScreenButton" at the tab page of the Tobii device.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the device.</param>
        /// <param name="trackerAdjustButton">The <see cref="Button"/>
        /// named "Adjust" at the tab page of the device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the device.</param>
        /// <param name="trackerCalibrateButton">The <see cref="Button"/>
        /// named "Calibrate" at the tab page of the device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the device.</param>
        public GazetrackerDirectClientTracker(
            RecordModule owningRecordModule,
            EyeVideoControl trackerEyeVideoControl,
            Button trackerShowOnSecondaryScreenButton,
            Button trackerConnectButton,
            Button trackerAdjustButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                trackerCalibrateButton,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                Properties.Settings.Default.EyeTrackerSettingsPath + "GazetrackerDirectClientSetting.xml")
        {
            this.adjustButton                       = trackerAdjustButton;
            this.adjustButton.Click                += this.AdjustButtonClick;
            this.showOnSecondaryScreenButton        = trackerShowOnSecondaryScreenButton;
            this.showOnSecondaryScreenButton.Click += this.BtnShowOnPresentationScreenClick;
            this.eyeVideo = trackerEyeVideoControl;
            this.Initialize();
        }
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the TheEyeTribeTracker class.
 /// </summary>
 /// <param name="owningRecordModule">
 /// The <see cref="RecordModule"/>
 ///   form wich host the recorder.
 /// </param>
 /// <param name="trackerTrackerControlsContainer">
 /// The <see cref="SplitContainer"/>
 ///   control which contains two <see cref="SplitContainer"/>s with
 ///   track status and calibration plot controls and buttons.
 /// </param>
 /// <param name="trackerTrackStatusPanel">
 /// The <see cref="Panel"/>
 ///   which should contain the track status object.
 /// </param>
 /// <param name="trackerCalibrationResultPanel">
 /// The <see cref="Panel"/>
 ///   which should contain the calibration result object.
 /// </param>
 /// <param name="trackerShowOnSecondaryScreenButton">
 /// The <see cref="Button"/>
 ///   named "ShowOnPresentationScreenButton" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerAcceptButton">
 /// The <see cref="Button"/>
 ///   named "Accept" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerRecalibrateButton">
 /// The <see cref="Button"/>
 ///   named "Recalibrate" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerConnectButton">
 /// The <see cref="Button"/>
 ///   named "Connect" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerSubjectButton">
 /// The <see cref="Button"/>
 ///   named "Subject" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerCalibrateButton">
 /// The <see cref="Button"/>
 ///   named "Calibrate" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerRecordButton">
 /// The <see cref="Button"/>
 ///   named "Record" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerSubjectNameTextBox">
 /// The <see cref="TextBox"/>
 ///   which should contain the subject name at the tab page of the TheEyeTribe device.
 /// </param>
 public TheEyeTribeTracker(
     RecordModule owningRecordModule,
     SplitContainer trackerTrackerControlsContainer,
     Panel trackerTrackStatusPanel,
     Panel trackerCalibrationResultPanel,
     Button trackerShowOnSecondaryScreenButton,
     Button trackerAcceptButton,
     Button trackerRecalibrateButton,
     Button trackerConnectButton,
     Button trackerSubjectButton,
     Button trackerCalibrateButton,
     Button trackerRecordButton,
     TextBox trackerSubjectNameTextBox)
     : base(
         owningRecordModule,
         trackerTrackerControlsContainer,
         trackerTrackStatusPanel,
         trackerCalibrationResultPanel,
         trackerShowOnSecondaryScreenButton,
         trackerAcceptButton,
         trackerRecalibrateButton,
         trackerConnectButton,
         trackerSubjectButton,
         trackerCalibrateButton,
         trackerRecordButton,
         trackerSubjectNameTextBox,
         Properties.Settings.Default.EyeTrackerSettingsPath + "TheEyeTribeSetting.xml")
 {
     // Call the initialize methods of derived classes
     this.Initialize();
 }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the Tracker class.
        /// </summary>
        /// <param name="owningRecordModule">
        /// The <see cref="RecordModule"/>
        ///   form wich host the recorder.
        /// </param>
        /// <param name="trackerConnectButton">
        /// The <see cref="Button"/>
        ///   named "Connect" at the tab page of the tracking device.
        /// </param>
        /// <param name="trackerSubjectButton">
        /// The <see cref="Button"/>
        ///   named "Subject" at the tab page of the tracking device.
        /// </param>
        /// <param name="trackerCalibrateButton">
        /// The <see cref="Button"/>
        ///   named "Calibrate" at the tab page of the tracking device.
        /// </param>
        /// <param name="trackerRecordButton">
        /// The <see cref="Button"/>
        ///   named "Record" at the tab page of the tracking device.
        /// </param>
        /// <param name="trackerSubjectNameTextBox">
        /// The <see cref="TextBox"/>
        ///   which should contain the subject name at the tab page of the tracking device.
        /// </param>
        /// <param name="trackerSettingsFile">
        /// The file with full path to the settings
        ///   xml file of the tracking device.
        /// </param>
        protected Tracker(
            RecordModule owningRecordModule,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox,
            string trackerSettingsFile)
        {
            if (trackerSubjectButton == null)
            {
                throw new ArgumentNullException(
                          "trackerSubjectButton",
                          "All custom devices should have a subject button on their tab pages.");
            }

            if (trackerRecordButton == null)
            {
                throw new ArgumentNullException(
                          "trackerRecordButton",
                          "All custom devices should have a record button on their tab pages.");
            }

            this.recordModule       = owningRecordModule;
            this.connectButton      = trackerConnectButton;
            this.subjectButton      = trackerSubjectButton;
            this.calibrateButton    = trackerCalibrateButton;
            this.recordButton       = trackerRecordButton;
            this.subjectNameTextBox = trackerSubjectNameTextBox;
            this.settingsFile       = trackerSettingsFile;

            // Wires the recording finished event from the record module
            // to wait for resetting the button states after recording
            // stopped
            this.recordModule.RecordingFinished += this.RecordModuleNewRecordingFinished;

            // Wires the GazeDataChanged event of this tracking device
            // to the record modules
            // event handler.
            this.GazeDataChanged += this.recordModule.TrackerGazeDataChanged;

            // Create new empty subject
            this.subject = new SubjectsData();

            // Wire button events.
            this.recordButton.Click += this.BtnRecordClick;

            if (this.calibrateButton != null)
            {
                this.calibrateButton.Click += this.BtnCalibrateClick;
            }

            this.subjectButton.Click += this.BtnSubjectNameClick;

            if (this.connectButton != null)
            {
                this.connectButton.Click += this.BtnConnectClick;
            }
        }
Пример #8
0
 /// <summary>
 /// The <see cref="Control.Click"/> event handler for the
 ///   <see cref="Button"/> <see cref="btnSecondary"/>.
 ///   Updates the presentation screen.
 /// </summary>
 /// <param name="sender">
 /// Source of the event.
 /// </param>
 /// <param name="e">
 /// An empty <see cref="EventArgs"/>.
 /// </param>
 private void BtnSecondaryClick(object sender, EventArgs e)
 {
     if (RecordModule.CheckForCorrectPresentationScreenResolution(SecondaryScreen.GetSecondaryScreen().Bounds.Size))
     {
         this.btnPrimary.Checked = !this.btnSecondary.Checked;
         this.SubmitPresentationScreenToSettings();
     }
     else
     {
         this.btnSecondary.Checked = false;
     }
 }
Пример #9
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            NinjectModule serviceModule    = new ServiceModule("DefaultConnection");
            NinjectModule roleModule       = new RoleModule();
            NinjectModule userModule       = new UserModule();
            NinjectModule patientModule    = new PatientModule();
            NinjectModule doctorModule     = new DoctorModule();
            NinjectModule specialityModule = new SpecialityModule();
            NinjectModule recordModule     = new RecordModule();

            var kernel = new StandardKernel(serviceModule, roleModule, userModule, patientModule, doctorModule, specialityModule, recordModule);

            DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel));
        }
Пример #10
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the MouseOnlyTracker class.
        /// </summary>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the MouseOnly device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the MouseOnly device.</param>
        /// <param name="trackerCalibrateButton">The <see cref="Button"/>
        /// named "Calibrate" at the tab page of the MouseOnly device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the MouseOnly device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the MouseOnly device.</param>
        public MouseOnlyTracker(
            RecordModule owningRecordModule,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                trackerCalibrateButton,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                Properties.Settings.Default.EyeTrackerSettingsPath + "MouseOnlySetting.xml")
        {
            // Call the initialize methods of derived classes
            this.Initialize();
        }
Пример #11
0
    ///////////////////////////////////////////////////////////////////////////////
    // Defining Constants                                                        //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTANTS
    #endregion //CONSTANTS

    ///////////////////////////////////////////////////////////////////////////////
    // Defining Variables, Enumerations, Events                                  //
    ///////////////////////////////////////////////////////////////////////////////
    #region FIELDS
   #endregion //FIELDS

    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the SMITracker class.
    /// </summary>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the SMI device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the SMI device.</param>
    /// <param name="trackerCalibrateButton">The <see cref="Button"/>
    /// named "Calibrate" at the tab page of the SMI device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the SMI device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the SMI device.</param>
    public SMIRedMTracker(
      RecordModule owningRecordModule,
      Button trackerConnectButton,
      Button trackerSubjectButton,
      Button trackerCalibrateButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox)
      : base(
      owningRecordModule,
      trackerConnectButton,
      trackerSubjectButton,
      trackerCalibrateButton,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      Properties.Settings.Default.EyeTrackerSettingsPath + "SMIRedMSetting.xml",
      new SMIRedMClient())
    {
      // Call the initialize methods of derived classes
      this.Initialize();
    }
Пример #12
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION
        /// <summary>
        /// Initializes a new instance of the AslTracker class.
        /// </summary>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the Asl device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the Asl device.</param>
        /// <param name="trackerCalibrateButton">The <see cref="Button"/>
        /// named "Calibrate" at the tab page of the Asl device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the Asl device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the Asl device.</param>
        public AslTracker(
            RecordModule owningRecordModule,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                trackerCalibrateButton,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                Properties.Settings.Default.EyeTrackerSettingsPath + "ASLUserSettings.cfg")
        {
            this.UserSettingsFile = Properties.Settings.Default.EyeTrackerSettingsPath + "ASLUserSettings.cfg";
#if ASL
            this.Settings = UserSettings.Load(this.UserSettingsFile);
            this.CreateDefaultConfigFile();
            this.Settings.DefaultConfigFile = Properties.Settings.Default.EyeTrackerSettingsPath + "ASLStandardStreaming.cfg";

            if (this.Settings.ConfigFile == null)
            {
                this.Settings.ConfigFile = this.Settings.DefaultConfigFile;
            }

            this.Settings.Store(this.UserSettingsFile);
#endif

            // Call the "local" initialize method of derived class
            this.Initialize();

            // Set default values
            this.MinHorizontal    = 0;
            this.MinVertical      = 0;
            this.MaxHorizontal    = 260;
            this.MaxVertical      = 240;
            this.DataCount        = 5;
            this.PupilScaleFactor = 0.15f;
        }
Пример #13
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the GazetrackerIPClientTracker class.
        /// <remarks>Note that the xml settings file is set, but not used,
        /// GazeTracker internally saves it state in another location.
        /// </remarks>
        /// </summary>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerStatusTextBox">The <see cref="TextBox"/>
        /// to retreive status messages of the tracker.</param>
        /// <param name="trackerLaunchButton">The <see cref="Button"/>
        /// named "Launch" at the tab page of the device.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the device.</param>
        public GazetrackerIPClientTracker(
            RecordModule owningRecordModule,
            TextBox trackerStatusTextBox,
            Button trackerLaunchButton,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox)
            : base(
                owningRecordModule,
                trackerConnectButton,
                trackerSubjectButton,
                null,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                Properties.Settings.Default.EyeTrackerSettingsPath + "GazetrackerIPClientSetting.xml")
        {
            this.statusTextBox = trackerStatusTextBox;
            this.launchButton  = trackerLaunchButton;

            // Call the initialize methods of derived classes
            this.Initialize();
        }
Пример #14
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTORS

        /// <summary>
        /// Initializes a new instance of the MirametrixTracker class.
        /// </summary>
        /// <param name="mirametrixResultLabel">The label on the calibration result panel
        /// to show the quality status of the calibration.</param>
        /// <param name="mirametrixTabpage">The customized tab page for the Mirametrix tracker.</param>
        /// <param name="owningRecordModule">The <see cref="RecordModule"/>
        /// form wich host the recorder.</param>
        /// <param name="trackerTrackerControlsContainer">The <see cref="SplitContainer"/>
        /// control which contains two <see cref="SplitContainer"/>s with
        /// track status and calibration plot controls and buttons.</param>
        /// <param name="trackerTrackStatusPanel">The <see cref="Panel"/>
        /// which should contain the track status object.</param>
        /// <param name="trackerCalibrationResultPanel">The <see cref="Panel"/>
        /// which should contain the calibration result object.</param>
        /// <param name="trackerShowOnSecondaryScreenButton">The <see cref="Button"/>
        /// named "ShowOnPresentationScreenButton" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerAcceptButton">The <see cref="Button"/>
        /// named "Accept" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerRecalibrateButton">The <see cref="Button"/>
        /// named "Recalibrate" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerConnectButton">The <see cref="Button"/>
        /// named "Connect" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerSubjectButton">The <see cref="Button"/>
        /// named "Subject" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerCalibrateButton">The <see cref="Button"/>
        /// named "Calibrate" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerRecordButton">The <see cref="Button"/>
        /// named "Record" at the tab page of the Mirametrix device.</param>
        /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
        /// which should contain the subject name at the tab page of the Mirametrix device.</param>
        public MirametrixTracker(
            ref Label mirametrixResultLabel,
            TabPage mirametrixTabpage,
            RecordModule owningRecordModule,
            SplitContainer trackerTrackerControlsContainer,
            Panel trackerTrackStatusPanel,
            Panel trackerCalibrationResultPanel,
            Button trackerShowOnSecondaryScreenButton,
            Button trackerAcceptButton,
            Button trackerRecalibrateButton,
            Button trackerConnectButton,
            Button trackerSubjectButton,
            Button trackerCalibrateButton,
            Button trackerRecordButton,
            TextBox trackerSubjectNameTextBox)
            : base(
                owningRecordModule,
                trackerTrackerControlsContainer,
                trackerTrackStatusPanel,
                trackerCalibrationResultPanel,
                trackerShowOnSecondaryScreenButton,
                trackerAcceptButton,
                trackerRecalibrateButton,
                trackerConnectButton,
                trackerSubjectButton,
                trackerCalibrateButton,
                trackerRecordButton,
                trackerSubjectNameTextBox,
                Properties.Settings.Default.EyeTrackerSettingsPath + "Mirametrix.xml")
        {
            this.memCalibrationResult = mirametrixResultLabel;
            //this.memTabPage = mirametrixTabpage;

            // Call the initialize methods of derived classes
            this.Initialize();
        }
Пример #15
0
        /// <summary>
        /// The <see cref="Control.Click"/> event handler for the
        /// <see cref="Button"/> <see cref="btnPreviewSlideshow"/>.
        /// Starts a <see cref="PresenterModule"/> with the given slides.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">An empty <see cref="EventArgs"/></param>
        private void BtnPreviewSlideshowClick(object sender, EventArgs e)
        {
            if (!RecordModule.CheckForCorrectPresentationScreenResolution(PresentationScreen.GetPresentationResolution()))
            {
                return;
            }

            PresenterModule objPresenter = new PresenterModule();

            // Create a newly randomized trial list.
            TrialCollection trials = this.slideshow.GetRandomizedTrials();

            // Create a hardcopy of the trials.
            TrialCollection copyOfTrials = (TrialCollection)trials.Clone();

            // Set slide list of presenter
            objPresenter.TrialList = copyOfTrials;

            // Show presenter form, that starts presentation.
            objPresenter.ShowDialog();

            // Update slideshow pictures of newly created trials
            Document.ActiveDocument.ExperimentSettings.SlideShow.UpdateExperimentPathOfResources(Document.ActiveDocument.ExperimentSettings.SlideResourcesPath);
        }
Пример #16
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the TrackerWithStatusControls class.
    /// </summary>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerTrackerControlsContainer">The <see cref="SplitContainer"/>
    /// control which contains two <see cref="SplitContainer"/>s with
    /// track status and calibration plot controls and buttons.</param>
    /// <param name="trackerTrackStatusPanel">The <see cref="Panel"/>
    /// which should contain the track status object.</param>
    /// <param name="trackerCalibrationResultPanel">The <see cref="Panel"/>
    /// which should contain the calibration result object.</param>
    /// <param name="trackerShowOnPresentationScreenButton">The <see cref="Button"/>
    /// named "ShowOnPresentationScreenButton" at the tab page of the tracking device.</param>
    /// <param name="trackerAcceptButton">The <see cref="Button"/>
    /// named "Accept" at the tab page of the tracking device.</param>
    /// <param name="trackerRecalibrateButton">The <see cref="Button"/>
    /// named "Recalibrate" at the tab page of the tracking device.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the tracking device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the tracking device.</param>
    /// <param name="trackerCalibrateButton">The <see cref="Button"/>
    /// named "Calibrate" at the tab page of the tracking device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the tracking device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the tracking device.</param>
    /// <param name="trackerSettingsFile">The file with full path to the settings
    /// xml file of the tracking device.</param>
    protected TrackerWithStatusControls(
      RecordModule owningRecordModule,
      SplitContainer trackerTrackerControlsContainer,
      Panel trackerTrackStatusPanel,
      Panel trackerCalibrationResultPanel,
      Button trackerShowOnPresentationScreenButton,
      Button trackerAcceptButton,
      Button trackerRecalibrateButton,
      Button trackerConnectButton,
      Button trackerSubjectButton,
      Button trackerCalibrateButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox,
      string trackerSettingsFile)
      : base(
      owningRecordModule,
      trackerConnectButton,
      trackerSubjectButton,
      trackerCalibrateButton,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      trackerSettingsFile)
    {
      this.trackerControlsContainer = trackerTrackerControlsContainer;
      this.trackStatusPanel = trackerTrackStatusPanel;
      this.calibrationResultPanel = trackerCalibrationResultPanel;
      this.showOnPresentationScreenButton = trackerShowOnPresentationScreenButton;
      this.acceptButton = trackerAcceptButton;
      this.recalibrateButton = trackerRecalibrateButton;

      this.showOnPresentationScreenButton.Click += this.BtnShowOnPresentationScreenClick;
      this.recalibrateButton.Click += this.BtnRecalibrateClick;
      this.acceptButton.Click += this.BtnAcceptCalibrationClick;
    }
Пример #17
0
 /// <summary>
 /// Initializes a new instance of the TheEyeTribeTracker class.
 /// </summary>
 /// <param name="owningRecordModule">
 /// The <see cref="RecordModule"/>
 ///   form wich host the recorder.
 /// </param>
 /// <param name="trackerTrackerControlsContainer">
 /// The <see cref="SplitContainer"/>
 ///   control which contains two <see cref="SplitContainer"/>s with
 ///   track status and calibration plot controls and buttons.
 /// </param>
 /// <param name="trackerTrackStatusPanel">
 /// The <see cref="Panel"/>
 ///   which should contain the track status object.
 /// </param>
 /// <param name="trackerCalibrationResultPanel">
 /// The <see cref="Panel"/>
 ///   which should contain the calibration result object.
 /// </param>
 /// <param name="trackerShowOnSecondaryScreenButton">
 /// The <see cref="Button"/>
 ///   named "ShowOnPresentationScreenButton" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerAcceptButton">
 /// The <see cref="Button"/>
 ///   named "Accept" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerRecalibrateButton">
 /// The <see cref="Button"/>
 ///   named "Recalibrate" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerConnectButton">
 /// The <see cref="Button"/>
 ///   named "Connect" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerSubjectButton">
 /// The <see cref="Button"/>
 ///   named "Subject" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerCalibrateButton">
 /// The <see cref="Button"/>
 ///   named "Calibrate" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerRecordButton">
 /// The <see cref="Button"/>
 ///   named "Record" at the tab page of the TheEyeTribe device.
 /// </param>
 /// <param name="trackerSubjectNameTextBox">
 /// The <see cref="TextBox"/>
 ///   which should contain the subject name at the tab page of the TheEyeTribe device.
 /// </param>
 public TheEyeTribeTracker(
   RecordModule owningRecordModule,
   SplitContainer trackerTrackerControlsContainer,
   Panel trackerTrackStatusPanel,
   Panel trackerCalibrationResultPanel,
   Button trackerShowOnSecondaryScreenButton,
   Button trackerAcceptButton,
   Button trackerRecalibrateButton,
   Button trackerConnectButton,
   Button trackerSubjectButton,
   Button trackerCalibrateButton,
   Button trackerRecordButton,
   TextBox trackerSubjectNameTextBox)
   : base(
     owningRecordModule,
     trackerTrackerControlsContainer,
     trackerTrackStatusPanel,
     trackerCalibrationResultPanel,
     trackerShowOnSecondaryScreenButton,
     trackerAcceptButton,
     trackerRecalibrateButton,
     trackerConnectButton,
     trackerSubjectButton,
     trackerCalibrateButton,
     trackerRecordButton,
     trackerSubjectNameTextBox,
     Properties.Settings.Default.EyeTrackerSettingsPath + "TheEyeTribeSetting.xml")
 {
   // Call the initialize methods of derived classes
   this.Initialize();
 }
Пример #18
0
 public RecordController()
 {
     _recordModule = new RecordModule();
 }
Пример #19
0
    /// <summary>
    /// Initializes a new instance of the Tracker class.
    /// </summary>
    /// <param name="owningRecordModule">
    /// The <see cref="RecordModule"/>
    ///   form wich host the recorder.
    /// </param>
    /// <param name="trackerConnectButton">
    /// The <see cref="Button"/>
    ///   named "Connect" at the tab page of the tracking device.
    /// </param>
    /// <param name="trackerSubjectButton">
    /// The <see cref="Button"/>
    ///   named "Subject" at the tab page of the tracking device.
    /// </param>
    /// <param name="trackerCalibrateButton">
    /// The <see cref="Button"/>
    ///   named "Calibrate" at the tab page of the tracking device.
    /// </param>
    /// <param name="trackerRecordButton">
    /// The <see cref="Button"/>
    ///   named "Record" at the tab page of the tracking device.
    /// </param>
    /// <param name="trackerSubjectNameTextBox">
    /// The <see cref="TextBox"/>
    ///   which should contain the subject name at the tab page of the tracking device.
    /// </param>
    /// <param name="trackerSettingsFile">
    /// The file with full path to the settings
    ///   xml file of the tracking device.
    /// </param>
    protected Tracker(
      RecordModule owningRecordModule,
      Button trackerConnectButton,
      Button trackerSubjectButton,
      Button trackerCalibrateButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox,
      string trackerSettingsFile)
    {
      if (trackerSubjectButton == null)
      {
        throw new ArgumentNullException(
          "trackerSubjectButton",
          "All custom devices should have a subject button on their tab pages.");
      }

      if (trackerRecordButton == null)
      {
        throw new ArgumentNullException(
          "trackerRecordButton",
          "All custom devices should have a record button on their tab pages.");
      }

      this.recordModule = owningRecordModule;
      this.connectButton = trackerConnectButton;
      this.subjectButton = trackerSubjectButton;
      this.calibrateButton = trackerCalibrateButton;
      this.recordButton = trackerRecordButton;
      this.subjectNameTextBox = trackerSubjectNameTextBox;
      this.settingsFile = trackerSettingsFile;

      // Wires the recording finished event from the record module
      // to wait for resetting the button states after recording
      // stopped
      this.recordModule.RecordingFinished += this.RecordModuleNewRecordingFinished;

      // Wires the GazeDataChanged event of this tracking device
      // to the record modules
      // event handler.
      this.GazeDataChanged += this.recordModule.TrackerGazeDataChanged;

      // Create new empty subject
      this.subject = new SubjectsData();

      // Wire button events.
      this.recordButton.Click += this.BtnRecordClick;

      if (this.calibrateButton != null)
      {
        this.calibrateButton.Click += this.BtnCalibrateClick;
      }

      this.subjectButton.Click += this.BtnSubjectNameClick;

      if (this.connectButton != null)
      {
        this.connectButton.Click += this.BtnConnectClick;
      }
    }
Пример #20
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the GazetrackerDirectClientTracker class.
    /// <remarks>
    /// Note that the xml settings file is set, but not used,
    /// GazeTracker internally saves it state in another location.
    /// </remarks>
    /// </summary>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerEyeVideoControl">The <see cref="EyeVideoControl"/>
    /// which displays the eye video of the gazetracker.</param>
    /// <param name="trackerShowOnSecondaryScreenButton">The <see cref="Button"/>
    /// named "ShowOnPresentationScreenButton" at the tab page of the Tobii device.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the device.</param>
    /// <param name="trackerAdjustButton">The <see cref="Button"/>
    /// named "Adjust" at the tab page of the device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the device.</param>
    /// <param name="trackerCalibrateButton">The <see cref="Button"/>
    /// named "Calibrate" at the tab page of the device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the device.</param>
    public GazetrackerDirectClientTracker(
      RecordModule owningRecordModule,
      EyeVideoControl trackerEyeVideoControl,
      Button trackerShowOnSecondaryScreenButton,
      Button trackerConnectButton,
      Button trackerAdjustButton,
      Button trackerSubjectButton,
      Button trackerCalibrateButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox)
      : base(
      owningRecordModule,
      trackerConnectButton,
      trackerSubjectButton,
      trackerCalibrateButton,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      Properties.Settings.Default.EyeTrackerSettingsPath + "GazetrackerDirectClientSetting.xml")
    {
      this.adjustButton = trackerAdjustButton;
      this.adjustButton.Click += this.AdjustButtonClick;
      this.showOnSecondaryScreenButton = trackerShowOnSecondaryScreenButton;
      this.showOnSecondaryScreenButton.Click += this.BtnShowOnPresentationScreenClick;
      this.eyeVideo = trackerEyeVideoControl;
      this.Initialize();
    }
Пример #21
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the GazetrackerIPClientTracker class.
    /// <remarks>Note that the xml settings file is set, but not used,
    /// GazeTracker internally saves it state in another location.
    /// </remarks>
    /// </summary>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerStatusTextBox">The <see cref="TextBox"/>
    /// to retreive status messages of the tracker.</param>
    /// <param name="trackerLaunchButton">The <see cref="Button"/>
    /// named "Launch" at the tab page of the device.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the device.</param>
    public GazetrackerIPClientTracker(
      RecordModule owningRecordModule,
      TextBox trackerStatusTextBox,
      Button trackerLaunchButton,
      Button trackerConnectButton,
      Button trackerSubjectButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox)
      : base(
      owningRecordModule,
      trackerConnectButton,
      trackerSubjectButton,
      null,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      Properties.Settings.Default.EyeTrackerSettingsPath + "GazetrackerIPClientSetting.xml")
    {
      this.statusTextBox = trackerStatusTextBox;
      this.launchButton = trackerLaunchButton;

      // Call the initialize methods of derived classes
      this.Initialize();
    }
Пример #22
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION
    /// <summary>
    /// Initializes a new instance of the AslTracker class.
    /// </summary>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the Asl device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the Asl device.</param>
    /// <param name="trackerCalibrateButton">The <see cref="Button"/>
    /// named "Calibrate" at the tab page of the Asl device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the Asl device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the Asl device.</param>
    public AslTracker(
        RecordModule owningRecordModule,
        Button trackerConnectButton,
        Button trackerSubjectButton,
        Button trackerCalibrateButton,
        Button trackerRecordButton,
        TextBox trackerSubjectNameTextBox)
      : base(
      owningRecordModule,
      trackerConnectButton,
      trackerSubjectButton,
      trackerCalibrateButton,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      Properties.Settings.Default.EyeTrackerSettingsPath + "ASLUserSettings.cfg")
    {
      this.UserSettingsFile = Properties.Settings.Default.EyeTrackerSettingsPath + "ASLUserSettings.cfg";
#if ASL
      this.Settings = UserSettings.Load(this.UserSettingsFile);
      this.CreateDefaultConfigFile();
      this.Settings.DefaultConfigFile = Properties.Settings.Default.EyeTrackerSettingsPath + "ASLStandardStreaming.cfg";

      if (this.Settings.ConfigFile == null)
      {
        this.Settings.ConfigFile = this.Settings.DefaultConfigFile;
      }

      this.Settings.Store(this.UserSettingsFile);
#endif

      // Call the "local" initialize method of derived class
      this.Initialize();

      // Set default values
      this.MinHorizontal = 0;
      this.MinVertical = 0;
      this.MaxHorizontal = 260;
      this.MaxVertical = 240;
      this.DataCount = 5;
      this.PupilScaleFactor = 0.15f;
    }
Пример #23
0
    /// <summary>
    /// Initializes a new instance of the HaythamTracker class.
    ///   <remarks>
    /// Note that the xml settings file is set, but not used,
    ///     Haytham internally saves it state in another location.
    ///   </remarks>
    /// </summary>
    /// <param name="owningRecordModule">
    /// The <see cref="RecordModule"/> form wich host the recorder.
    /// </param>
    /// <param name="trackerTrackerControlsContainer">
    /// The split container owning the info textbox and the track status
    /// </param>
    /// <param name="trackerTrackStatusControl">
    /// The <see cref="TrackStatusControl"/> that displays information about the
    ///   current track status.
    /// </param>
    /// <param name="trackerStatusTextBox">
    /// The <see cref="TextBox"/> to retreive status messages of the tracker. 
    /// </param>
    /// <param name="trackerLaunchButton">
    /// The <see cref="Button"/> named "Launch" at the tab page of the device.
    /// </param>
    /// <param name="trackerConnectButton">
    /// The <see cref="Button"/> named "Connect" at the tab page of the device.
    /// </param>
    /// <param name="trackerSubjectButton">
    /// The <see cref="Button"/> named "Subject" at the tab page of the device. 
    /// </param>
    /// <param name="trackerRecordButton">
    /// The <see cref="Button"/> named "Record" at the tab page of the device. 
    /// </param>
    /// <param name="trackerSubjectNameTextBox">
    /// The <see cref="TextBox"/> which should contain the subject name at the tab
    ///   page of the device.
    /// </param>
    public HaythamTracker(
      RecordModule owningRecordModule,
      SplitContainer trackerTrackerControlsContainer,
      TrackStatusControl trackerTrackStatusControl,
      TextBox trackerStatusTextBox,
      Button trackerLaunchButton,
      Button trackerConnectButton,
      //Button trackerCalibrateButton,
      Button trackerSubjectButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox)
      : base(
        owningRecordModule,
        trackerConnectButton,
        trackerSubjectButton,
        //trackerCalibrateButton,
      null,
        trackerRecordButton,
        trackerSubjectNameTextBox,
        Properties.Settings.Default.EyeTrackerSettingsPath + "HaythamSetting.xml")
    {
      this.statusTextBox = trackerStatusTextBox;
      this.trackControlsSplitContainer = trackerTrackerControlsContainer;
      this.trackStatusControl = trackerTrackStatusControl;
      this.launchButton = trackerLaunchButton;

      // Call the initialize methods of derived classes
      this.Initialize();
    }
Пример #24
0
    ///////////////////////////////////////////////////////////////////////////////
    // Construction and Initializing methods                                     //
    ///////////////////////////////////////////////////////////////////////////////
    #region CONSTRUCTION

    /// <summary>
    /// Initializes a new instance of the AleaTracker class.
    /// </summary>
    /// <param name="aleaResultLabel">The label on the calibration result panel
    /// to show the quality status of the calibration.</param>
    /// <param name="aleaTabpage">The customized tab page for the Alea tracker.</param>
    /// <param name="owningRecordModule">The <see cref="RecordModule"/>
    /// form wich host the recorder.</param>
    /// <param name="trackerTrackerControlsContainer">The <see cref="SplitContainer"/>
    /// control which contains two <see cref="SplitContainer"/>s with
    /// track status and calibration plot controls and buttons.</param>
    /// <param name="trackerTrackStatusPanel">The <see cref="Panel"/>
    /// which should contain the track status object.</param>
    /// <param name="trackerCalibrationResultPanel">The <see cref="Panel"/>
    /// which should contain the calibration result object.</param>
    /// <param name="trackerShowOnSecondaryScreenButton">The <see cref="Button"/>
    /// named "ShowOnPresentationScreenButton" at the tab page of the Alea device.</param>
    /// <param name="trackerAcceptButton">The <see cref="Button"/>
    /// named "Accept" at the tab page of the Alea device.</param>
    /// <param name="trackerRecalibrateButton">The <see cref="Button"/>
    /// named "Recalibrate" at the tab page of the Alea device.</param>
    /// <param name="trackerConnectButton">The <see cref="Button"/>
    /// named "Connect" at the tab page of the Alea device.</param>
    /// <param name="trackerSubjectButton">The <see cref="Button"/>
    /// named "Subject" at the tab page of the Alea device.</param>
    /// <param name="trackerCalibrateButton">The <see cref="Button"/>
    /// named "Calibrate" at the tab page of the Alea device.</param>
    /// <param name="trackerRecordButton">The <see cref="Button"/>
    /// named "Record" at the tab page of the Alea device.</param>
    /// <param name="trackerSubjectNameTextBox">The <see cref="TextBox"/>
    /// which should contain the subject name at the tab page of the Alea device.</param>
    public AleaTracker(
      ref Label aleaResultLabel,
      TabPage aleaTabpage,
      RecordModule owningRecordModule,
      SplitContainer trackerTrackerControlsContainer,
      Panel trackerTrackStatusPanel,
      Panel trackerCalibrationResultPanel,
      Button trackerShowOnSecondaryScreenButton,
      Button trackerAcceptButton,
      Button trackerRecalibrateButton,
      Button trackerConnectButton,
      Button trackerSubjectButton,
      Button trackerCalibrateButton,
      Button trackerRecordButton,
      TextBox trackerSubjectNameTextBox)
      : base(
      owningRecordModule,
      trackerTrackerControlsContainer,
      trackerTrackStatusPanel,
      trackerCalibrationResultPanel,
      trackerShowOnSecondaryScreenButton,
      trackerAcceptButton,
      trackerRecalibrateButton,
      trackerConnectButton,
      trackerSubjectButton,
      trackerCalibrateButton,
      trackerRecordButton,
      trackerSubjectNameTextBox,
      Properties.Settings.Default.EyeTrackerSettingsPath + "AleaSetting.xml")
    {
      this.resultLabel = aleaResultLabel;
      this.tabpage = aleaTabpage;

      // Call the initialize methods of derived classes
      this.Initialize();
    }