public WinFormsSample(EyeTrackingEngine eyeTrackingEngine) { InitializeComponent(); _eyeTrackingEngine = eyeTrackingEngine; _eyeTrackingEngine.StateChanged += StateChanged; _eyeTrackingEngine.GazePoint += GazePoint; _eyeTrackingEngine.Initialize(); }
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!"); } }