예제 #1
0
        public WinFormsSample(EyeTrackingEngine eyeTrackingEngine)
        {
            InitializeComponent();

            _eyeTrackingEngine = eyeTrackingEngine;
            _eyeTrackingEngine.StateChanged += StateChanged;
            _eyeTrackingEngine.GazePoint    += GazePoint;
            _eyeTrackingEngine.Initialize();
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            try
            {
                using (_eyeTrackingEngine = new EyeTrackingEngine())
                {
                    Application.Run(new WinFormsSample(_eyeTrackingEngine));
                }
            }
            catch (EyeTrackerException e)
            {
                MessageBox.Show(e.Message, "Failed loading application!");
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString(), "Error!");
            }
        }