public DammyPoints(int picpage) { _gazePointsform = new GazePointsForm(); pb = new PictureBox[N]; lb = new Label[N]; for (int i = 0; i < N; i++) { pb[i] = new PictureBox(); //picturebox lb[i] = new Label(); } list = new int[N]; string now = DateTime.Now.ToString("yyMMddhhmmss"); string csvname = String.Format("./dammy/{0}.csv", now); swt = new StreamWriter(csvname); string listname = String.Format("./dammy/{0}.list", now); swtlist = new StreamWriter(listname); StreamWriter listwriter = new StreamWriter("./dammy/timestamp.list", true); listwriter.WriteLine(now); listwriter.Close(); makelist(list, picpage); for (int i = 0; i < N; i++) { pb[i].SizeMode = PictureBoxSizeMode.StretchImage; string filename = String.Format("../../images/{0}.jpg", list[i]); pb[i].Image = new Bitmap(filename); pb[i].Size = new Size(monitorSize.Width / cN, monitorSize.Height / vN); int Ly = i / cN; int Lx = i - Ly * cN; pb[i].Location = new Point(monitorSize.Width * Lx / cN, monitorSize.Height * Ly / vN); //pb[i].MouseMove += new MouseEventHandler(_gazePointsform_MouseMove); pb[i].Click += new EventHandler(pb_Click); pb[i].Parent = _gazePointsform; //picturebox pb[i].Hide(); lb[i].Text = String.Format("{0}", i + 1); lb[i].Font = new Font("Arial", 30); lb[i].Size = new Size(monitorSize.Width / cN / 4, monitorSize.Height / vN / 4); lb[i].Location = new Point(10, 10); lb[i].Parent = pb[i]; lb[i].Hide(); } _sleeptimer1 = new Timer(); _sleeptimer1.Interval = 50; _sleeptimer1.Tick += new EventHandler(_sleeptimer1_Tick); _sleeptimer2 = new Timer(); // _sleeptimer2.Interval = 60000; _sleeptimer2.Interval = 5000; _sleeptimer2.Tick += new EventHandler(_sleeptimer2_Tick); _sleeptimer3 = new Timer(); _sleeptimer3.Interval = 50; _sleeptimer3.Tick += new EventHandler(_sleeptimer3_Tick); sw = new Stopwatch(); }