예제 #1
0
        ///////////////////////////////////////////////////////////////////////////////
        // Eventhandler                                                              //
        ///////////////////////////////////////////////////////////////////////////////
        #region EVENTS

        ///////////////////////////////////////////////////////////////////////////////
        // Eventhandler for UI, Menu, Buttons, Toolbars etc.                         //
        ///////////////////////////////////////////////////////////////////////////////
        #region WINDOWSEVENTHANDLER
        #endregion //WINDOWSEVENTHANDLER

        ///////////////////////////////////////////////////////////////////////////////
        // Eventhandler for Custom Defined Events                                    //
        ///////////////////////////////////////////////////////////////////////////////
        #region CUSTOMEVENTHANDLER

        /// <summary>
        /// Is called whenever new raw data is available,
        /// adds the timestamp to the data and sends the <see cref="GazeDataChanged"/>
        /// event.
        /// </summary>
        /// <param name="x">A <see cref="Double"/> with the x coordinate of
        /// the new gaze position.</param>
        /// <param name="y">A <see cref="Double"/> with the y coordinate of
        /// the new gaze position.</param>
        protected void GazeDataRaw_OnNewGazeData(double x, double y)
        {
            OgamaGazeData newGazeData = new OgamaGazeData();

            newGazeData.Time     = this.stopWatch.ElapsedMilliseconds;
            newGazeData.GazePosX = (float)x;
            newGazeData.GazePosY = (float)y;

            if (this.GazeDataChanged != null)
            {
                this.GazeDataChanged(this, new OgamaGazeDataChangedEventArgs(newGazeData));
            }
        }
예제 #2
0
        ///////////////////////////////////////////////////////////////////////////////
        // Construction and Initializing methods                                     //
        ///////////////////////////////////////////////////////////////////////////////
        #region CONSTRUCTION

        /// <summary>
        /// Initializes a new instance of the OgamaGazeDataChangedEventArgs class.
        /// </summary>
        /// <param name="newGazedata">The gaze data as a <see cref="GazeData"/> value.</param>
        public OgamaGazeDataChangedEventArgs(OgamaGazeData newGazedata)
        {
            this.gazedata = newGazedata;
        }