This commit is contained in:
Michiel.VanDorpe
2019-03-13 16:37:03 +01:00
parent 10cdcbbd00
commit 60eb72bd30
99 changed files with 5061 additions and 1 deletions

View File

@@ -0,0 +1,393 @@
namespace Online_Gokkantoor
{
partial class Aanmeldscherm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.titel = new System.Windows.Forms.Label();
this.voornaam = new System.Windows.Forms.Label();
this.naam = new System.Windows.Forms.Label();
this.textVoornaam = new System.Windows.Forms.TextBox();
this.textNaam = new System.Windows.Forms.TextBox();
this.adres = new System.Windows.Forms.Label();
this.textAdres = new System.Windows.Forms.TextBox();
this.textGsm = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.labelMatch = new System.Windows.Forms.Label();
this.comboKeuze = new System.Windows.Forms.ComboBox();
this.labelThuisploeg = new System.Windows.Forms.Label();
this.labelGelijk = new System.Windows.Forms.Label();
this.labelUitploeg = new System.Windows.Forms.Label();
this.buttonGokken = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.textInzet = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.gebruikersBox = new System.Windows.Forms.ListBox();
this.matchbox = new System.Windows.Forms.ListBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
this.labelError = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.labelWinst = new System.Windows.Forms.Label();
this.euroTeken = new System.Windows.Forms.Label();
this.buttonCloneGebruiker = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// titel
//
this.titel.AutoSize = true;
this.titel.Location = new System.Drawing.Point(576, 40);
this.titel.Name = "titel";
this.titel.Size = new System.Drawing.Size(94, 13);
this.titel.TabIndex = 0;
this.titel.Text = "Vul je gegevens in";
//
// voornaam
//
this.voornaam.AutoSize = true;
this.voornaam.Location = new System.Drawing.Point(443, 59);
this.voornaam.Name = "voornaam";
this.voornaam.Size = new System.Drawing.Size(55, 13);
this.voornaam.TabIndex = 1;
this.voornaam.Text = "Voornaam";
//
// naam
//
this.naam.AutoSize = true;
this.naam.Location = new System.Drawing.Point(463, 84);
this.naam.Name = "naam";
this.naam.Size = new System.Drawing.Size(35, 13);
this.naam.TabIndex = 2;
this.naam.Text = "Naam";
//
// textVoornaam
//
this.textVoornaam.Location = new System.Drawing.Point(519, 56);
this.textVoornaam.Name = "textVoornaam";
this.textVoornaam.Size = new System.Drawing.Size(225, 20);
this.textVoornaam.TabIndex = 3;
//
// textNaam
//
this.textNaam.Location = new System.Drawing.Point(519, 81);
this.textNaam.Name = "textNaam";
this.textNaam.Size = new System.Drawing.Size(225, 20);
this.textNaam.TabIndex = 4;
//
// adres
//
this.adres.AutoSize = true;
this.adres.Location = new System.Drawing.Point(463, 109);
this.adres.Name = "adres";
this.adres.Size = new System.Drawing.Size(34, 13);
this.adres.TabIndex = 5;
this.adres.Text = "Adres";
//
// textAdres
//
this.textAdres.Location = new System.Drawing.Point(519, 106);
this.textAdres.Name = "textAdres";
this.textAdres.Size = new System.Drawing.Size(225, 20);
this.textAdres.TabIndex = 6;
//
// textGsm
//
this.textGsm.Location = new System.Drawing.Point(519, 132);
this.textGsm.Name = "textGsm";
this.textGsm.Size = new System.Drawing.Size(225, 20);
this.textGsm.TabIndex = 7;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(470, 135);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(28, 13);
this.label1.TabIndex = 8;
this.label1.Text = "Gsm";
//
// labelMatch
//
this.labelMatch.AutoSize = true;
this.labelMatch.Location = new System.Drawing.Point(179, 238);
this.labelMatch.Name = "labelMatch";
this.labelMatch.Size = new System.Drawing.Size(108, 13);
this.labelMatch.TabIndex = 9;
this.labelMatch.Text = "Geselecteerde match";
//
// comboKeuze
//
this.comboKeuze.FormattingEnabled = true;
this.comboKeuze.Location = new System.Drawing.Point(293, 233);
this.comboKeuze.Name = "comboKeuze";
this.comboKeuze.Size = new System.Drawing.Size(121, 21);
this.comboKeuze.TabIndex = 10;
//
// labelThuisploeg
//
this.labelThuisploeg.AutoSize = true;
this.labelThuisploeg.Location = new System.Drawing.Point(516, 238);
this.labelThuisploeg.Name = "labelThuisploeg";
this.labelThuisploeg.Size = new System.Drawing.Size(59, 13);
this.labelThuisploeg.TabIndex = 11;
this.labelThuisploeg.Text = "Thuisploeg";
//
// labelGelijk
//
this.labelGelijk.AutoSize = true;
this.labelGelijk.Location = new System.Drawing.Point(619, 238);
this.labelGelijk.Name = "labelGelijk";
this.labelGelijk.Size = new System.Drawing.Size(33, 13);
this.labelGelijk.TabIndex = 12;
this.labelGelijk.Text = "Gelijk";
//
// labelUitploeg
//
this.labelUitploeg.AutoSize = true;
this.labelUitploeg.Location = new System.Drawing.Point(698, 236);
this.labelUitploeg.Name = "labelUitploeg";
this.labelUitploeg.Size = new System.Drawing.Size(46, 13);
this.labelUitploeg.TabIndex = 13;
this.labelUitploeg.Text = "Uitploeg";
//
// buttonGokken
//
this.buttonGokken.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.buttonGokken.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.buttonGokken.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonGokken.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.buttonGokken.Location = new System.Drawing.Point(339, 367);
this.buttonGokken.Name = "buttonGokken";
this.buttonGokken.Size = new System.Drawing.Size(75, 23);
this.buttonGokken.TabIndex = 14;
this.buttonGokken.Text = "GOKKEN";
this.buttonGokken.UseVisualStyleBackColor = false;
this.buttonGokken.Click += new System.EventHandler(this.knopGokken);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(257, 290);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(30, 13);
this.label2.TabIndex = 16;
this.label2.Text = "Inzet";
//
// textInzet
//
this.textInzet.Location = new System.Drawing.Point(293, 283);
this.textInzet.Name = "textInzet";
this.textInzet.Size = new System.Drawing.Size(90, 20);
this.textInzet.TabIndex = 17;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(578, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(92, 13);
this.label3.TabIndex = 19;
this.label3.Text = "Nieuwe Gebruiker";
//
// button2
//
this.button2.Location = new System.Drawing.Point(581, 158);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(163, 28);
this.button2.TabIndex = 20;
this.button2.Text = "Gebruiker Toevoegen";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.knopGebruikerToevoegen);
//
// gebruikersBox
//
this.gebruikersBox.FormattingEnabled = true;
this.gebruikersBox.Location = new System.Drawing.Point(13, 40);
this.gebruikersBox.Name = "gebruikersBox";
this.gebruikersBox.Size = new System.Drawing.Size(274, 160);
this.gebruikersBox.TabIndex = 21;
this.gebruikersBox.SelectedIndexChanged += new System.EventHandler(this.GebruikersBox_SelectedIndexChanged);
//
// matchbox
//
this.matchbox.FormattingEnabled = true;
this.matchbox.Location = new System.Drawing.Point(13, 230);
this.matchbox.Name = "matchbox";
this.matchbox.Size = new System.Drawing.Size(160, 160);
this.matchbox.TabIndex = 22;
this.matchbox.SelectedIndexChanged += new System.EventHandler(this.matchbox_SelectedIndexChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(61, 13);
this.label4.TabIndex = 23;
this.label4.Text = "Gebruikers:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(10, 214);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(49, 13);
this.label5.TabIndex = 24;
this.label5.Text = "Matchen";
//
// button3
//
this.button3.Location = new System.Drawing.Point(713, 415);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 25;
this.button3.Text = "exit";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.knopExit);
//
// labelError
//
this.labelError.AutoSize = true;
this.labelError.Location = new System.Drawing.Point(524, 167);
this.labelError.Name = "labelError";
this.labelError.Size = new System.Drawing.Size(0, 13);
this.labelError.TabIndex = 26;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(309, 56);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(37, 13);
this.label6.TabIndex = 27;
this.label6.Text = "Winst:";
//
// labelWinst
//
this.labelWinst.AutoSize = true;
this.labelWinst.Location = new System.Drawing.Point(309, 88);
this.labelWinst.Name = "labelWinst";
this.labelWinst.Size = new System.Drawing.Size(0, 13);
this.labelWinst.TabIndex = 28;
//
// euroTeken
//
this.euroTeken.AutoSize = true;
this.euroTeken.Location = new System.Drawing.Point(389, 290);
this.euroTeken.Name = "euroTeken";
this.euroTeken.Size = new System.Drawing.Size(13, 13);
this.euroTeken.TabIndex = 29;
this.euroTeken.Text = "€";
//
// buttonCloneGebruiker
//
this.buttonCloneGebruiker.Location = new System.Drawing.Point(293, 177);
this.buttonCloneGebruiker.Name = "buttonCloneGebruiker";
this.buttonCloneGebruiker.Size = new System.Drawing.Size(90, 23);
this.buttonCloneGebruiker.TabIndex = 30;
this.buttonCloneGebruiker.Text = "Clone Gebruiker";
this.buttonCloneGebruiker.UseVisualStyleBackColor = true;
this.buttonCloneGebruiker.Click += new System.EventHandler(this.buttonCloneGebruiker_Click);
//
// Aanmeldscherm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.buttonCloneGebruiker);
this.Controls.Add(this.euroTeken);
this.Controls.Add(this.labelWinst);
this.Controls.Add(this.label6);
this.Controls.Add(this.labelError);
this.Controls.Add(this.button3);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.matchbox);
this.Controls.Add(this.gebruikersBox);
this.Controls.Add(this.button2);
this.Controls.Add(this.label3);
this.Controls.Add(this.textInzet);
this.Controls.Add(this.label2);
this.Controls.Add(this.buttonGokken);
this.Controls.Add(this.labelUitploeg);
this.Controls.Add(this.labelGelijk);
this.Controls.Add(this.labelThuisploeg);
this.Controls.Add(this.comboKeuze);
this.Controls.Add(this.labelMatch);
this.Controls.Add(this.label1);
this.Controls.Add(this.textGsm);
this.Controls.Add(this.textAdres);
this.Controls.Add(this.adres);
this.Controls.Add(this.textNaam);
this.Controls.Add(this.textVoornaam);
this.Controls.Add(this.naam);
this.Controls.Add(this.voornaam);
this.Controls.Add(this.titel);
this.Name = "Aanmeldscherm";
this.Text = "Aanmeldscherm";
this.Load += new System.EventHandler(this.Aanmeldscherm_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label titel;
private System.Windows.Forms.Label voornaam;
private System.Windows.Forms.Label naam;
private System.Windows.Forms.TextBox textVoornaam;
private System.Windows.Forms.TextBox textNaam;
private System.Windows.Forms.Label adres;
private System.Windows.Forms.TextBox textAdres;
private System.Windows.Forms.TextBox textGsm;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label labelMatch;
private System.Windows.Forms.ComboBox comboKeuze;
private System.Windows.Forms.Label labelThuisploeg;
private System.Windows.Forms.Label labelGelijk;
private System.Windows.Forms.Label labelUitploeg;
private System.Windows.Forms.Button buttonGokken;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textInzet;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.ListBox gebruikersBox;
private System.Windows.Forms.ListBox matchbox;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Label labelError;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label labelWinst;
private System.Windows.Forms.Label euroTeken;
private System.Windows.Forms.Button buttonCloneGebruiker;
}
}

