private void timer1_Tick_1(object sender, EventArgs e)
 {
     try{
         _TimerCount++;
         lblWaitingTime.Text = _TimerCount.ToString();
         if (_TimerCount == 13)
         {
             timer1.Stop();
             _TimerCount = 0;
             CustomerView frame3 = new CustomerView();
             frame3.ShowDialog();
             DisplayCashierQueue(CashierClass.CashierQueue.Dequeue());
             DisplayCashierQueue(CashierClass.CashierQueue);
         }
     }
     catch (System.InvalidOperationException) {
         this.Close();
     }
 }
示例#2
0
 private void timer1_Tick(object sender, EventArgs e)
 {
     try
     {
         _ticks++;
         lblTime.Text = _ticks.ToString();
         if (_ticks == 10)
         {
             timer1.Stop();
             _ticks = 0;
             CustomerView f3 = new CustomerView();
             f3.ShowDialog();
             DisplayCashierQueue(CashierClass.CashierQueue.Dequeue());
             DisplayCashierQueue(CashierClass.CashierQueue);
         }
     }
     catch (System.InvalidOperationException ex)
     {
         timer1.Stop();
         _ticks = 0;
         this.Close();
     }
 }