WPF/MainWindow.xaml.cs
/// <summary>
/// This function will be called on win condition, congratulate the player here!
/// </summary>
This function will be called on win condition, congratulate the player here!
This function will be called on win condition congratulate the player here!
private void OnWin()
        {
            if (ctrlGameBoard.Board.Time < BestTimes[ctrlGameBoard.Board.Difficulty])
            {
                DlgCongrats dlg = new DlgCongrats
                {
                    Owner = this
                };
                dlg.ShowDialog();
                if (dlg.DialogResult == true)
                {
                    BestNames[ctrlGameBoard.Board.Difficulty] = dlg.txtName.Text;
                    BestTimes[ctrlGameBoard.Board.Difficulty] = ctrlGameBoard.Board.Time;
                    SaveSettings();
                    ShowFastestTimesDialog();
                }
            }
        }
private void OnWin ( ) { if ( ctrlGameBoard . Board . Time < BestTimes [ ctrlGameBoard . Board . Difficulty ] ) { DlgCongrats dlg = new DlgCongrats { Owner = this } ; dlg . ShowDialog ( ) ; if ( dlg . DialogResult == true ) { BestNames [ ctrlGameBoard . Board . Difficulty ] = dlg . txtName . Text ; BestTimes [ ctrlGameBoard . Board . Difficulty ] = ctrlGameBoard . Board . Time ; SaveSettings ( ) ; ShowFastestTimesDialog ( ) ; } } }
This function will be called on win condition, congratulate the player here!
This function will be called on win condition congratulate the player here!