public EyeX() { InitializeComponent(); report = new ReportHelper(); start_btn.Enabled = false; //list of gazed points points = new GazePoint(); points.list = new List<PointF>(); points.times = new List<double>(); person = new Person(); //add eye-gaze interaction behaviors to the panels on the form. Program.EyeXHost.Connect(behaviorMap); behaviorMap.Add(main_panel, new GazeAwareBehavior(OnGaze)); //timer setings timer_pic = new Timer(); timer_pic.Interval = pause_duration; timer_pic.Tick += new EventHandler(this.timer_pic_Tick); timer_black = new Timer(); timer_black.Interval = scene_duration; timer_black.Tick += new EventHandler(this.timer_black_Tick); scene_numb.Text = scene_number.ToString(); scene_dur.Text = pause_duration.ToString(); pause_dur.Text = scene_duration.ToString(); }
private void timer_pic_Tick(object sender, System.EventArgs e) { if (h_counter == scene_number) { menu("show"); Cursor.Show(); timer_black.Stop(); timer_pic.Stop(); // saving report report.CreateReport(desktop + "\\results\\" + person.id.ToString(), scene_number, person); Properties.Settings.Default.id++; Properties.Settings.Default.Save(); start_btn.Enabled = false; age.Text = ""; h_counter = 0; set_counter = 0; return; } points = new GazePoint(); SetImages(h_counter); tracking = true; timer_black.Start(); timer_pic.Stop(); }