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,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,39 @@
<?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>{352D9CDA-9F9E-4C0C-8CB5-EBE21B6E193D}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Blok2_Online_Gokkantoor</RootNamespace>
<AssemblyName>Blok2 Online Gokkantoor</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</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>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,52 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Logic
{
public class General
{
/*
bijna alle berekeningen voor het prorgamma gaan uit deze klasse komen
*/
/* hier komen de wedstrijden en zo die je inlaad*/
public List<Wedstrijden> wedstrijden { get; set; }
public List<Persoon> personen { get; set; }
public List<Keuze> keuzes { get; set; }
public enum Gokken { ThuisPloeg, Gelijk, Uitploeg }
/*
door gebruik van deze klassen kan je bekijken welk team gewonnen heeft en
door gebruik van keuze kan je zien hoeveel de persoon met id x ingezet heeft en zo de winst berekenen.
*/
public double Winst(int wedstrijdID, int persoonID, int keuzeID)
{
return 0.0;
}
/*
deze functie haalt een persoon uit de lijst van personen met de juiste id, best ook mss maken voor een wedstrijd en een keuze, gewoon voor gemak later.
*/
public Persoon GetPersoonById(int id)
{
return new Persoon();
}
public void OnLoad()
{
wedstrijden = Laad_Wedstrijden();
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Logic.General;
namespace Logic
{
public class Keuze
{
public int Match_ID { get; set; }
public int Speler_ID { get; set; }
public double Inzet { get; set; }
public Gokken Gok { get; set; } // thuis uit of gelijk
}
}

View File

@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Logic.General;
namespace Logic
{
public class Persoon
{
public int ID { get; set; }
public string Voornaam { get; set; }
public string Naam { get; set; }
public string Adres { get; set; }
public string Gsm { get; set; }
public double Balans { get; set; }
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Text;
using static Logic.General;
namespace Logic
{
public class Wedstrijden
{
public int Wedstrijd_ID { get; set; }
public string ThuisPloeg { get; set; }
public string UitPloeg { get; set; }
public int Score_ThuisPloeg { get; set; }
public int Score_UitPloeg { get; set; }
public Gokken Winnaar()
{
if(Score_ThuisPloeg > Score_UitPloeg)
{
return Gokken.ThuisPloeg;
}else if(Score_UitPloeg > Score_ThuisPloeg)
{
return Gokken.Uitploeg;
}
else
{
return Gokken.Gelijk;
}
}
}
}

View File

@@ -0,0 +1,66 @@
<?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>{CA62D8EA-2739-4C85-81B4-FBA040592DAE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DataLaag</RootNamespace>
<AssemblyName>DataLaag</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Enums.cs" />
<Compile Include="Interfaces\IFKeuze.cs" />
<Compile Include="Interfaces\IFPersoon.cs" />
<Compile Include="Interfaces\IFWedstrijden.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Gegevens\Keuzes.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
<Content Include="Gegevens\Personen.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="Gegevens\Wedstrijden.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataLaag
{
public class Enums
{
public enum Gokken { Uitploeg, Gelijk, Thuisploeg}
}
}

View File

@@ -0,0 +1 @@
[{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":0},{"matchID":0,"spelerID":0,"inzet":400.0,"gok":1},{"matchID":0,"spelerID":0,"inzet":200.0,"gok":2},{"matchID":0,"spelerID":0,"inzet":200.0,"gok":1},{"matchID":0,"spelerID":0,"inzet":200.0,"gok":0},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":0},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":1},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":2},{"matchID":129,"spelerID":0,"inzet":50.0,"gok":1},{"matchID":129,"spelerID":2,"inzet":50.0,"gok":1},{"matchID":132,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":0},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2}]

View File

@@ -0,0 +1 @@
[{"persoonID":0,"voorNaam":"VOORBEELD","naam":"NAAM","adres":"STRAAT","gsm":"GSM","balans":0.0}]

View File

@@ -0,0 +1 @@
[{"wedstrijdID":128,"thuisPloeg":"Belgie","uitPloeg":"Polen","scoreThuisPloeg":1,"scoreUitPloeg":0,"geldThuisPloeg":2.6,"geldGelijk":2.0,"geldUitPloeg":1.6},{"wedstrijdID":129,"thuisPloeg":"Anderlecht","uitPloeg":"Brugge","scoreThuisPloeg":1,"scoreUitPloeg":0,"geldThuisPloeg":1.4,"geldGelijk":1.8,"geldUitPloeg":3.0},{"wedstrijdID":130,"thuisPloeg":"Dender","uitPloeg":"Aalst","scoreThuisPloeg":1,"scoreUitPloeg":0,"geldThuisPloeg":2.3,"geldGelijk":1.5,"geldUitPloeg":1.9},{"wedstrijdID":131,"thuisPloeg":"Gent","uitPloeg":"Genk","scoreThuisPloeg":1,"scoreUitPloeg":0,"geldThuisPloeg":5.0,"geldGelijk":1.0,"geldUitPloeg":2.0},{"wedstrijdID":132,"thuisPloeg":"Belgie","uitPloeg":"Polen","scoreThuisPloeg":1,"scoreUitPloeg":0,"geldThuisPloeg":6.0,"geldGelijk":1.8,"geldUitPloeg":1.6}]

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static DataLaag.Enums;
namespace DataLaag.Interfaces
{
public interface IFKeuze
{
int matchID { get; set; }
int spelerID { get; set; }
double inzet { get; set; }
Gokken gok { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataLaag.Interfaces
{
public interface IFPersoon
{
int persoonID { get; set; }
string voorNaam { get; set; }
string naam { get; set; }
string adres { get; set; }
string gsm { get; set; }
double balans { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static DataLaag.Enums;
namespace DataLaag.Interfaces
{
public interface IFWedstrijden
{
int wedstrijdID { get; set; }
string thuisPloeg { get; set; }
string uitPloeg { get; set; }
int scoreThuisPloeg { get; set; }
int scoreUitPloeg { get; set; }
Gokken GetWinnaar();
}
}

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("DataLaag")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DataLaag")]
[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("ca62d8ea-2739-4c85-81b4-fba040592dae")]
// 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,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@@ -0,0 +1,278 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using DataLaag;
using DataLaag.Interfaces;
using Newtonsoft.Json;
using static DataLaag.Enums;
namespace LogicLayer
{
public class General
{
public List<Wedstrijden> wedstrijden { get; set; }
public List<Persoon> personen { get; set; }
public List<Keuze> keuzes { get; set; }
private Dictionary<int, Persoon> personenMetId;
public General()
{
wedstrijden = new List<Wedstrijden>();
try
{
personen = new List<Persoon>();
}
catch (Exception ex)
{
throw new Exception("" + ex);
}
try
{
keuzes = new List<Keuze>();
}catch (Exception e)
{
throw new Exception("" + e);
}
Deserialize();
}
public void Deserialize()
{
using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName+"/DataLaag/Gegevens/Personen.json"))
{
JsonSerializer serializer = new JsonSerializer();
personen = (List<Persoon>)serializer.Deserialize(file, typeof(List<Persoon>));
}
using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Wedstrijden.json"))
{
JsonSerializer serializer = new JsonSerializer();
wedstrijden = (List<Wedstrijden>)serializer.Deserialize(file, typeof(List<Wedstrijden>));
}
using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Keuzes.json"))
{
JsonSerializer serializer = new JsonSerializer();
keuzes = (List<Keuze>)serializer.Deserialize(file, typeof(List<Keuze>));
}
wedstrijden = (wedstrijden == null) ? new List<Wedstrijden>() : wedstrijden;
personen = (personen == null) ? new List<Persoon>() : personen;
keuzes = (keuzes == null) ? new List<Keuze>() : keuzes;
FixDictonary();
}
public void Serialize()
{
using (StreamWriter file = File.CreateText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Keuzes.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, keuzes);
}
using (StreamWriter file = File.CreateText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Personen.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, personen);
}
using (StreamWriter file = File.CreateText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Wedstrijden.json"))
{
JsonSerializer serializer = new JsonSerializer();
serializer.Serialize(file, wedstrijden);
}
}
public void PlaatsGok(int matchID, int persoonID, double inzet, string g)
{
try
{
Enum.TryParse(g, out Gokken gok);
Keuze k = new Keuze(matchID, persoonID, inzet, gok);
keuzes.Add(k);
}catch(Exception ex)
{
throw ex;
}
}
public void GebruikerToevoegen(string voornaam, string naam, string adres, string gsm)
{
Persoon p = new Persoon(0, "Voornaam", "Naam", "Adres", "Gsm", 0.00);
try
{
p = new Persoon(personen[personen.Count - 1].persoonID + 1, voornaam, naam, adres, gsm, 0);
}
catch
{
p = new Persoon(0, voornaam, naam, adres, gsm, 0);
Debug.WriteLine("probleem met id settings");
}
personen.Add(p);
FixDictonary();
}
private void FixDictonary()
{
personenMetId = new Dictionary<int, Persoon>();
personenMetId.Clear();
foreach (Persoon p in personen)
{
personenMetId.Add(p.persoonID, p);
}
}
public void MaakVoorbeelden()
{
personen.Add(new Persoon(1, "john", "doe", "street", "048765656565", 0.15));
wedstrijden.Add(new Wedstrijden(128, "belgie", "polen", 1, 0, 2.3, 3, 1.8));
keuzes.Add(new Keuze(128, 1, 0.15, Gokken.Thuisploeg));
FixDictonary();
}
public List<string> GetGebruikers()
{
List<string> lijst = new List<string>();
if (personen != null) {
foreach(Persoon p in personen)
{
lijst.Add(p.persoonID+":"+p.naam + " " + p.voorNaam);
}
}
else
{
lijst.Add("None");
}
return lijst;
}
public List<string> GetWedstrijden()
{
List<string> temp = new List<string>();
if (personen != null)
{
foreach (Wedstrijden w in wedstrijden)
{
temp.Add(w.thuisPloeg + " - " + w.uitPloeg);
}
}
else
{
temp.Add("None");
}
return temp;
}
public List<string> GetGeldVerdubbeling(int ID)
{
List<string> lijst2 = new List<string>();
if (personen != null)
{
foreach (Wedstrijden a in wedstrijden)
{
if(a.wedstrijdID == ID)
{
lijst2.Add(a.geldThuisPloeg + "");
lijst2.Add(a.geldGelijk + "");
lijst2.Add(a.geldUitPloeg + "");
}
}
}
else
{
lijst2.Add("None");
lijst2.Add("None");
lijst2.Add("None");
}
return lijst2;
}
public int[] GetPersoonID()
{
return personenMetId.Keys.ToArray();
}
public int[] GetWedstrijdID()
{
int[] wedstrijdID = new int[wedstrijden.Count];
int teller = 0;
foreach (Wedstrijden w in wedstrijden)
{
wedstrijdID[teller] = w.wedstrijdID;
teller++;
}
return wedstrijdID;
}
private Wedstrijden GetWedstrijd(int ID)
{
foreach(Wedstrijden w in wedstrijden)
{
if(w.wedstrijdID == ID)
{
return w;
}
}
return null;
}
public double GetWinst(int ID)
{
double winst = 0;
foreach (Keuze k in keuzes)
{
if(k.spelerID == ID)
{
Gokken g = k.gok;
double temp = k.inzet;
Wedstrijden w = GetWedstrijd(k.matchID);
Gokken uitKomst = w.GetWinnaar();
if(uitKomst == g)
{
switch (uitKomst)
{
case Gokken.Gelijk:
winst += temp * w.geldGelijk;
break;
case Gokken.Thuisploeg:
winst += temp * w.geldThuisPloeg;
break;
case Gokken.Uitploeg:
winst += temp * w.geldUitPloeg;
break;
}
}
}
}
return winst;
}
private Persoon GetPersoon(int id)
{
return personenMetId[id];
}
public void ClonePersoon(int id)
{
try
{
Persoon clone = GetPersoon(id);
int [] lijst = GetPersoonID();
int fixedID = lijst.Max()+1;
//clone.persoonID = fixedID;
Persoon test = new Persoon(clone);
test.persoonID = fixedID;
personen.Add(new Persoon(test));
FixDictonary();
}
catch(Exception e)
{
//throw new Exception("Persoon kon niet gevonden worden met id, desync van de getId lijst op ui");
}
}
public void ClearList()
{
wedstrijden = new List<Wedstrijden>();
personen = new List<Persoon>();
keuzes = new List<Keuze>();
}
}
}

View File

@@ -0,0 +1,81 @@
using DataLaag.Interfaces;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static DataLaag.Enums;
namespace LogicLayer
{
public class Keuze : IFKeuze
{
public int matchID { get; set; }
public int spelerID { get; set; }
public double inzet { get; set; }
public Gokken gok { get; set; } // thuis uit of gelijk
[JsonConstructor]
public Keuze(int matchID, int spelerID, double inzet, Gokken gok)
{
string naam = "";
string data = "";
string varNaam = $"Probleem bij het ingeven van {naam} met waarde {data}";
try
{
this.matchID = matchID;
} catch (Exception e)
{
naam = "matchID";
data = matchID + "";
throw new Exception(varNaam);
}
try
{
this.spelerID = spelerID;
}
catch (Exception e)
{
naam = "spelerID";
data = spelerID + "";
throw new Exception(varNaam);
}
try
{
this.inzet = inzet;
}
catch (Exception e)
{
naam = "inzet";
data = inzet + "";
throw new Exception(varNaam);
}
try
{
this.gok = gok;
}
catch (Exception e)
{
naam = "gok";
data = gok + "";
throw new Exception(varNaam);
}
}
public Keuze(Keuze keuze)
{
this.gok = keuze.gok;
this.inzet = keuze.inzet;
this.matchID = keuze.matchID;
this.spelerID = keuze.spelerID;
}
}
}

View File

@@ -0,0 +1,63 @@
<?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>{517C3448-BD87-4D62-9316-6BABBC9A9CFC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LogicLayer</RootNamespace>
<AssemblyName>LogicLayer</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<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' ">
<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.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="General.cs" />
<Compile Include="Keuze.cs" />
<Compile Include="Persoon.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Wedstrijden.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DataLaag\DataLaag.csproj">
<Project>{ca62d8ea-2739-4c85-81b4-fba040592dae}</Project>
<Name>DataLaag</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,99 @@
using DataLaag.Interfaces;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LogicLayer
{
public class Persoon : IFPersoon
{
public int persoonID { get; set; }
public string voorNaam { get; set; }
public string naam { get; set; }
public string adres { get; set; }
public string gsm { get; set; }
public double balans { get; set; }
[JsonConstructor]
public Persoon(int persoonID, string voorNaam, string naam, string adres, string gsm, double balans)
{
string varNaam = "", data = "", er = $"Foutieve ingave: Probleem ingeven {varNaam} controleer syntax van {data}";
try
{
this.persoonID = persoonID;
}
catch (Exception ex) {
varNaam = "persoonID";
data = persoonID + "";
throw new Exception($"Foutieve ingave: Probleem aanmaken {varNaam} zie databank voor waarde {data}");
}
try
{
this.voorNaam = voorNaam;
}
catch (Exception ex)
{
varNaam = "voorNaam";
data = voorNaam + "";
throw new Exception(er);
}
try
{
this.naam = naam;
}
catch (Exception ex)
{
varNaam = "naam";
data = naam + "";
throw new Exception(er);
}
try
{
this.adres = adres;
}
catch (Exception ex)
{
varNaam = "adres";
data = adres + "";
throw new Exception(er);
}
try
{
this.gsm = gsm;
}
catch (Exception ex)
{
varNaam = "gsm nummer";
data = gsm + "";
throw new Exception(er);
}
try
{
this.balans = balans;
}
catch (Exception ex)
{
varNaam = "balans";
data = balans + "";
throw new Exception($"Foutieve ingave: een probleem bij het setten van de {varNaam} : {data}");
}
}
public Persoon(Persoon persoon)
{
persoonID = persoon.persoonID;
voorNaam = persoon.voorNaam;
naam = persoon.naam + " BACK UP";
adres = persoon.adres;
gsm = persoon.gsm;
balans = persoon.balans;
}
}
}

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("LogicLayer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LogicLayer")]
[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("517c3448-bd87-4d62-9316-6babbc9a9cfc")]
// 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,124 @@
using DataLaag.Interfaces;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
using static DataLaag.Enums;
namespace LogicLayer
{
public class Wedstrijden : IFWedstrijden
{
public int wedstrijdID { get; set; }
public string thuisPloeg { get; set; }
public string uitPloeg { get; set; }
public int scoreThuisPloeg { get; set; }
public int scoreUitPloeg { get; set; }
public double geldThuisPloeg { get; set; }
public double geldGelijk { get; set; }
public double geldUitPloeg { get; set; }
[JsonConstructor]
public Wedstrijden(int wedstrijdID, string thuisPloeg, string uitPloeg, int scoreThuisPloeg, int scoreUitPloeg, double geldThuisPloeg, double geldGelijk, double geldUitPloeg)
{
string varNaam = "", data = "", error = $"Probleem bij het invoeren van {varNaam} met de waarde {data}";
try
{
this.wedstrijdID = wedstrijdID;
}
catch (Exception e)
{
varNaam = "wedstrijdID";
data = wedstrijdID + "";
throw new Exception(error);
}
try
{
this.thuisPloeg = thuisPloeg;
}
catch (Exception e)
{
varNaam = "thuisPloeg";
data = thuisPloeg + "";
throw new Exception(error);
}
try
{
this.uitPloeg = uitPloeg;
}
catch (Exception e)
{
varNaam = "uitPloeg";
data = uitPloeg + "";
throw new Exception(error);
}
try
{
this.scoreThuisPloeg = scoreThuisPloeg;
}
catch (Exception e)
{
varNaam = "scoreThuisPloeg";
data = scoreThuisPloeg + "";
throw new Exception(error);
}
try
{
this.scoreUitPloeg = scoreUitPloeg;
}
catch (Exception e)
{
varNaam = "scoreUitPloeg";
data = scoreUitPloeg + "";
throw new Exception(error);
}
try
{
this.geldThuisPloeg = geldThuisPloeg;
}
catch (Exception e)
{
varNaam = "geldThuisPloeg";
data = geldThuisPloeg + "";
throw new Exception(error);
}
try
{
this.geldGelijk = geldGelijk;
}
catch (Exception e)
{
varNaam = "geldGelijk";
data = geldGelijk + "";
throw new Exception(error);
}
try
{
this.geldUitPloeg = geldUitPloeg;
}
catch (Exception e)
{
varNaam = "geldUitPloeg";
data = geldUitPloeg + "";
throw new Exception(error);
}
}
public Gokken GetWinnaar()
{
if(scoreThuisPloeg > scoreUitPloeg)
{
return Gokken.Thuisploeg;
}else if(scoreUitPloeg > scoreThuisPloeg)
{
return Gokken.Uitploeg;
}
else
{
return Gokken.Gelijk;
}
}
}
}

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>

View File

@@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2026
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Online GokkantoorGUI", "Online Gokkantoor\Online GokkantoorGUI.csproj", "{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataLaag", "DataLaag\DataLaag.csproj", "{CA62D8EA-2739-4C85-81B4-FBA040592DAE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogicLayer", "LogicLayer\LogicLayer.csproj", "{517C3448-BD87-4D62-9316-6BABBC9A9CFC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Info", "Opstarten\Info.csproj", "{8F83F7BE-61E6-4128-9269-4865CC8C5259}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|Any CPU.Build.0 = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|Any CPU.Build.0 = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|Any CPU.Build.0 = Release|Any CPU
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {13B0BD72-57FE-4A9D-86CA-848D0C9EE5EB}
EndGlobalSection
EndGlobal

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>

View File

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

View File

@@ -0,0 +1,53 @@
<?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>{8F83F7BE-61E6-4128-9269-4865CC8C5259}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>Opstarten</RootNamespace>
<AssemblyName>Opstarten</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</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="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.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Opstarten
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Welkom in het Online Gokkantoor");
Console.WriteLine("Dit project is opgestart door Michiel Van Dorpe op datum 1/10/2018");
Console.WriteLine("Duw op eender welke toets om te sluiten.");
Console.ReadKey();
}
}
}

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("Opstarten")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Opstarten")]
[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("8f83f7be-61e6-4128-9269-4865cc8c5259")]
// 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")]