Example #1
0
        public void CreateFlag(object sender)
        {
            contentChecker = new ContentChecker();
            Button button = (Button)sender;

            if (contentChecker.IsUncovered(button))
            {
                return;
            }
            switch (MouseButtons)
            {
            case MouseButtons.Right:
                if (button.Text == "!")
                {
                    button.ForeColor = System.Drawing.Color.Black;
                    button.Text      = " ";
                }
                else
                {
                    button.ForeColor = System.Drawing.Color.OrangeRed;
                    button.Text      = "!";
                }
                break;
            }
        }
Example #2
0
 public void InitGameplay(List <Button> buttons, Label label, System.Windows.Forms.Timer timer)
 {
     mines = new Mines();
     mines.initMines();
     stopwatch           = new Stopwatch();
     this.buttons        = buttons;
     this.label          = label;
     this.timer          = timer;
     this.contentChecker = contentChecker;
 }