Example #1
0
 public void setSequence()
 {
     for(int i = 0; i < colorSequence.Length; i++){
         color = new Kleur(randomKleur());
         colorSequence[i] = color.getColor();
     }
 }
Example #2
0
 //public Array setRandomSequence()
 //{
 //    var random = new Random();
 //    for (int i = 0; i < 4; i++)
 //    {
 //        int randomInt = random.Next(6);
 //        color = new Kleur(randomInt);
 //        randomSequence[i] = color.getColor();
 //        string val = randomSequence[i];
 //        sequence[i].BackgroundImage = (Image)Properties.Resources.ResourceManager.GetObject(val);
 //    }
 //    return randomSequence;
 //}
 /*
 private void alert(int count, string colorSequence)
 {
     if(count == 4)
     {
         foreach (string item in colorSequence)
         {
             MessageBox.Show(item);
         }
     }
 }
 */
 public void blackbtn_Click(object sender, EventArgs e)
 {
     color = new Kleur(0);
     colorSequence[count] = color.getColor();
     //b = new Bitmap(@"..\kleuren\Dots\black.png");
     //sequence[count].BackgroundImage = b;
     guess[count].BackgroundImage = ((System.Drawing.Image)(Properties.Resources.black));
     //b.Dispose();
     count++;
 }
Example #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     //setRandomSequence();
     var random = new Random();
     for (int i = 0; i < 4; i++)
     {
         int randomInt = random.Next(6);
         color = new Kleur(randomInt);
         randomSequence[i] = color.getColor();
         string val = randomSequence[i];
         sequence[i].BackgroundImage = (Image)Properties.Resources.ResourceManager.GetObject(val);
     }
 }
Example #4
0
 private void yellowbtn_Click(object sender, EventArgs e)
 {
     color = new Kleur(5);
     colorSequence[count] = color.getColor();
     //b = new Bitmap(@"..\kleuren\Dots\yellow.png");
     //sequence[count].BackgroundImage = b;
     //b.Dispose();
     guess[count].BackgroundImage = ((System.Drawing.Image)(Properties.Resources.yellow));
     count++;
 }