public void setSequence() { for(int i = 0; i < colorSequence.Length; i++){ color = new Kleur(randomKleur()); colorSequence[i] = color.getColor(); } }
//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++; }
public Dot(int number) { Size grootte = DOT_SIZE; color = new Kleur(number); color.setColor(number); }
public Checkdot(int number) { color = new Kleur(number); }
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); } }
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++; }