コード例 #1
0
 /// <summary>
 /// Open Sudoku
 /// </summary>
 /// <param name="sender">The object that initiated the event.</param>
 /// <param name="e">The event arguments for the event.</param>
 private void SudokuButton_Click(object sender, RoutedEventArgs e)
 {
     if (this.sudoku == null)
     {
         this.sudoku = new SudokuGame.MainWindow();
         this.sudoku.Show();
     }
     else
     {
         this.sudoku.Focus();
         if (this.sudoku.IsActive == false)
         {
             this.sudoku = new SudokuGame.MainWindow();
             this.sudoku.Show();
         }
     }
 }
コード例 #2
0
 /// <summary>
 /// Click event that starts a new form
 /// </summary>
 /// <param name="sender">The object that initiated the event.</param>
 /// <param name="e">The event arguments for the event.</param>
 private void BtnSudoku_Click(object sender, RoutedEventArgs e)
 {
     // use to show the form for the sudoku game.
     SudokuGame.MainWindow sudoku = new SudokuGame.MainWindow();
     sudoku.ShowDialog();
 }