示例#1
0
        /// <summary>
        /// Sets up calibration procedure and the tracking client
        /// and wires the events. Reads settings from file.
        /// </summary>
        protected override void Initialize()
        {
            this.CalibrationDone += new EventHandler <CalibrationDoneEventArgs>(this.aleaInterface_CalibrationDone);

            this.isRecording = false;
            this.stopwatch   = new Stopwatch();
            this.timeLock    = new object();

            this.api = new EtApi();

            APICalibrationDone += new CalibrationDoneDelegate(this.AleaInterface_APICalibrationDone);
            APIRawDataReceived += new RawDataDelegate(this.AleaInterface_APIRawDataReceived);

            // Load alea tracker settings.
            if (File.Exists(this.SettingsFile))
            {
                this.settings = this.DeserializeSettings(this.SettingsFile);
            }
            else
            {
                this.settings = new AleaSetting();
                this.SerializeSettings(this.settings, this.SettingsFile);
            }

            base.Initialize();
        }
示例#2
0
    /// <summary>
    /// Sets up calibration procedure and the tracking client
    /// and wires the events. Reads settings from file.
    /// </summary>
    protected override void Initialize()
    {
      this.CalibrationDone += new EventHandler<CalibrationDoneEventArgs>(this.aleaInterface_CalibrationDone);

      this.isRecording = false;
      this.stopwatch = new Stopwatch();
      this.timeLock = new object();

      this.api = new EtApi();

      APICalibrationDone += new CalibrationDoneDelegate(this.AleaInterface_APICalibrationDone);
      APIRawDataReceived += new RawDataDelegate(this.AleaInterface_APIRawDataReceived);

      // Load alea tracker settings.
      if (File.Exists(this.SettingsFile))
      {
        this.settings = this.DeserializeSettings(this.SettingsFile);
      }
      else
      {
        this.settings = new AleaSetting();
        this.SerializeSettings(this.settings, this.SettingsFile);
      }

      base.Initialize();
    }