private void OnFixation(object sender, FixationEventArgs e) { if (hasFixation()) { OnFixationEvent(this, e); } }
private void OnGazeFixationEvent(object sender, FixationEventArgs e) { if (this._isGettingData && _stopWatch.IsRunning) { if (e.isBegin) { _FixationStartRID = this._RawdataID; _FixationStartTime = (int)Math.Round(_stopWatch.Elapsed.TotalMilliseconds); if (String.Compare("", _WebPos) != 0 && _WebPos != null) { _FixationScrollTop = System.Windows.Point.Parse(_WebPos); } } else { if (_FixationStartRID == 0) { return; } int duration = (int)Math.Round(_stopWatch.Elapsed.TotalMilliseconds) - _FixationStartTime; int endid = this._RawdataID; if (duration >= _EyeDeviceUC.GetGazeDurationThreshold()) { //Add GazeFixation string value = "'" + _FixationStartTime + "', '" + duration + "', '" + (float)e.fixation.X + "', '" + (float)e.fixation.Y + "', '" + (float)_FixationScrollTop.X + "', '" + (float)_FixationScrollTop.Y + "', '" + _FixationStartRID + "', '" + endid + "', '" + _FixationID + "'"; _DBSaver.GazeFixationInsert(value); _FixationID++; } } } }