Example #1
0
 private void OnRestartClick(GameCompletedSelector ctrl)
 {
     ctrl.RestartClick    -= OnRestartClick;
     ctrl.PlayWinnerClick -= OnPlayWinnerClick;
     Controls.Remove(ctrl);
     Initialize();
 }
Example #2
0
 private void OnPlayWinnerClick(GameCompletedSelector ctrl)
 {
     ctrl.RestartClick    -= OnRestartClick;
     ctrl.PlayWinnerClick -= OnPlayWinnerClick;
     Controls.Remove(ctrl);
     m_ComponentManager.PlayWinner = true;
     StartGame();
 }
Example #3
0
        private void OnGameCompleted(GameViewer ctrl)
        {
            ctrl.GameCompleted -= OnGameCompleted;
            Controls.Remove(ctrl);
            Width  = m_OldWidth;
            Height = m_OldHeight;
            var gameCompletedSelector = new GameCompletedSelector();

            gameCompletedSelector.Dock             = DockStyle.Fill;
            gameCompletedSelector.RestartClick    += OnRestartClick;
            gameCompletedSelector.PlayWinnerClick += OnPlayWinnerClick;
            Controls.Add(gameCompletedSelector);
            CenterToScreen();
        }