public void stoellenkleinezaal(int rij, int nr, int personen)
{
Console.WriteLine("Opbouw");
int width = 30;
int height = 30;
Stoellenevents stoelevent = new Stoellenevents();
Image imgVrijeStoel = Image.FromFile("../../Image/stoelVrij.png");
Image imgSelectie = Image.FromFile("../../Image/stoelGeselecteerd.png");
Parallel.For(0, 10, r =>
{
Console.WriteLine("De rijen bouwen");
if (r == 0)
{
//x as (horizontaal) 1 stoel = 30 ruimte tussen de stoellen = 2
int x = 25 + 64;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65;
for (int s = 0; s < 13; s++)
{
Console.WriteLine("De stoellen opbouwen " + s + " " + nr + " " + r + " " + rij);
if (s.Equals(nr) && r.Equals(rij))
{
Console.WriteLine("Ja ik ben gelijk");
stoelevent.setstoellen(s, r, x, y, width, height, imgSelectie);
}
else
{
stoelevent.setstoellen(s, r, x, y, width, height, imgVrijeStoel);
}
x = x + 32;
}
}
if (r == 1)
{
//x as (horizontaal) 1 stoel = 30 ruimte tussen de stoellen = 2
int x = 25 + 96;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r);
for (int s = 0; s < 11; s++)
{
Console.WriteLine("De stoellen opbouwen " + s + " " + nr + " " + r + " " + rij);
if (s.Equals(nr) && r.Equals(rij))
{
Console.WriteLine("Ja ik ben gelijk");
stoelevent.setstoellen(s, r, x, y, width, height, imgSelectie);
}
else
{
stoelevent.setstoellen(s, r, x, y, width, height, imgVrijeStoel);
}
x = x + 32;
}
}
if (r == 2)
{
//x as (horizontaal) 1 stoel = 30 ruimte tussen de stoellen = 2
int x = 25 + 64;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r);
for (int s = 0; s < 12; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 3)
{
//x as (horizontaal)
int x = 25 + 64;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r);
for (int s = 0; s < 13; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 4)
{
//x as (horizontaal)
int x = 25 + 32;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r);
for (int s = 0; s < 14; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 5)
{
//x as (horizontaal)
int x = 25 + 32;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r);
for (int s = 0; s < 13; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 6)
{
//x as (horizontaal)
int x = 25 + 32;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r);
for (int s = 0; s < 13; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 7)
{
//x as (horizontaal)
int x = 25;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r) + 15;
for (int s = 0; s < 15; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 8)
{
//x as (horizontaal)
int x = 25;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r) + 15;
for (int s = 0; s < 16; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
if (r == 9)
{
//x as (horizontaal)
int x = 25 + 32;
//y as (verticaal) = elke rij + 30 + gangpad (5)
int y = 65 + (35 * r) + 15;
for (int s = 0; s < 15; s++)
{
stoelevent.setstoellen(s + 1, r, x, y, width, height, imgVrijeStoel);
x = x + 32;
}
}
});
foreach (Kassasysteem.Controll.Stoellenevents.Stoellen stoel in stoelevent.getLijst())
{
stoel.Click += new EventHandler(Stoel_Click);
zalenpanel.Controls.Add(stoel);
}
}