コード例 #1
0
 private void OnRestartClick(GameCompletedSelector ctrl)
 {
     ctrl.RestartClick    -= OnRestartClick;
     ctrl.PlayWinnerClick -= OnPlayWinnerClick;
     Controls.Remove(ctrl);
     Initialize();
 }
コード例 #2
0
 private void OnPlayWinnerClick(GameCompletedSelector ctrl)
 {
     ctrl.RestartClick    -= OnRestartClick;
     ctrl.PlayWinnerClick -= OnPlayWinnerClick;
     Controls.Remove(ctrl);
     m_ComponentManager.PlayWinner = true;
     StartGame();
 }
コード例 #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();
        }