Beispiel #1
0
        public Form_Management(TimerControl tc, FormDemo f1, FormCommands f2, EyeTracker_Management etmgt)
        {
            this.tc    = tc;
            this.f1    = f1;
            this.f2    = f2;
            this.etmgt = etmgt;
            //tc.timeMsTimer = 2000;
            //f1.maximunProgressBar = 2000;
            Form1SetUp();

            threadForm2 = new Thread(ThreadForm2SetUp);
            // allow UI with ApartmentState.STA though [STAThread] above should give that to you
            threadForm2.TrySetApartmentState(ApartmentState.STA);
            threadForm2.Start();

            //Form1SetUp();
        }
        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();
        }