Exemple #1
0
        /// <summary>
        /// This method shows or hides a copy of the eye video on
        /// the current presentation screen in native resolution.
        /// </summary>
        /// <param name="show"><strong>True</strong> if control should be shown,
        /// otherwise<strong>false</strong></param>
        public void ShowOrHideTrackStatusOnPresentationScreen(bool show)
        {
            if (show)
            {
                // Create a new window to host a larger VideoViewer
                this.eyeTrackStatus = new TrackStatusControl();
                this.eyeTrackStatus.EyeVideoControl.IsNativeResolution = true;
                this.eyeTrackStatus.SetSizeAndLabels(
                    Tracker.Instance.VideoWidth,
                    Tracker.Instance.VideoHeight,
                    Tracker.Instance.FPSVideo);

                this.eyeTrackStatus.Left = (int)(
                    TrackingScreen.TrackingScreenLeft +
                    TrackingScreen.TrackingScreenCenter.X - (this.eyeTrackStatus.Width / 2));
                this.eyeTrackStatus.Top = (int)(
                    TrackingScreen.TrackingScreenTop +
                    TrackingScreen.TrackingScreenCenter.Y - (this.eyeTrackStatus.Height / 2));

                this.eyeTrackStatus.Show();
            }
            else
            {
                if (this.eyeTrackStatus != null)
                {
                    this.eyeTrackStatus.Close();
                }
            }
        }
Exemple #2
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();
        }