Example #1
0
        private void MainForm_Load_1(object sender, EventArgs e)
        {
            // настраиваем DataGridView
            GameField.RowTemplate.Height = CELL_SIZE;
            GameField.Font = new Font("Comic Sans MS", 12);
            DataGridViewUtils.InitGridForArr(GameField, CELL_SIZE, true, false, false, false, false);

            NewGameButton.PerformClick();
        }
Example #2
0
        public ControlPanel()
        {
            this.SuspendLayout();
            _newgame = new NewGameButton();
            this.Controls.Add(_newgame);

            _mineCtr = new MineCounter();
            this.Controls.Add(_mineCtr);

            _time = new TimeLabel();
            this.Controls.Add(_time);
            this.ResumeLayout();

            InitializeComponent();
            this.BackColor = Color.FromArgb(0, Color.White);
        }
Example #3
0
        private async Task AnimateUI(double toLogoY, double toButtonScale, double toAlpha, Easing easing)
        {
            const int AnimLength = 250;

            double logoy_target = toLogoY - Logo.Y;

            var backgroundanim = Background.FadeTo(toAlpha, AnimLength + (AnimLength / 2));
            var logoanim       = Logo.TranslateTo(0, logoy_target, AnimLength, easing);
            await Task.Delay(AnimLength / 2);

            var buttonanim = NewGameButton.ScaleTo(toButtonScale, AnimLength, easing);

            await logoanim;
            await buttonanim;
            await backgroundanim;
        }
    // Instantiate and display information on "NewGame/LoadGame" buttons
    public void BuildLoadGameSaveElements()
    {
        Debug.Log("BuildLoadGameSaveElements | number: " + SaveManager.instance.savedGameFilesNb);
        for (int i = 0; i < SaveManager.instance.savedGameFilesNb; i++)
        {
            //Debug.Log("BuildLoadGameSaveElement");

            // Instantiate NewGame button
            GameObject instantiatedNewGameButton = Instantiate(newGameButtonPrefab, Vector3.zero, Quaternion.identity);
            // Set its parent to the layout
            instantiatedNewGameButton.transform.SetParent(newGameButtonsLayout.transform, false);

            // Set parameters within
            NewGameButton ngb = instantiatedNewGameButton.GetComponent <NewGameButton>();
            ngb.SetInfo(i + 1, SaveManager.instance.globalSavedGameInfoData.saveFilesInfo[i], SaveManager.instance.globalGameSaveData[i]);

            // Add it to the list
            newGameButtonsList.Add(instantiatedNewGameButton);
        }
    }
Example #5
0
        void ReleaseDesignerOutlets()
        {
            if (HighScoreLabel != null)
            {
                HighScoreLabel.Dispose();
                HighScoreLabel = null;
            }

            if (NewGameButton != null)
            {
                NewGameButton.Dispose();
                NewGameButton = null;
            }

            if (ViewQuestionsButton != null)
            {
                ViewQuestionsButton.Dispose();
                ViewQuestionsButton = null;
            }
        }
Example #6
0
 public NewGameRetry()
 {
     InitializeComponent();
     NewGameButton.Select();
 }