示例#1
0
文件: Form1.cs 项目: abiasoli/Simon
 private void changeColorButton(Square square, Button button)
 {
     button.BackColor = square.ColourLit;
     refresh();
     pause();
     button.BackColor = square.Colour;
     refresh();
     pause();
 }
示例#2
0
文件: Manager.cs 项目: abiasoli/Simon
        private Square getSquare(int num)
        {
            Square square = null;
               switch (num)
               {
               case 1: square = new Square("btnRed", Color.RosyBrown, Color.Red); break;
               case 2: square = new Square("btnGreen", Color.Green, Color.LimeGreen); break;
               case 3: square = new Square("btnBlue", Color.DarkBlue, Color.Blue); break;
               case 4: square = new Square("btnYellow", Color.Olive, Color.Yellow); break;
               }

               return square;
        }
示例#3
0
文件: Manager.cs 项目: abiasoli/Simon
        public Square getSquare(String name)
        {
            Square square = null;
               switch (name)
               {
               case "btnRed": square = new Square("btnRed", Color.RosyBrown, Color.Red); break;
               case "btnGreen": square = new Square("btnGreen", Color.Green, Color.LimeGreen); break;
               case "btnBlue": square = new Square("btnBlue", Color.DarkBlue, Color.Blue); break;
               case "btnYellow": square = new Square("btnYellow", Color.Olive, Color.Yellow); break;
               }

               return square;
        }