WPF/MainWindow.xaml.cs
/// <summary>
/// Reload the canvas and window size based on game board
/// </summary>
Reload the canvas and window size based on game board
Reload the canvas and window size based on game board
private void UpdateGameScreen()
        {
            ctrlGameBoard.Width = ctrlGameBoard.Board.Columns * 16;
            ctrlGameBoard.Height = ctrlGameBoard.Board.Rows * 16;
            ctrlGameScreen.Width = ctrlGameBoard.Width + 10;
            ctrlGameScreen.Height = ctrlGameBoard.Height + 38;
            Width = ctrlGameScreen.Width + 2;
            Height = ctrlGameScreen.Height + 46;
            Canvas.SetLeft(ctrlFaceButton, ctrlGameScreen.Width / 2 - ctrlFaceButton.Width / 2);
            Canvas.SetLeft(ctrlCounter, ctrlGameScreen.Width - 5 - ctrlCounter.Width);
        }
private void UpdateGameScreen ( ) { ctrlGameBoard . Width = ctrlGameBoard . Board . Columns * 16 ; ctrlGameBoard . Height = ctrlGameBoard . Board . Rows * 16 ; ctrlGameScreen . Width = ctrlGameBoard . Width + 10 ; ctrlGameScreen . Height = ctrlGameBoard . Height + 38 ; Width = ctrlGameScreen . Width + 2 ; Height = ctrlGameScreen . Height + 46 ; Canvas . SetLeft ( ctrlFaceButton , ctrlGameScreen . Width / 2 - ctrlFaceButton . Width / 2 ) ; Canvas . SetLeft ( ctrlCounter , ctrlGameScreen . Width - 5 - ctrlCounter . Width ) ; }
Reload the canvas and window size based on game board
Reload the canvas and window size based on game board