View File

@@ -0,0 +1,195 @@
using DataLaag;
using LogicLayer;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Online_Gokkantoor
{
public partial class Aanmeldscherm : Form
{
private int[] persoonID;
private int[] wedstrijdID;
private General g;
private List<Persoon> personen = new List<Persoon>();
private string[] uitkomsten = { "Uitploeg", "Gelijk", "Thuisploeg" };
public Aanmeldscherm()
{
InitializeComponent();
try
{
g = new General();
g.Deserialize();
UpdateUI();
}
catch (System.NullReferenceException probleem)
{
Debug.WriteLine(probleem);
}
catch (Exception e )
{
System.Windows.Forms.MessageBox.Show(e + "");
}
}
private void UpdateUI()
{
gebruikersBox.DataSource = g.GetGebruikers();
matchbox.DataSource = g.GetWedstrijden();
persoonID = g.GetPersoonID();
wedstrijdID = g.GetWedstrijdID();
labelError.Text = "";
}
private void Save()
{
string nieuw = JsonConvert.SerializeObject(personen);
Debug.WriteLine(nieuw);
}
private string RandomGok()
{
Random randm = new Random();
int willekeurigeGok = randm.Next(0, 2);
return uitkomsten[willekeurigeGok];
}
private void knopGokken(object sender, EventArgs e)
{
try
{
int gebruikerID = persoonID[gebruikersBox.SelectedIndex];
int matchID = wedstrijdID[matchbox.SelectedIndex];
g.PlaatsGok(matchID, gebruikerID, Double.Parse(textInzet.Text), comboKeuze.Items[comboKeuze.SelectedIndex].ToString());
}
catch (System.NullReferenceException probleem)
{
Debug.WriteLine(probleem);
}
catch (System.ArgumentOutOfRangeException)
{
System.Windows.Forms.MessageBox.Show("Zorg ervoor dat een geldige gebruiker, match en uitkomst geselecteerd zijn.");
}
catch (System.FormatException error)
{
System.Windows.Forms.MessageBox.Show($"Kan {textInzet.Text} niet omzetten naar double");
}
catch (Exception e2)
{
System.Windows.Forms.MessageBox.Show(e2 + "");
}
}
private void matchbox_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
labelMatch.Text = (string)this.matchbox.SelectedItem;
List<string> geld = g.GetGeldVerdubbeling(wedstrijdID[matchbox.SelectedIndex]);
labelThuisploeg.Text = "Thuisploeg:" + geld[0];
labelGelijk.Text = "Gelijk:" + geld[1];
labelUitploeg.Text = "Uitploeg:" + geld[2];
}
catch (System.NullReferenceException probleem)
{
Debug.WriteLine(probleem);
}
catch (Exception exceptie)
{
System.Windows.Forms.MessageBox.Show(exceptie + "");
}
//UpdateUI();
}
private void Aanmeldscherm_Load(object sender, EventArgs e)
{
labelThuisploeg.Text = "Thuisploeg:";
labelGelijk.Text = "Gelijk:";
labelUitploeg.Text = "Uitploeg:";
foreach(string s in uitkomsten)
{
comboKeuze.Items.Add(s);
}
}
private void GebruikersBox_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
int ID = persoonID[gebruikersBox.SelectedIndex];
labelWinst.Text = g.GetWinst(ID) + "€";
}
catch (System.NullReferenceException probleem)
{
Debug.WriteLine(probleem);
}
catch (Exception e1)
{
System.Windows.Forms.MessageBox.Show(e1 + "");
}
}
private void knopGebruikerToevoegen(object sender, EventArgs e)
{
string tmp = "";
if (textVoornaam.Text.Length == 0) tmp+= "\n een voornaam";
if (textNaam.Text.Length == 0) tmp += "\n een naam";
if (textAdres.Text.Length == 0) tmp += "\n een adres";
if (textGsm.Text.Length == 0) tmp += "\n een gsm nummer";
if (tmp.Length > 0)
{
System.Windows.Forms.MessageBox.Show($"Please geef volgende argumenten: {tmp}");
return;
}
try
{
g.GebruikerToevoegen(textVoornaam.Text, textNaam.Text, textAdres.Text, textGsm.Text);
UpdateUI();
}
catch (System.NullReferenceException probleem)
{
Debug.WriteLine(probleem);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex + "");
}
}
private void knopExit(object sender, EventArgs e)
{
UpdateUI();
g.Serialize();
this.Close();
}
private void buttonCloneGebruiker_Click(object sender, EventArgs e)
{
try
{
g.ClonePersoon(persoonID[gebruikersBox.SelectedIndex]);
UpdateUI();
}
catch(Exception except)
{
System.Windows.Forms.MessageBox.Show(except + "");
UpdateUI(); //fix de ui omdat de lijst van indexen gebroken is.
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
</startup>
</configuration>

View File

@@ -0,0 +1,39 @@
namespace Online_Gokkantoor
{
partial class NieuweMatch
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Text = "NieuweMatch";
}
#endregion
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Online_Gokkantoor
{
public partial class NieuweMatch : Form
{
public NieuweMatch()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>Online_Gokkantoor</RootNamespace>
<AssemblyName>Online Gokkantoor</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Aanmeldscherm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Aanmeldscherm.Designer.cs">
<DependentUpon>Aanmeldscherm.cs</DependentUpon>
</Compile>
<Compile Include="NieuweMatch.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NieuweMatch.Designer.cs">
<DependentUpon>NieuweMatch.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Aanmeldscherm.resx">
<DependentUpon>Aanmeldscherm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Voorstel_COO.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DataLaag\DataLaag.csproj">
<Project>{ca62d8ea-2739-4c85-81b4-fba040592dae}</Project>
<Name>DataLaag</Name>
</ProjectReference>
<ProjectReference Include="..\LogicLayer\LogicLayer.csproj">
<Project>{517c3448-bd87-4d62-9316-6babbc9a9cfc}</Project>
<Name>LogicLayer</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,29 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Online_Gokkantoor
{
public class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Aanmeldscherm());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Online Gokkantoor")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Online Gokkantoor")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("62e2eca5-72af-4401-9fe3-d7bd5044d7e9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Online_Gokkantoor.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Online_Gokkantoor.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Online_Gokkantoor.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,48 @@
C# OO - zelfevaluatie
=========================================
Naam: Michiel Van Dorpe
Datum: 3 oktober 2018
Volgnummer blok: 1
Onderwerp: Online gokkantoor
Beschrijving:
Met behulp van deze toepassing kan er een simulatie gemaakt worden waarbij er gegokt kan worden op wedstrijden.
Functionele beschrijving:
De bezoeker zal eerst en vooral een keuzeformulier voorgeschoten krijgen met daarop de wedstrijden waar er gegokt op kan worden.
Dit keuzeformulier zal dus bestaan uit wedstrijden, een woordje uitleg en de mogelijkheid om naar een GUI-toepassing te gaan.
In deze GUI-toepassing zullen personen kunnen toegevoegd worden die deelnemen aan het gokkantoor,
hier zullen persoonlijke gegevens worden ingegeven met daarbij de wedstrijd(en) waarop er deelgenomen wordt.
Eens deze correct is ingevuld (18+) zullen deze gegevens worden opgeslaan in een lokaal bestand.
Wanneer dit lokaal bestand is aangevuld kunnen de wedstrijden gesorteerd worden
waarbij het duidelijk zichtbaar is hoeveel personen op gelijkspel, winst of verlies hebben gegokt.
Hier zal dus ook de winnaar(s) bekend gemaakt worden.
Voor de routines die gemeenschappelijk vanuit beide toepassingen gebruikt worden,
zal een afzonderlijke klassebibliotheek opgesteld worden (die vanuit beide toepassingen gebruikt wordt).
Leerdoelen:
Blok 1:
- kennismaking met Visual Studio & C#
- debugging
- unit tests
- programmeerstijl
- exception handling
- enum
- properties
- generic collections
- werken met bestanden/streams
- objecten: cloning & serialisatie
Bijkomend:
- architectuur van een toepassing: meerlagenmodel

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>