/////////////////////////////////////////////////////////////////////////////// // Public methods // /////////////////////////////////////////////////////////////////////////////// #region PUBLICMETHODS #endregion //PUBLICMETHODS /////////////////////////////////////////////////////////////////////////////// // Inherited methods // /////////////////////////////////////////////////////////////////////////////// #region OVERRIDES #endregion //OVERRIDES /////////////////////////////////////////////////////////////////////////////// // Eventhandler // /////////////////////////////////////////////////////////////////////////////// #region EVENTHANDLER /// <summary> /// The on Load event handler for the dialog. /// </summary> /// <param name="sender">Source of the event</param> /// <param name="e">An empty <see cref="EventArgs"/></param> private void AslSettingsDialog_Load(object sender, EventArgs e) { #if ASL this.userSettings = UserSettings.Load(this.aslTracker.SettingsFile); #endif this.InitializeControls(); // Initialize interface this.serialOutClass.Notify += new _IASLSerialOutPort2Events_NotifyEventHandler(this.OnNotify); this.EnableDisable(); this.StreamingCheckbox_CheckedChanged(sender, e); this.somethingChange = false; }
/////////////////////////////////////////////////////////////////////////////// // 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; }
/// <summary> /// Sets up calibration procedure and wires the events. Reads settings from file. /// </summary> protected override void Initialize() { #if ASL // Create Port COM Object this.aslPort = new ASLSerialOutPort3Class(); // ??? this.stopwatch2 = new Stopwatch(); // Load Asl tracker settings. if (File.Exists(this.UserSettingsFile)) { this.settings = UserSettings.Load(this.UserSettingsFile); } else { this.settings = new UserSettings(); this.settings.Store(this.UserSettingsFile); } #endif }