static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); using (var engine = new EyeTrackingEngine()) { Application.Run(new DemoForm(engine)); } }
public DemoForm(EyeTrackingEngine engine) { InitializeComponent(); SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); _eyeTrackingEngine = engine; _eyeTrackingEngine.StateChanged += StateChanged; _eyeTrackingEngine.GazePoint += GazePoint; _eyeTrackingEngine.Initialize(); }