diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3c4efe2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,261 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+#*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
\ No newline at end of file
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..4c89a2b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,7 @@
+job1:
+ tags:
+ - CSharp
+ script:
+ - "CSharpOOTest"
+ only:
+ - master
\ No newline at end of file
diff --git a/Blok1/Oplossing Blok1/Oplossing Blok1.sln b/Blok1/Oplossing Blok1/Oplossing Blok1.sln
new file mode 100644
index 0000000..7c057b7
--- /dev/null
+++ b/Blok1/Oplossing Blok1/Oplossing Blok1.sln
@@ -0,0 +1,13 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28010.2026
+MinimumVisualStudioVersion = 10.0.40219.1
+Global
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {CC32DFD5-0720-464A-9B38-6CDDA3858C51}
+ EndGlobalSection
+EndGlobal
diff --git a/Blok1/Test/Test.sln b/Blok1/Test/Test.sln
new file mode 100644
index 0000000..39825d3
--- /dev/null
+++ b/Blok1/Test/Test.sln
@@ -0,0 +1,25 @@
+
+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}") = "Test", "Test\Test.csproj", "{EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {6AD8029E-B3D2-4005-9E01-31A5B3069081}
+ EndGlobalSection
+EndGlobal
diff --git a/Blok1/Test/Test/App.config b/Blok1/Test/Test/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/Blok1/Test/Test/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok1/Test/Test/Program.cs b/Blok1/Test/Test/Program.cs
new file mode 100644
index 0000000..dbd7f1a
--- /dev/null
+++ b/Blok1/Test/Test/Program.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Test
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Hello World");
+ Console.ReadLine();
+ }
+ }
+}
diff --git a/Blok1/Test/Test/Properties/AssemblyInfo.cs b/Blok1/Test/Test/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..91ca5f8
--- /dev/null
+++ b/Blok1/Test/Test/Properties/AssemblyInfo.cs
@@ -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("Test")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Test")]
+[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("ee46f6b9-9f41-463a-bc68-8e177c4b4dda")]
+
+// 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")]
diff --git a/Blok1/Test/Test/Test.csproj b/Blok1/Test/Test/Test.csproj
new file mode 100644
index 0000000..81ff4fe
--- /dev/null
+++ b/Blok1/Test/Test/Test.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}
+ Exe
+ Test
+ Test
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor/App.config b/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor.csproj b/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor.csproj
new file mode 100644
index 0000000..6dc9dd9
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor/Blok2 Online Gokkantoor.csproj
@@ -0,0 +1,39 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {352D9CDA-9F9E-4C0C-8CB5-EBE21B6E193D}
+ Exe
+ Blok2_Online_Gokkantoor
+ Blok2 Online Gokkantoor
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/ClassLibrary1/General.cs b/Blok2 Online Gokkantoor/ClassLibrary1/General.cs
new file mode 100644
index 0000000..4dc8294
--- /dev/null
+++ b/Blok2 Online Gokkantoor/ClassLibrary1/General.cs
@@ -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 { get; set; }
+ public List personen { get; set; }
+ public List 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();
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/ClassLibrary1/Keuze.cs b/Blok2 Online Gokkantoor/ClassLibrary1/Keuze.cs
new file mode 100644
index 0000000..3fdb548
--- /dev/null
+++ b/Blok2 Online Gokkantoor/ClassLibrary1/Keuze.cs
@@ -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
+
+ }
+}
diff --git a/Blok2 Online Gokkantoor/ClassLibrary1/Logic.csproj b/Blok2 Online Gokkantoor/ClassLibrary1/Logic.csproj
new file mode 100644
index 0000000..b290d67
--- /dev/null
+++ b/Blok2 Online Gokkantoor/ClassLibrary1/Logic.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard1.4
+
+
+
diff --git a/Blok2 Online Gokkantoor/ClassLibrary1/Persoon.cs b/Blok2 Online Gokkantoor/ClassLibrary1/Persoon.cs
new file mode 100644
index 0000000..8b0a925
--- /dev/null
+++ b/Blok2 Online Gokkantoor/ClassLibrary1/Persoon.cs
@@ -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; }
+
+
+ }
+
+
+}
diff --git a/Blok2 Online Gokkantoor/ClassLibrary1/Wedstrijden.cs b/Blok2 Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
new file mode 100644
index 0000000..2244f97
--- /dev/null
+++ b/Blok2 Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
@@ -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;
+ }
+ }
+
+ }
+}
diff --git a/Blok2 Online Gokkantoor/DataLaag/DataLaag.csproj b/Blok2 Online Gokkantoor/DataLaag/DataLaag.csproj
new file mode 100644
index 0000000..1dc634b
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/DataLaag.csproj
@@ -0,0 +1,66 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {CA62D8EA-2739-4C85-81B4-FBA040592DAE}
+ Library
+ Properties
+ DataLaag
+ DataLaag
+ v4.6.1
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+ Always
+
+
+ Always
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/DataLaag/Enums.cs b/Blok2 Online Gokkantoor/DataLaag/Enums.cs
new file mode 100644
index 0000000..7e56460
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Enums.cs
@@ -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}
+ }
+}
diff --git a/Blok2 Online Gokkantoor/DataLaag/Gegevens/Keuzes.json b/Blok2 Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
new file mode 100644
index 0000000..819aea9
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
@@ -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}]
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/DataLaag/Gegevens/Personen.json b/Blok2 Online Gokkantoor/DataLaag/Gegevens/Personen.json
new file mode 100644
index 0000000..cc66e77
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Gegevens/Personen.json
@@ -0,0 +1 @@
+[{"persoonID":0,"voorNaam":"VOORBEELD","naam":"NAAM","adres":"STRAAT","gsm":"GSM","balans":0.0}]
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json b/Blok2 Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json
new file mode 100644
index 0000000..1db202b
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json
@@ -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}]
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs b/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
new file mode 100644
index 0000000..f2328cd
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
@@ -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; }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs b/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
new file mode 100644
index 0000000..dea236e
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
@@ -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; }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs b/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
new file mode 100644
index 0000000..7277e08
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
@@ -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();
+ }
+}
diff --git a/Blok2 Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs b/Blok2 Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..df296da
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Blok2 Online Gokkantoor/DataLaag/packages.config b/Blok2 Online Gokkantoor/DataLaag/packages.config
new file mode 100644
index 0000000..5762754
--- /dev/null
+++ b/Blok2 Online Gokkantoor/DataLaag/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/LogicLayer/General.cs b/Blok2 Online Gokkantoor/LogicLayer/General.cs
new file mode 100644
index 0000000..e91138c
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/General.cs
@@ -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 { get; set; }
+ public List personen { get; set; }
+ public List keuzes { get; set; }
+ private Dictionary personenMetId;
+ public General()
+ {
+ wedstrijden = new List();
+ try
+ {
+ personen = new List();
+ }
+ catch (Exception ex)
+ {
+ throw new Exception("" + ex);
+ }
+ try
+ {
+ keuzes = new List();
+ }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)serializer.Deserialize(file, typeof(List));
+
+ }
+ using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Wedstrijden.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ wedstrijden = (List)serializer.Deserialize(file, typeof(List));
+ }
+ using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Keuzes.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ keuzes = (List)serializer.Deserialize(file, typeof(List));
+ }
+ wedstrijden = (wedstrijden == null) ? new List() : wedstrijden;
+ personen = (personen == null) ? new List() : personen;
+ keuzes = (keuzes == null) ? new List() : 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();
+ 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 GetGebruikers()
+ {
+ List lijst = new List();
+ if (personen != null) {
+ foreach(Persoon p in personen)
+ {
+ lijst.Add(p.persoonID+":"+p.naam + " " + p.voorNaam);
+ }
+ }
+ else
+ {
+ lijst.Add("None");
+ }
+ return lijst;
+ }
+ public List GetWedstrijden()
+ {
+ List temp = new List();
+ if (personen != null)
+ {
+ foreach (Wedstrijden w in wedstrijden)
+ {
+ temp.Add(w.thuisPloeg + " - " + w.uitPloeg);
+ }
+ }
+ else
+ {
+ temp.Add("None");
+ }
+ return temp;
+ }
+ public List GetGeldVerdubbeling(int ID)
+ {
+ List lijst2 = new List();
+ 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();
+ personen = new List();
+ keuzes = new List();
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/LogicLayer/Keuze.cs b/Blok2 Online Gokkantoor/LogicLayer/Keuze.cs
new file mode 100644
index 0000000..b89426b
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/Keuze.cs
@@ -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;
+ }
+ }
+
+
+}
+
diff --git a/Blok2 Online Gokkantoor/LogicLayer/LogicLayer.csproj b/Blok2 Online Gokkantoor/LogicLayer/LogicLayer.csproj
new file mode 100644
index 0000000..438465b
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/LogicLayer.csproj
@@ -0,0 +1,63 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {517C3448-BD87-4D62-9316-6BABBC9A9CFC}
+ Library
+ Properties
+ LogicLayer
+ LogicLayer
+ v4.6.1
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {ca62d8ea-2739-4c85-81b4-fba040592dae}
+ DataLaag
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/LogicLayer/Persoon.cs b/Blok2 Online Gokkantoor/LogicLayer/Persoon.cs
new file mode 100644
index 0000000..ce9da9d
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/Persoon.cs
@@ -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;
+ }
+ }
+}
+
+
+
diff --git a/Blok2 Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs b/Blok2 Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..b8f820f
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Blok2 Online Gokkantoor/LogicLayer/Wedstrijden.cs b/Blok2 Online Gokkantoor/LogicLayer/Wedstrijden.cs
new file mode 100644
index 0000000..4bca53f
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/Wedstrijden.cs
@@ -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;
+ }
+ }
+
+ }
+}
diff --git a/Blok2 Online Gokkantoor/LogicLayer/packages.config b/Blok2 Online Gokkantoor/LogicLayer/packages.config
new file mode 100644
index 0000000..5762754
--- /dev/null
+++ b/Blok2 Online Gokkantoor/LogicLayer/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor Blok2.sln b/Blok2 Online Gokkantoor/Online Gokkantoor Blok2.sln
new file mode 100644
index 0000000..ed5de3f
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor Blok2.sln
@@ -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
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
new file mode 100644
index 0000000..e535488
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
@@ -0,0 +1,393 @@
+namespace Online_Gokkantoor
+{
+ partial class Aanmeldscherm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
new file mode 100644
index 0000000..6abbe5b
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
@@ -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 personen = new List();
+ 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 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.
+ }
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx b/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/App.config b/Blok2 Online Gokkantoor/Online Gokkantoor/App.config
new file mode 100644
index 0000000..bae5d6d
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.Designer.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.Designer.cs
new file mode 100644
index 0000000..04ad630
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.Designer.cs
@@ -0,0 +1,39 @@
+namespace Online_Gokkantoor
+{
+ partial class NieuweMatch
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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
+ }
+}
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.cs
new file mode 100644
index 0000000..ba1e037
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.cs
@@ -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();
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Online GokkantoorGUI.csproj b/Blok2 Online Gokkantoor/Online Gokkantoor/Online GokkantoorGUI.csproj
new file mode 100644
index 0000000..04b399f
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Online GokkantoorGUI.csproj
@@ -0,0 +1,108 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}
+ WinExe
+ Online_Gokkantoor
+ Online Gokkantoor
+ v4.6.1
+ 512
+ true
+ true
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Aanmeldscherm.cs
+
+
+ Form
+
+
+ NieuweMatch.cs
+
+
+
+
+ Aanmeldscherm.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+ {ca62d8ea-2739-4c85-81b4-fba040592dae}
+ DataLaag
+
+
+ {517c3448-bd87-4d62-9316-6babbc9a9cfc}
+ LogicLayer
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Program.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/Program.cs
new file mode 100644
index 0000000..5981123
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Program.cs
@@ -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
+ {
+
+
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Aanmeldscherm());
+ }
+
+ }
+
+}
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/AssemblyInfo.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d403030
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..b5e5421
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace Online_Gokkantoor.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // 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() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..66a7ff5
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+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;
+ }
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.settings b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt b/Blok2 Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
new file mode 100644
index 0000000..1104722
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
@@ -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
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Online Gokkantoor/packages.config b/Blok2 Online Gokkantoor/Online Gokkantoor/packages.config
new file mode 100644
index 0000000..5762754
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Online Gokkantoor/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Opstarten/App.config b/Blok2 Online Gokkantoor/Opstarten/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Opstarten/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Opstarten/Info.csproj b/Blok2 Online Gokkantoor/Opstarten/Info.csproj
new file mode 100644
index 0000000..3d2c06f
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Opstarten/Info.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {8F83F7BE-61E6-4128-9269-4865CC8C5259}
+ Exe
+ Opstarten
+ Opstarten
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Blok2 Online Gokkantoor/Opstarten/Program.cs b/Blok2 Online Gokkantoor/Opstarten/Program.cs
new file mode 100644
index 0000000..fb0d089
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Opstarten/Program.cs
@@ -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();
+ }
+ }
+}
diff --git a/Blok2 Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs b/Blok2 Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6ebac2d
--- /dev/null
+++ b/Blok2 Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Online Gokkantoor/ClassLibrary1/General.cs b/Online Gokkantoor/ClassLibrary1/General.cs
new file mode 100644
index 0000000..4dc8294
--- /dev/null
+++ b/Online Gokkantoor/ClassLibrary1/General.cs
@@ -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 { get; set; }
+ public List personen { get; set; }
+ public List 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();
+ }
+ }
+}
diff --git a/Online Gokkantoor/ClassLibrary1/Keuze.cs b/Online Gokkantoor/ClassLibrary1/Keuze.cs
new file mode 100644
index 0000000..3fdb548
--- /dev/null
+++ b/Online Gokkantoor/ClassLibrary1/Keuze.cs
@@ -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
+
+ }
+}
diff --git a/Online Gokkantoor/ClassLibrary1/Logic.csproj b/Online Gokkantoor/ClassLibrary1/Logic.csproj
new file mode 100644
index 0000000..b290d67
--- /dev/null
+++ b/Online Gokkantoor/ClassLibrary1/Logic.csproj
@@ -0,0 +1,7 @@
+
+
+
+ netstandard1.4
+
+
+
diff --git a/Online Gokkantoor/ClassLibrary1/Persoon.cs b/Online Gokkantoor/ClassLibrary1/Persoon.cs
new file mode 100644
index 0000000..8b0a925
--- /dev/null
+++ b/Online Gokkantoor/ClassLibrary1/Persoon.cs
@@ -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; }
+
+
+ }
+
+
+}
diff --git a/Online Gokkantoor/ClassLibrary1/Wedstrijden.cs b/Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
new file mode 100644
index 0000000..2244f97
--- /dev/null
+++ b/Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
@@ -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;
+ }
+ }
+
+ }
+}
diff --git a/Online Gokkantoor/Console/App.config b/Online Gokkantoor/Console/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/Online Gokkantoor/Console/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Console/ConsoleApp.csproj b/Online Gokkantoor/Console/ConsoleApp.csproj
new file mode 100644
index 0000000..55a4235
--- /dev/null
+++ b/Online Gokkantoor/Console/ConsoleApp.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}
+ Exe
+ Console
+ Console
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Console/Program.cs b/Online Gokkantoor/Console/Program.cs
new file mode 100644
index 0000000..bd61f83
--- /dev/null
+++ b/Online Gokkantoor/Console/Program.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ConsoleApp
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.WriteLine("Online Gokkantoor heet u welkom");
+
+ // Keep the console window open in debug mode.
+ Console.WriteLine("Druk op eender welke toets om af te sluiten.");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/Online Gokkantoor/Console/Properties/AssemblyInfo.cs b/Online Gokkantoor/Console/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..71a52c6
--- /dev/null
+++ b/Online Gokkantoor/Console/Properties/AssemblyInfo.cs
@@ -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("Console")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Console")]
+[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("75e1ddd1-c2f0-4c29-a95a-85a72d8c4948")]
+
+// 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")]
diff --git a/Online Gokkantoor/DataLaag/DataLaag.csproj b/Online Gokkantoor/DataLaag/DataLaag.csproj
new file mode 100644
index 0000000..1dc634b
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/DataLaag.csproj
@@ -0,0 +1,66 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {CA62D8EA-2739-4C85-81B4-FBA040592DAE}
+ Library
+ Properties
+ DataLaag
+ DataLaag
+ v4.6.1
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+ Always
+
+
+ Always
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/DataLaag/Enums.cs b/Online Gokkantoor/DataLaag/Enums.cs
new file mode 100644
index 0000000..7e56460
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Enums.cs
@@ -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}
+ }
+}
diff --git a/Online Gokkantoor/DataLaag/Gegevens/Keuzes.json b/Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
new file mode 100644
index 0000000..2d44785
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
@@ -0,0 +1 @@
+[{"match_ID":128,"speler_ID":1,"inzet":0.15,"gok":2},{"match_ID":128,"speler_ID":1,"inzet":0.15,"gok":2},{"match_ID":128,"speler_ID":1,"inzet":0.15,"gok":2},{"match_ID":128,"speler_ID":1,"inzet":0.15,"gok":2},{"match_ID":128,"speler_ID":2,"inzet":500.0,"gok":0},{"match_ID":128,"speler_ID":2,"inzet":400.0,"gok":1},{"match_ID":128,"speler_ID":2,"inzet":200.0,"gok":2},{"match_ID":128,"speler_ID":2,"inzet":200.0,"gok":1},{"match_ID":128,"speler_ID":2,"inzet":200.0,"gok":0},{"match_ID":128,"speler_ID":2,"inzet":500.0,"gok":0},{"match_ID":128,"speler_ID":2,"inzet":500.0,"gok":1},{"match_ID":128,"speler_ID":2,"inzet":500.0,"gok":2}]
\ No newline at end of file
diff --git a/Online Gokkantoor/DataLaag/Gegevens/Personen.json b/Online Gokkantoor/DataLaag/Gegevens/Personen.json
new file mode 100644
index 0000000..0c49be6
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Gegevens/Personen.json
@@ -0,0 +1 @@
+[{"persoon_ID":0,"voorNaam":"VOORBEELD","naam":"NAAM","adres":"STRAAT","gsm":"GSM","balans":0.0},{"persoon_ID":0,"voorNaam":"john","naam":"doe","adres":"street","gsm":"048765656565","balans":0.15},{"persoon_ID":0,"voorNaam":"john","naam":"doe","adres":"street","gsm":"048765656565","balans":0.15},{"persoon_ID":1,"voorNaam":"john","naam":"doe","adres":"street","gsm":"048765656565","balans":0.15},{"persoon_ID":2,"voorNaam":"fg","naam":"fg","adres":"fgfg","gsm":"fg","balans":0.0},{"persoon_ID":1,"voorNaam":"john","naam":"doe","adres":"street","gsm":"048765656565","balans":0.15},{"persoon_ID":2,"voorNaam":"Michiel","naam":"VD","adres":"JUP","gsm":"FLEX","balans":0.0},{"persoon_ID":3,"voorNaam":"jef","naam":"Basil","adres":"fdf","gsm":"dfddf","balans":0.0}]
\ No newline at end of file
diff --git a/Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json b/Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json
new file mode 100644
index 0000000..d562541
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json
@@ -0,0 +1 @@
+[{"wedstrijd_ID":128,"thuisPloeg":"Belgie","uitPloeg":"Polen","score_ThuisPloeg":1,"score_UitPloeg":0,"geldThuisPloeg":2.6,"geldGelijk":2.0,"geldUitPloeg":1.6},{"wedstrijd_ID":129,"thuisPloeg":"Anderlecht","uitPloeg":"Brugge","score_ThuisPloeg":1,"score_UitPloeg":0,"geldThuisPloeg":1.4,"geldGelijk":1.8,"geldUitPloeg":3.0},{"wedstrijd_ID":130,"thuisPloeg":"Dender","uitPloeg":"Aalst","score_ThuisPloeg":1,"score_UitPloeg":0,"geldThuisPloeg":2.3,"geldGelijk":1.5,"geldUitPloeg":1.9},{"wedstrijd_ID":131,"thuisPloeg":"Gent","uitPloeg":"Genk","score_ThuisPloeg":1,"score_UitPloeg":0,"geldThuisPloeg":5.0,"geldGelijk":1.0,"geldUitPloeg":2.0},{"wedstrijd_ID":132,"thuisPloeg":"Belgie","uitPloeg":"Polen","score_ThuisPloeg":1,"score_UitPloeg":0,"geldThuisPloeg":6.0,"geldGelijk":1.8,"geldUitPloeg":1.6}]
\ No newline at end of file
diff --git a/Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs b/Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
new file mode 100644
index 0000000..3e8837a
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
@@ -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 match_ID { get; set; }
+ int speler_ID { get; set; }
+ double inzet { get; set; }
+ Gokken gok { get; set; }
+ }
+}
diff --git a/Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs b/Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
new file mode 100644
index 0000000..4fb8452
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
@@ -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 persoon_ID { get; set; }
+ string voorNaam { get; set; }
+ string naam { get; set; }
+ string adres { get; set; }
+ string gsm { get; set; }
+ double balans { get; set; }
+ }
+}
diff --git a/Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs b/Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
new file mode 100644
index 0000000..cc43d45
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
@@ -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 wedstrijd_ID { get; set; }
+ string thuisPloeg { get; set; }
+ string uitPloeg { get; set; }
+ int score_ThuisPloeg { get; set; }
+ int score_UitPloeg { get; set; }
+ Gokken GetWinnaar();
+ }
+}
diff --git a/Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs b/Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..df296da
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Online Gokkantoor/DataLaag/packages.config b/Online Gokkantoor/DataLaag/packages.config
new file mode 100644
index 0000000..5762754
--- /dev/null
+++ b/Online Gokkantoor/DataLaag/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/LogicLayer/General.cs b/Online Gokkantoor/LogicLayer/General.cs
new file mode 100644
index 0000000..5629855
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/General.cs
@@ -0,0 +1,241 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using DataLaag;
+using DataLaag.Interfaces;
+using Newtonsoft.Json;
+using static DataLaag.Enums;
+
+namespace LogicLayer
+{
+ public class General
+ {
+ public List wedstrijden { get; set; }
+ public List personen { get; set; }
+ public List keuzes { get; set; }
+
+ public General()
+ {
+ wedstrijden = new List();
+ try
+ {
+ personen = new List();
+ }
+ catch (Exception ex)
+ {
+ throw new Exception("" + ex);
+ }
+ try
+ {
+ keuzes = new List();
+ }catch (Exception e)
+ {
+ throw new Exception("" + e);
+ }
+ Deserialize();
+ }
+
+ public void Deserialize()
+ {
+ using (StreamReader file = File.OpenText(@"Gegevens\Keuzes.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ keuzes = (List)serializer.Deserialize(file, typeof(List));
+
+ }
+ using (StreamReader file = File.OpenText(@"Gegevens\Personen.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ personen = (List)serializer.Deserialize(file, typeof(List));
+ }
+ using (StreamReader file = File.OpenText(@"Gegevens\Wedstrijden.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ wedstrijden = (List)serializer.Deserialize(file, typeof(List));
+ }
+ wedstrijden = (wedstrijden == null) ? new List() : wedstrijden;
+ personen = (personen == null) ? new List() : personen;
+ keuzes = (keuzes == null) ? new List() : keuzes;
+
+ }
+ public void Serialize()
+ {
+ using (StreamWriter file = File.CreateText(@"Gegevens\Keuzes.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ serializer.Serialize(file, keuzes);
+ }
+ using (StreamWriter file = File.CreateText(@"Gegevens\Personen.json"))
+ {
+ JsonSerializer serializer = new JsonSerializer();
+ serializer.Serialize(file, personen);
+ }
+ using (StreamWriter file = File.CreateText(@"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].persoon_ID + 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);
+ }
+
+ 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));
+ }
+
+ public List GetGebruikers()
+ {
+ List lijst = new List();
+ if (personen != null) {
+ foreach(Persoon p in personen)
+ {
+ lijst.Add(p.persoon_ID+":"+p.naam + " " + p.voorNaam);
+ }
+ }
+ else
+ {
+ lijst.Add("None");
+ }
+ return lijst;
+ }
+
+ public List GetWedstrijden()
+ {
+ List temp = new List();
+ if (personen != null)
+ {
+ foreach (Wedstrijden w in wedstrijden)
+ {
+ temp.Add( w.thuisPloeg + " - " + w.uitPloeg);
+ }
+ }
+ else
+ {
+ temp.Add("None");
+ }
+ return temp;
+ }
+
+ public List GetGeldVerdubbeling(int ID)
+ {
+ List lijst2 = new List();
+ if (personen != null)
+ {
+ foreach (Wedstrijden a in wedstrijden)
+ {
+ if(a.wedstrijd_ID == 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[] GetP_ID()
+ {
+ int[] p_ID = new int[personen.Count];
+ int teller = 0;
+ foreach (Persoon p in personen)
+ {
+ p_ID[teller] = p.persoon_ID;
+ teller++;
+ }
+ return p_ID;
+ }
+
+ public int[] GetW_ID()
+ {
+ int[] w_ID = new int[wedstrijden.Count];
+ int teller = 0;
+ foreach (Wedstrijden w in wedstrijden)
+ {
+ w_ID[teller] = w.wedstrijd_ID;
+ teller++;
+ }
+ return w_ID;
+ }
+
+ private Wedstrijden GetWedstrijd(int ID)
+ {
+ foreach(Wedstrijden w in wedstrijden)
+ {
+ if(w.wedstrijd_ID == ID)
+ {
+ return w;
+ }
+ }
+ return null;
+ }
+
+ public double GetWinst(int ID)
+ {
+ double winst = 0;
+ foreach (Keuze k in keuzes)
+ {
+ if(k.speler_ID == ID)
+ {
+ Gokken g = k.gok;
+ double temp = k.inzet;
+ Wedstrijden w = GetWedstrijd(k.match_ID);
+ 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;
+ }
+ }
+}
diff --git a/Online Gokkantoor/LogicLayer/Keuze.cs b/Online Gokkantoor/LogicLayer/Keuze.cs
new file mode 100644
index 0000000..ac05cb1
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/Keuze.cs
@@ -0,0 +1,35 @@
+using DataLaag.Interfaces;
+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 match_ID { get; set; }
+ public int speler_ID { get; set; }
+ public double inzet { get; set; }
+ public Gokken gok { get; set; } // thuis uit of gelijk
+
+ public Keuze(int match_ID, int speler_ID, double inzet, Gokken gok)
+ {
+ try
+ {
+ this.match_ID = match_ID;
+ this.speler_ID = speler_ID;
+ this.inzet = inzet;
+ this.gok = gok;
+
+ } catch (Exception e)
+ {
+ throw new Exception("keuze is niet gelukt:" + e);
+ }
+ }
+ }
+}
+
diff --git a/Online Gokkantoor/LogicLayer/LogicLayer.csproj b/Online Gokkantoor/LogicLayer/LogicLayer.csproj
new file mode 100644
index 0000000..438465b
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/LogicLayer.csproj
@@ -0,0 +1,63 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {517C3448-BD87-4D62-9316-6BABBC9A9CFC}
+ Library
+ Properties
+ LogicLayer
+ LogicLayer
+ v4.6.1
+ 512
+ true
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {ca62d8ea-2739-4c85-81b4-fba040592dae}
+ DataLaag
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/LogicLayer/Persoon.cs b/Online Gokkantoor/LogicLayer/Persoon.cs
new file mode 100644
index 0000000..a757b93
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/Persoon.cs
@@ -0,0 +1,41 @@
+using DataLaag.Interfaces;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+
+namespace LogicLayer
+{
+ public class Persoon : IFPersoon
+ {
+ public int persoon_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; }
+
+
+ public Persoon(int persoon_ID, string voorNaam, string naam, string adres, string gsm, double balans)
+ {
+ try
+ {
+ this.persoon_ID = persoon_ID;
+ this.voorNaam = voorNaam;
+ this.naam = naam;
+ this.adres = adres;
+ this.gsm = gsm;
+ this.balans = balans;
+ }
+ catch (Exception ex)
+ {
+ throw new Exception("Foutieve ingave: " + ex);
+ }
+ }
+ }
+}
+
+
+
diff --git a/Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs b/Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..b8f820f
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Online Gokkantoor/LogicLayer/Wedstrijden.cs b/Online Gokkantoor/LogicLayer/Wedstrijden.cs
new file mode 100644
index 0000000..00d7b74
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/Wedstrijden.cs
@@ -0,0 +1,48 @@
+using DataLaag.Interfaces;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using static DataLaag.Enums;
+
+namespace LogicLayer
+{
+ public class Wedstrijden : IFWedstrijden
+ {
+ 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 double geldThuisPloeg { get; set; }
+ public double geldGelijk { get; set; }
+ public double geldUitPloeg { get; set; }
+
+
+ public Wedstrijden(int wedstrijd_ID, string thuisPloeg, string uitPloeg, int score_ThuisPloeg, int score_UitPloeg, double geldThuisPloeg, double geldGelijk, double geldUitPloeg)
+ {
+ this.wedstrijd_ID = wedstrijd_ID;
+ this.thuisPloeg = thuisPloeg;
+ this.uitPloeg = uitPloeg;
+ this.score_ThuisPloeg = score_ThuisPloeg;
+ this.score_UitPloeg = score_UitPloeg;
+ this.geldThuisPloeg = geldThuisPloeg;
+ this.geldGelijk = geldGelijk;
+ this.geldUitPloeg = geldUitPloeg;
+ }
+
+ public Gokken GetWinnaar()
+ {
+ if(score_ThuisPloeg > score_UitPloeg)
+ {
+ return Gokken.Thuisploeg;
+ }else if(score_UitPloeg > score_ThuisPloeg)
+ {
+ return Gokken.Uitploeg;
+ }
+ else
+ {
+ return Gokken.Gelijk;
+ }
+ }
+ }
+}
diff --git a/Online Gokkantoor/LogicLayer/packages.config b/Online Gokkantoor/LogicLayer/packages.config
new file mode 100644
index 0000000..5762754
--- /dev/null
+++ b/Online Gokkantoor/LogicLayer/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor.sln b/Online Gokkantoor/Online Gokkantoor.sln
new file mode 100644
index 0000000..9fd7b19
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor.sln
@@ -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 Gokkantoor_GUI", "Online Gokkantoor\Online Gokkantoor_GUI.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}") = "ConsoleApp", "Console\ConsoleApp.csproj", "{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}"
+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
+ {75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}.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
diff --git a/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs b/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
new file mode 100644
index 0000000..7eaec03
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
@@ -0,0 +1,380 @@
+namespace Online_Gokkantoor
+{
+ partial class Aanmeldscherm
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ 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.button1 = new System.Windows.Forms.Button();
+ 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.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(436, 233);
+ 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(533, 233);
+ 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(613, 233);
+ 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(512, 338);
+ 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(121, 20);
+ this.textInzet.TabIndex = 17;
+ //
+ // button1
+ //
+ this.button1.Location = new System.Drawing.Point(366, 392);
+ this.button1.Name = "button1";
+ this.button1.Size = new System.Drawing.Size(75, 23);
+ this.button1.TabIndex = 18;
+ this.button1.Text = "test";
+ this.button1.UseVisualStyleBackColor = true;
+ //
+ // 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.buttonGebruikerToevoegen);
+ //
+ // 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.buttonExit);
+ //
+ // 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;
+ //
+ // 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.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.button1);
+ 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.Button button1;
+ 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;
+ }
+}
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs b/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
new file mode 100644
index 0000000..610a9ca
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
@@ -0,0 +1,135 @@
+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
+ {
+ public int[] p_ID;
+ public int[] w_ID;
+ public General g;
+ private List personen = new List();
+ private string[] uitkomsten = { "Uitploeg", "Gelijk", "Thuisploeg" };
+ public Aanmeldscherm()
+ {
+ InitializeComponent();
+ try
+ {
+ g = new General();
+ g.Deserialize();
+ UpdateUI();
+
+ } catch (Exception e )
+ {
+ labelError.Text = "error throw: " + e;
+ }
+ }
+
+ private void UpdateUI()
+ {
+ GebruikersBox.DataSource = g.GetGebruikers();
+ matchbox.DataSource = g.GetWedstrijden();
+ p_ID = g.GetP_ID();
+ w_ID = g.GetW_ID();
+ 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 per_ID = p_ID[GebruikersBox.SelectedIndex];
+ int wed_ID = w_ID[matchbox.SelectedIndex];
+ g.PlaatsGok(wed_ID, per_ID, Double.Parse(textInzet.Text), comboKeuze.Items[comboKeuze.SelectedIndex].ToString());
+ }catch(Exception e2)
+ {
+ labelError.Text = e2 + "";
+ }
+ UpdateUI();
+ }
+
+ private void matchbox_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ try
+ {
+ labelMatch.Text = (string)this.matchbox.SelectedItem;
+ List geld = g.GetGeldVerdubbeling(w_ID[matchbox.SelectedIndex]);
+ labelThuisploeg.Text = "Thuisploeg:" + geld[0];
+ labelGelijk.Text = "Gelijk:" + geld[1];
+ labelUitploeg.Text = "Uitploeg:" + geld[2];
+ }catch (Exception exceptie)
+ {
+ labelError.Text = exceptie + "";
+ }
+ }
+
+ 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 = p_ID[GebruikersBox.SelectedIndex];
+
+ labelWinst.Text = g.GetWinst(ID) + "€";
+ }catch(Exception e1)
+ {
+ labelError.Text = e1 + "";
+ }
+ }
+
+ private void buttonGebruikerToevoegen(object sender, EventArgs e)
+ {
+ try
+ {
+ g.MaakVoorbeelden();
+ UpdateUI();
+ }
+ catch (Exception ex)
+ {
+ labelError.Text = ex + "";
+ }
+ }
+
+ private void buttonExit(object sender, EventArgs e)
+ {
+ UpdateUI();
+ g.Serialize();
+ this.Close();
+ }
+ }
+}
diff --git a/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx b/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor/App.config b/Online Gokkantoor/Online Gokkantoor/App.config
new file mode 100644
index 0000000..bae5d6d
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj b/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj
new file mode 100644
index 0000000..1736184
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj
@@ -0,0 +1,103 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}
+ WinExe
+ Online_Gokkantoor
+ Online Gokkantoor
+ v4.6.1
+ 512
+ true
+ true
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form
+
+
+ Aanmeldscherm.cs
+
+
+
+
+ Aanmeldscherm.cs
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
+ True
+ Resources.resx
+ True
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+ True
+ Settings.settings
+ True
+
+
+
+
+
+
+
+
+
+
+
+ {ca62d8ea-2739-4c85-81b4-fba040592dae}
+ DataLaag
+
+
+ {517c3448-bd87-4d62-9316-6babbc9a9cfc}
+ LogicLayer
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor/Program.cs b/Online Gokkantoor/Online Gokkantoor/Program.cs
new file mode 100644
index 0000000..5981123
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Program.cs
@@ -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
+ {
+
+
+ ///
+ /// The main entry point for the application.
+ ///
+ [STAThread]
+ static void Main()
+ {
+
+ Application.EnableVisualStyles();
+ Application.SetCompatibleTextRenderingDefault(false);
+ Application.Run(new Aanmeldscherm());
+ }
+
+ }
+
+}
diff --git a/Online Gokkantoor/Online Gokkantoor/Properties/AssemblyInfo.cs b/Online Gokkantoor/Online Gokkantoor/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..d403030
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs b/Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..b5e5421
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+namespace Online_Gokkantoor.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // 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() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [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;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx b/Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs b/Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..66a7ff5
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+//
+// 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.
+//
+//------------------------------------------------------------------------------
+
+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;
+ }
+ }
+ }
+}
diff --git a/Online Gokkantoor/Online Gokkantoor/Properties/Settings.settings b/Online Gokkantoor/Online Gokkantoor/Properties/Settings.settings
new file mode 100644
index 0000000..3964565
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt b/Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
new file mode 100644
index 0000000..1104722
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
@@ -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
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor/ZelfEvaluatie.txt b/Online Gokkantoor/Online Gokkantoor/ZelfEvaluatie.txt
new file mode 100644
index 0000000..7c18d75
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/ZelfEvaluatie.txt
@@ -0,0 +1,49 @@
+C# OO - zelfevaluatie
+=========================================
+
+Naam: Michiel Van Dorpe
+Datum: 30/10/2018
+Volgnummer blok: 1
+
+Onderwerp: Online Gokkantoor
+
+Stand van zaken:
+
+Grootste deel zoals in het voorstel is volbracht.
+Enkel het stukje "'Value' en 'Reference' types, cloning van objecten" is nog niet uitgevoerd.
+
+
+Sterke punten:
+
+Duidelijke methodes, Meerlagen gebruikt (duidelijke klassen mooi geheel), eerste demo afgewerkt.
+
+Aandachtspunten in je aanpak:
+
+Robuste code, efficiënte code (soms kan het gemakkelijker en korter).
+
+Technische aandachtspunten:
+
+Cloning van objecten heb ik momenteel nog niet goed onder de knie.
+Meerlagenmodel is nog steeds wennen, dit was een grote omvorming van mijn code.
+Alle andere punten zijn opgenomen mits gebruik van alternatieven bronnen zoals stackoverflow.
+
+Leerdoelen:
+
+< opsomming van de leerdoelen voor dit blok met het niveau waarop je dat doel al verworven hebt:
+ Leerdoelen:
+
+Blok 1:
+
+- kennismaking met Visual Studio & C#
+- debugging
+- programmeerstijl
+- exception handling
+- enum
+- properties
+- generic collections
+- werken met bestanden/streams
+- Interfaces
+- Lambda expressions
+- architectuur van een toepassing: meerlagenmodel
+
+>
\ No newline at end of file
diff --git a/Online Gokkantoor/Online Gokkantoor/packages.config b/Online Gokkantoor/Online Gokkantoor/packages.config
new file mode 100644
index 0000000..5762754
--- /dev/null
+++ b/Online Gokkantoor/Online Gokkantoor/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Opstarten/App.config b/Online Gokkantoor/Opstarten/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/Online Gokkantoor/Opstarten/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Opstarten/Opstarten.csproj b/Online Gokkantoor/Opstarten/Opstarten.csproj
new file mode 100644
index 0000000..3d2c06f
--- /dev/null
+++ b/Online Gokkantoor/Opstarten/Opstarten.csproj
@@ -0,0 +1,53 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {8F83F7BE-61E6-4128-9269-4865CC8C5259}
+ Exe
+ Opstarten
+ Opstarten
+ v4.7.2
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Online Gokkantoor/Opstarten/Program.cs b/Online Gokkantoor/Opstarten/Program.cs
new file mode 100644
index 0000000..2812fac
--- /dev/null
+++ b/Online Gokkantoor/Opstarten/Program.cs
@@ -0,0 +1,18 @@
+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("Duw op eender welke toets om te sluiten.");
+ Console.ReadKey();
+ }
+ }
+}
diff --git a/Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs b/Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..6ebac2d
--- /dev/null
+++ b/Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
@@ -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")]
diff --git a/README.md b/README.md
index a8d6cea..7e56832 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,2 @@
-# michielC-oo
\ No newline at end of file
+# 1819-CSharpOO-MichielVanDorpe
+