Ejemplo n.º 1
0
 public PNNTestLoader(int InitialExposition, CycleControl Control)
 {
     _exposition = InitialExposition;
     _timer = new Timer();
     _timer.AutoReset = false;
     _timer.Interval = _exposition;
     _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
     _control = Control;
     _answers = new PNNAnswers();
     _currkey = PnnKeyType.AnyKey;
     _pauseTimer = new Timer();
     _pauseTimer.AutoReset = false;
     _pauseTimer.Interval = 200;//пауза между сигналами
     _pauseTimer.Elapsed += new ElapsedEventHandler(_pauseTimer_Elapsed);
 }
Ejemplo n.º 2
0
 void train_btn_start_Click(object sender, EventArgs e)
 {
     trainstartcontrol.Dispose();
     traincyclecontrol = new CycleControl();
     traincyclecontrol.Location = new Point(0, 27);
     traincyclecontrol.Dock = DockStyle.Fill;
     traincyclecontrol.KeyUp += new KeyEventHandler(traincyclecontrol_KeyUp);
     traincyclecontrol.KeyDown += new KeyEventHandler(traincyclecontrol_KeyDown);
     this.Controls.Add(traincyclecontrol);
     this.traincyclecontrol.Focus();
     //запускаем таймер
     _traintimer = new Timer();
     _traintimer.Interval = _traintime;
     _traintimer.Tick += new EventHandler(_traintimer_Tick);
     _traintimer.Start();
     trainloader = new PNNTestLoader(900, traincyclecontrol);
     trainloader.Start();
 }