public EyeTracker_Management(MouseManagement mmgt, TimerBlinkManagement tbm, EyeTrackerDataManagement etdm)
        {
            this.tbm  = tbm;
            this.mmgt = mmgt;
            this.etdm = etdm;

            eyeXHost = new EyeXHost();
            eyeXHost.Start();

            lightlyFilteredGazeDataStream       = eyeXHost.CreateGazePointDataStream(GazePointDataMode.LightlyFiltered);
            lightlyFilteredGazeDataStream.Next += (s, e) => this.OnGazeDataStream(s, e);

            eyeXHost.GazeTrackingChanged += (s, e) => etdm.OnGazeTrackingChangedEvent(s, e);

            etdm.GazeNotTracked += (s, e) => this.OnGazeNotTracked();
            etdm.GazeTracked    += (s, e) => this.OnGazeTracked();

            tbm.AllowingCursorToMove += (s, e) => mmgt.setIsCursorAllowedToMove(true);

            mmgt.CursorAllowedToMoveChanged += (s, e) => this.OnCursorAllowedToMoveChanged(new CustomEventArgs(e.BooleanValue));
            etdm.CursorInBottomMidlleScreen += (s, e) => this.OnCursorInBottomMidlleScreen(new EventArgs());
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            EyeTrackerDataManagement etdmgt = new EyeTrackerDataManagement();
            MouseManagement          mmgt   = new MouseManagement();
            TimerBlinkManagement     tbmgt  = new TimerBlinkManagement();

            EyeTracker_Management etmgt = new EyeTracker_Management(mmgt, tbmgt, etdmgt);


            FormDemo     f1 = new FormDemo();
            FormCommands f2 = new FormCommands();
            TimerControl tc = new TimerControl();

            Form_Management fmgt = new Form_Management(tc, f1, f2, etmgt);


            Application.Run(fmgt);

            Console.WriteLine("fermeture programme");
            etmgt.Close_EyeTracker_Management();
        }
 public void setEyeTrackerDataManagement(EyeTrackerDataManagement etdm)
 {
     this.etdm = etdm;
 }