ui nog wa aanpasse en we zijn gucci

This commit is contained in:
Beppe Vanrolleghem
2019-08-12 18:15:17 +02:00
parent fb078ec1d8
commit 582c3f7244
27 changed files with 225 additions and 352 deletions

View File

@@ -83,6 +83,7 @@
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(120, 95);
this.listBox1.TabIndex = 4;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged);
//
// label1
//
@@ -106,6 +107,7 @@
this.Controls.Add(this.button1);
this.Name = "Admin";
this.Text = "Admin";
this.Load += new System.EventHandler(this.Admin_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@@ -16,7 +16,7 @@ namespace GUI_Gokkantoor
public LogicLayer l;
public Admin(LogicLayer l)
{
l = new LogicLayer();
this.l = l;
InitializeComponent();
}
@@ -55,5 +55,15 @@ namespace GUI_Gokkantoor
a.FormClosed += adminClosed;
a.Show();
}
private void Admin_Load(object sender, EventArgs e)
{
listBox1.DataSource = l.GetGames();
}
private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}

View File

@@ -0,0 +1 @@
{"persons":[{"Id":0,"name":"John","lastname":"Smith","adress":"123","gsm":"456","balance":789.0}],"bets":[],"ploegen":[],"games":[],"ploegInMatches":[]}

View File

@@ -147,10 +147,7 @@
<EmbeddedResource Include="User.resx">
<DependentUpon>User.cs</DependentUpon>
</EmbeddedResource>
<None Include="Data\bets.json" />
<None Include="Data\games.json" />
<None Include="Data\persons.json" />
<None Include="Data\ploegen.json" />
<None Include="Data\db.json" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>

View File

@@ -47,6 +47,7 @@
this.ListMatch.Name = "ListMatch";
this.ListMatch.Size = new System.Drawing.Size(120, 95);
this.ListMatch.TabIndex = 0;
this.ListMatch.SelectedIndexChanged += new System.EventHandler(this.ListMatch_SelectedIndexChanged);
//
// ListGokken
//
@@ -150,6 +151,7 @@
this.Controls.Add(this.ListMatch);
this.Name = "Gokspel";
this.Text = "Gokspel";
this.Load += new System.EventHandler(this.Gokspel_Load);
this.ResumeLayout(false);
this.PerformLayout();

View File

@@ -57,5 +57,15 @@ namespace GUI_Gokkantoor
{
}
private void Gokspel_Load(object sender, EventArgs e)
{
}
private void ListMatch_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}

View File

@@ -19,8 +19,7 @@ namespace GUI_Gokkantoor
{
this.l = l;
InitializeComponent();
listBox1.DataSource = l.persons;
listBox1.DataSource = l.persons;
listBox1.DataSource = l.GetPeople();
}

View File

@@ -57,6 +57,7 @@
this.button1.TabIndex = 2;
this.button1.Text = "Toevoegen";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// Team
//

View File

@@ -16,5 +16,10 @@ namespace GUI_Gokkantoor
{
InitializeComponent();
}
private void Button1_Click(object sender, EventArgs e)
{
}
}
}

View File

@@ -28,11 +28,11 @@
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.naam = new System.Windows.Forms.TextBox();
this.achternaam = new System.Windows.Forms.TextBox();
this.adres = new System.Windows.Forms.TextBox();
this.gsm = new System.Windows.Forms.TextBox();
this.balans = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
@@ -41,40 +41,40 @@
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
// naam
//
this.textBox1.Location = new System.Drawing.Point(281, 92);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 20);
this.textBox1.TabIndex = 0;
this.naam.Location = new System.Drawing.Point(281, 92);
this.naam.Name = "naam";
this.naam.Size = new System.Drawing.Size(100, 20);
this.naam.TabIndex = 0;
//
// textBox2
// achternaam
//
this.textBox2.Location = new System.Drawing.Point(281, 118);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 20);
this.textBox2.TabIndex = 1;
this.achternaam.Location = new System.Drawing.Point(281, 118);
this.achternaam.Name = "achternaam";
this.achternaam.Size = new System.Drawing.Size(100, 20);
this.achternaam.TabIndex = 1;
//
// textBox3
// adres
//
this.textBox3.Location = new System.Drawing.Point(281, 145);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(100, 20);
this.textBox3.TabIndex = 2;
this.adres.Location = new System.Drawing.Point(281, 145);
this.adres.Name = "adres";
this.adres.Size = new System.Drawing.Size(100, 20);
this.adres.TabIndex = 2;
//
// textBox4
// gsm
//
this.textBox4.Location = new System.Drawing.Point(281, 170);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(100, 20);
this.textBox4.TabIndex = 3;
this.gsm.Location = new System.Drawing.Point(281, 170);
this.gsm.Name = "gsm";
this.gsm.Size = new System.Drawing.Size(100, 20);
this.gsm.TabIndex = 3;
//
// textBox5
// balans
//
this.textBox5.Location = new System.Drawing.Point(281, 196);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(100, 20);
this.textBox5.TabIndex = 4;
this.balans.Location = new System.Drawing.Point(281, 196);
this.balans.Name = "balans";
this.balans.Size = new System.Drawing.Size(100, 20);
this.balans.TabIndex = 4;
//
// label1
//
@@ -130,6 +130,7 @@
this.button1.TabIndex = 10;
this.button1.Text = "Toevoegen";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// User
//
@@ -142,11 +143,11 @@
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.balans);
this.Controls.Add(this.gsm);
this.Controls.Add(this.adres);
this.Controls.Add(this.achternaam);
this.Controls.Add(this.naam);
this.Name = "User";
this.Text = "User";
this.ResumeLayout(false);
@@ -156,11 +157,11 @@
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox naam;
private System.Windows.Forms.TextBox achternaam;
private System.Windows.Forms.TextBox adres;
private System.Windows.Forms.TextBox gsm;
private System.Windows.Forms.TextBox balans;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;

View File

@@ -1,4 +1,5 @@
using System;
using Logic;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -12,14 +13,29 @@ namespace GUI_Gokkantoor
{
public partial class User : Form
{
LogicLayer l;
public User(Logic.LogicLayer l)
{
InitializeComponent();
this.l = l;
}
private void label4_Click(object sender, EventArgs e)
{
}
private void Button1_Click(object sender, EventArgs e)
{
try
{
l.addPerson(new Globals.classes.Person(naam.Text, achternaam.Text, adres.Text, gsm.Text, double.Parse(balans.Text)));
l.save();
} catch (Exception ex)
{
// geen correcte double ingegeven wss. niet vergeten popup te schrijven.
}
}
}
}