diff --git a/Online Gokkantoor/GUI_Gokkantoor/Gokspel.Designer.cs b/Online Gokkantoor/GUI_Gokkantoor/Gokspel.Designer.cs index 1e70e28..ef8ca6f 100644 --- a/Online Gokkantoor/GUI_Gokkantoor/Gokspel.Designer.cs +++ b/Online Gokkantoor/GUI_Gokkantoor/Gokspel.Designer.cs @@ -104,6 +104,7 @@ this.label3.Size = new System.Drawing.Size(35, 13); this.label3.TabIndex = 7; this.label3.Text = "label3"; + this.label3.Click += new System.EventHandler(this.label3_Click); // // label4 // diff --git a/Online Gokkantoor/GUI_Gokkantoor/Gokspel.cs b/Online Gokkantoor/GUI_Gokkantoor/Gokspel.cs index 8a70879..c75db01 100644 --- a/Online Gokkantoor/GUI_Gokkantoor/Gokspel.cs +++ b/Online Gokkantoor/GUI_Gokkantoor/Gokspel.cs @@ -1,4 +1,5 @@ -using Logic; +using Globals.classes; +using Logic; using System; using System.Collections.Generic; using System.ComponentModel; @@ -14,10 +15,12 @@ namespace GUI_Gokkantoor public partial class Gokspel : Form { public LogicLayer l; - public Gokspel(Logic.LogicLayer l) + public Person p; + public Gokspel(Logic.LogicLayer l, Person p) { - l = new LogicLayer(); + this.l = l; InitializeComponent(); + this.p = p; } private void label2_Click(object sender, EventArgs e) @@ -49,5 +52,10 @@ namespace GUI_Gokkantoor a.FormClosed += adminClosed; a.Show(); } + + private void label3_Click(object sender, EventArgs e) + { + + } } } diff --git a/Online Gokkantoor/GUI_Gokkantoor/Login.Designer.cs b/Online Gokkantoor/GUI_Gokkantoor/Login.Designer.cs index 790f4ae..02f7ba0 100644 --- a/Online Gokkantoor/GUI_Gokkantoor/Login.Designer.cs +++ b/Online Gokkantoor/GUI_Gokkantoor/Login.Designer.cs @@ -39,6 +39,7 @@ this.listBox1.Name = "listBox1"; this.listBox1.Size = new System.Drawing.Size(186, 186); this.listBox1.TabIndex = 0; + this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged); // // button1 // diff --git a/Online Gokkantoor/GUI_Gokkantoor/Login.cs b/Online Gokkantoor/GUI_Gokkantoor/Login.cs index 806b76c..5b71717 100644 --- a/Online Gokkantoor/GUI_Gokkantoor/Login.cs +++ b/Online Gokkantoor/GUI_Gokkantoor/Login.cs @@ -1,4 +1,5 @@ -using Logic; +using Globals.classes; +using Logic; using System; using System.Collections.Generic; using System.ComponentModel; @@ -18,11 +19,17 @@ namespace GUI_Gokkantoor { l = new LogicLayer(); InitializeComponent(); + listBox1.DataSource = l.persons; } private void button1_Click(object sender, EventArgs e) { - Gokspel a = new Gokspel(l); + Person p = (Person)listBox1.SelectedItem; + + + + + Gokspel a = new Gokspel(l,p); this.Hide(); a.FormClosed += adminClosed; a.Show(); @@ -31,5 +38,10 @@ namespace GUI_Gokkantoor { this.Show(); } + + private void listBox1_SelectedIndexChanged(object sender, EventArgs e) + { + + } } }