Пример #1
0
 void sudoku_OnExit(object sender, SudokuExitEventArgs e)
 {
     Dispatcher.BeginInvoke(delegate()
     {
         if (e.Status == ExitStatus.Cancelled)
         {
             Status.Text = "Operation cancelled";
         }
         Oplossen.IsEnabled = true;
         Stoppen.IsEnabled  = false;
         sudoku.ShowValues();
     });
 }
Пример #2
0
 void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (OnExit != null)
     {
         SudokuExitEventArgs arg = new SudokuExitEventArgs();
         if (e.Cancelled)
         {
             arg.Status = ExitStatus.Cancelled;
         }
         else if (e.Error != null)
         {
             arg.Status = ExitStatus.Error;
         }
         else
         {
             arg.Status = ExitStatus.Completed;
         }
         OnExit(this, arg);
     }
 }