예제 #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;
        }