mirror of
https://github.com/bvanroll/cs-oo-project.git
synced 2025-08-29 03:52:45 +00:00
voila
This commit is contained in:
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@@ -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
|
261
.gitignore
vendored
Normal file
261
.gitignore
vendored
Normal file
@@ -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
|
7
.gitlab-ci.yml
Normal file
7
.gitlab-ci.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
job1:
|
||||
tags:
|
||||
- CSharp
|
||||
script:
|
||||
- "CSharpOOTest"
|
||||
only:
|
||||
- master
|
13
Blok1/Oplossing Blok1/Oplossing Blok1.sln
Normal file
13
Blok1/Oplossing Blok1/Oplossing Blok1.sln
Normal file
@@ -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
|
25
Blok1/Test/Test.sln
Normal file
25
Blok1/Test/Test.sln
Normal file
@@ -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
|
6
Blok1/Test/Test/App.config
Normal file
6
Blok1/Test/Test/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
17
Blok1/Test/Test/Program.cs
Normal file
17
Blok1/Test/Test/Program.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
36
Blok1/Test/Test/Properties/AssemblyInfo.cs
Normal file
36
Blok1/Test/Test/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("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")]
|
53
Blok1/Test/Test/Test.csproj
Normal file
53
Blok1/Test/Test/Test.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EE46F6B9-9F41-463A-BC68-8E177C4B4DDA}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Test</RootNamespace>
|
||||
<AssemblyName>Test</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{352D9CDA-9F9E-4C0C-8CB5-EBE21B6E193D}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Blok2_Online_Gokkantoor</RootNamespace>
|
||||
<AssemblyName>Blok2 Online Gokkantoor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
52
Blok2 Online Gokkantoor/ClassLibrary1/General.cs
Normal file
52
Blok2 Online Gokkantoor/ClassLibrary1/General.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class General
|
||||
{
|
||||
/*
|
||||
bijna alle berekeningen voor het prorgamma gaan uit deze klasse komen
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* hier komen de wedstrijden en zo die je inlaad*/
|
||||
public List<Wedstrijden> wedstrijden { get; set; }
|
||||
public List<Persoon> personen { get; set; }
|
||||
public List<Keuze> keuzes { get; set; }
|
||||
public enum Gokken { ThuisPloeg, Gelijk, Uitploeg }
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
door gebruik van deze klassen kan je bekijken welk team gewonnen heeft en
|
||||
door gebruik van keuze kan je zien hoeveel de persoon met id x ingezet heeft en zo de winst berekenen.
|
||||
*/
|
||||
|
||||
public double Winst(int wedstrijdID, int persoonID, int keuzeID)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/*
|
||||
deze functie haalt een persoon uit de lijst van personen met de juiste id, best ook mss maken voor een wedstrijd en een keuze, gewoon voor gemak later.
|
||||
*/
|
||||
|
||||
public Persoon GetPersoonById(int id)
|
||||
{
|
||||
return new Persoon();
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
wedstrijden = Laad_Wedstrijden();
|
||||
}
|
||||
}
|
||||
}
|
19
Blok2 Online Gokkantoor/ClassLibrary1/Keuze.cs
Normal file
19
Blok2 Online Gokkantoor/ClassLibrary1/Keuze.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Logic.General;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class Keuze
|
||||
{
|
||||
|
||||
public int Match_ID { get; set; }
|
||||
public int Speler_ID { get; set; }
|
||||
public double Inzet { get; set; }
|
||||
public Gokken Gok { get; set; } // thuis uit of gelijk
|
||||
|
||||
}
|
||||
}
|
7
Blok2 Online Gokkantoor/ClassLibrary1/Logic.csproj
Normal file
7
Blok2 Online Gokkantoor/ClassLibrary1/Logic.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.4</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
23
Blok2 Online Gokkantoor/ClassLibrary1/Persoon.cs
Normal file
23
Blok2 Online Gokkantoor/ClassLibrary1/Persoon.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Logic.General;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class Persoon
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Voornaam { get; set; }
|
||||
public string Naam { get; set; }
|
||||
public string Adres { get; set; }
|
||||
public string Gsm { get; set; }
|
||||
public double Balans { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
32
Blok2 Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
Normal file
32
Blok2 Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using static Logic.General;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class Wedstrijden
|
||||
{
|
||||
public int Wedstrijd_ID { get; set; }
|
||||
public string ThuisPloeg { get; set; }
|
||||
public string UitPloeg { get; set; }
|
||||
public int Score_ThuisPloeg { get; set; }
|
||||
public int Score_UitPloeg { get; set; }
|
||||
|
||||
public Gokken Winnaar()
|
||||
{
|
||||
if(Score_ThuisPloeg > Score_UitPloeg)
|
||||
{
|
||||
return Gokken.ThuisPloeg;
|
||||
}else if(Score_UitPloeg > Score_ThuisPloeg)
|
||||
{
|
||||
return Gokken.Uitploeg;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Gokken.Gelijk;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
66
Blok2 Online Gokkantoor/DataLaag/DataLaag.csproj
Normal file
66
Blok2 Online Gokkantoor/DataLaag/DataLaag.csproj
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CA62D8EA-2739-4C85-81B4-FBA040592DAE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DataLaag</RootNamespace>
|
||||
<AssemblyName>DataLaag</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="Interfaces\IFKeuze.cs" />
|
||||
<Compile Include="Interfaces\IFPersoon.cs" />
|
||||
<Compile Include="Interfaces\IFWedstrijden.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Gegevens\Keuzes.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="packages.config" />
|
||||
<Content Include="Gegevens\Personen.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Gegevens\Wedstrijden.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
13
Blok2 Online Gokkantoor/DataLaag/Enums.cs
Normal file
13
Blok2 Online Gokkantoor/DataLaag/Enums.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataLaag
|
||||
{
|
||||
public class Enums
|
||||
{
|
||||
public enum Gokken { Uitploeg, Gelijk, Thuisploeg}
|
||||
}
|
||||
}
|
1
Blok2 Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
Normal file
1
Blok2 Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
Normal file
@@ -0,0 +1 @@
|
||||
[{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":0.15,"gok":2},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":0},{"matchID":0,"spelerID":0,"inzet":400.0,"gok":1},{"matchID":0,"spelerID":0,"inzet":200.0,"gok":2},{"matchID":0,"spelerID":0,"inzet":200.0,"gok":1},{"matchID":0,"spelerID":0,"inzet":200.0,"gok":0},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":0},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":1},{"matchID":0,"spelerID":0,"inzet":500.0,"gok":2},{"matchID":129,"spelerID":0,"inzet":50.0,"gok":1},{"matchID":129,"spelerID":2,"inzet":50.0,"gok":1},{"matchID":132,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":1},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":0},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":131,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2},{"matchID":128,"spelerID":2,"inzet":130.0,"gok":2}]
|
1
Blok2 Online Gokkantoor/DataLaag/Gegevens/Personen.json
Normal file
1
Blok2 Online Gokkantoor/DataLaag/Gegevens/Personen.json
Normal file
@@ -0,0 +1 @@
|
||||
[{"persoonID":0,"voorNaam":"VOORBEELD","naam":"NAAM","adres":"STRAAT","gsm":"GSM","balans":0.0}]
|
@@ -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}]
|
17
Blok2 Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
Normal file
17
Blok2 Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace DataLaag.Interfaces
|
||||
{
|
||||
public interface IFKeuze
|
||||
{
|
||||
int matchID { get; set; }
|
||||
int spelerID { get; set; }
|
||||
double inzet { get; set; }
|
||||
Gokken gok { get; set; }
|
||||
}
|
||||
}
|
18
Blok2 Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
Normal file
18
Blok2 Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataLaag.Interfaces
|
||||
{
|
||||
public interface IFPersoon
|
||||
{
|
||||
int persoonID { get; set; }
|
||||
string voorNaam { get; set; }
|
||||
string naam { get; set; }
|
||||
string adres { get; set; }
|
||||
string gsm { get; set; }
|
||||
double balans { get; set; }
|
||||
}
|
||||
}
|
19
Blok2 Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
Normal file
19
Blok2 Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace DataLaag.Interfaces
|
||||
{
|
||||
public interface IFWedstrijden
|
||||
{
|
||||
int wedstrijdID { get; set; }
|
||||
string thuisPloeg { get; set; }
|
||||
string uitPloeg { get; set; }
|
||||
int scoreThuisPloeg { get; set; }
|
||||
int scoreUitPloeg { get; set; }
|
||||
Gokken GetWinnaar();
|
||||
}
|
||||
}
|
36
Blok2 Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
Normal file
36
Blok2 Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DataLaag")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DataLaag")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("ca62d8ea-2739-4c85-81b4-fba040592dae")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
4
Blok2 Online Gokkantoor/DataLaag/packages.config
Normal file
4
Blok2 Online Gokkantoor/DataLaag/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
278
Blok2 Online Gokkantoor/LogicLayer/General.cs
Normal file
278
Blok2 Online Gokkantoor/LogicLayer/General.cs
Normal file
@@ -0,0 +1,278 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using DataLaag;
|
||||
using DataLaag.Interfaces;
|
||||
using Newtonsoft.Json;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace LogicLayer
|
||||
{
|
||||
public class General
|
||||
{
|
||||
public List<Wedstrijden> wedstrijden { get; set; }
|
||||
public List<Persoon> personen { get; set; }
|
||||
public List<Keuze> keuzes { get; set; }
|
||||
private Dictionary<int, Persoon> personenMetId;
|
||||
public General()
|
||||
{
|
||||
wedstrijden = new List<Wedstrijden>();
|
||||
try
|
||||
{
|
||||
personen = new List<Persoon>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("" + ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
keuzes = new List<Keuze>();
|
||||
}catch (Exception e)
|
||||
{
|
||||
throw new Exception("" + e);
|
||||
}
|
||||
Deserialize();
|
||||
}
|
||||
|
||||
public void Deserialize()
|
||||
{
|
||||
using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName+"/DataLaag/Gegevens/Personen.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
personen = (List<Persoon>)serializer.Deserialize(file, typeof(List<Persoon>));
|
||||
|
||||
}
|
||||
using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Wedstrijden.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
wedstrijden = (List<Wedstrijden>)serializer.Deserialize(file, typeof(List<Wedstrijden>));
|
||||
}
|
||||
using (StreamReader file = File.OpenText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Keuzes.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
keuzes = (List<Keuze>)serializer.Deserialize(file, typeof(List<Keuze>));
|
||||
}
|
||||
wedstrijden = (wedstrijden == null) ? new List<Wedstrijden>() : wedstrijden;
|
||||
personen = (personen == null) ? new List<Persoon>() : personen;
|
||||
keuzes = (keuzes == null) ? new List<Keuze>() : keuzes;
|
||||
FixDictonary();
|
||||
|
||||
}
|
||||
public void Serialize()
|
||||
{
|
||||
using (StreamWriter file = File.CreateText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Keuzes.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.Serialize(file, keuzes);
|
||||
}
|
||||
using (StreamWriter file = File.CreateText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Personen.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.Serialize(file, personen);
|
||||
}
|
||||
using (StreamWriter file = File.CreateText(@Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName + "/DataLaag/Gegevens/Wedstrijden.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
serializer.Serialize(file, wedstrijden);
|
||||
}
|
||||
}
|
||||
|
||||
public void PlaatsGok(int matchID, int persoonID, double inzet, string g)
|
||||
{
|
||||
try
|
||||
{
|
||||
Enum.TryParse(g, out Gokken gok);
|
||||
Keuze k = new Keuze(matchID, persoonID, inzet, gok);
|
||||
keuzes.Add(k);
|
||||
}catch(Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void GebruikerToevoegen(string voornaam, string naam, string adres, string gsm)
|
||||
{
|
||||
Persoon p = new Persoon(0, "Voornaam", "Naam", "Adres", "Gsm", 0.00);
|
||||
try
|
||||
{
|
||||
p = new Persoon(personen[personen.Count - 1].persoonID + 1, voornaam, naam, adres, gsm, 0);
|
||||
}
|
||||
catch
|
||||
{
|
||||
p = new Persoon(0, voornaam, naam, adres, gsm, 0);
|
||||
Debug.WriteLine("probleem met id settings");
|
||||
}
|
||||
personen.Add(p);
|
||||
FixDictonary();
|
||||
}
|
||||
|
||||
private void FixDictonary()
|
||||
{
|
||||
|
||||
personenMetId = new Dictionary<int, Persoon>();
|
||||
personenMetId.Clear();
|
||||
foreach (Persoon p in personen)
|
||||
{
|
||||
personenMetId.Add(p.persoonID, p);
|
||||
}
|
||||
}
|
||||
public void MaakVoorbeelden()
|
||||
{
|
||||
personen.Add(new Persoon(1, "john", "doe", "street", "048765656565", 0.15));
|
||||
wedstrijden.Add(new Wedstrijden(128, "belgie", "polen", 1, 0, 2.3, 3, 1.8));
|
||||
keuzes.Add(new Keuze(128, 1, 0.15, Gokken.Thuisploeg));
|
||||
FixDictonary();
|
||||
}
|
||||
|
||||
public List<string> GetGebruikers()
|
||||
{
|
||||
List<string> lijst = new List<string>();
|
||||
if (personen != null) {
|
||||
foreach(Persoon p in personen)
|
||||
{
|
||||
lijst.Add(p.persoonID+":"+p.naam + " " + p.voorNaam);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lijst.Add("None");
|
||||
}
|
||||
return lijst;
|
||||
}
|
||||
public List<string> GetWedstrijden()
|
||||
{
|
||||
List<string> temp = new List<string>();
|
||||
if (personen != null)
|
||||
{
|
||||
foreach (Wedstrijden w in wedstrijden)
|
||||
{
|
||||
temp.Add(w.thuisPloeg + " - " + w.uitPloeg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
temp.Add("None");
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
public List<string> GetGeldVerdubbeling(int ID)
|
||||
{
|
||||
List<string> lijst2 = new List<string>();
|
||||
if (personen != null)
|
||||
{
|
||||
foreach (Wedstrijden a in wedstrijden)
|
||||
{
|
||||
if(a.wedstrijdID == ID)
|
||||
{
|
||||
lijst2.Add(a.geldThuisPloeg + "");
|
||||
lijst2.Add(a.geldGelijk + "");
|
||||
lijst2.Add(a.geldUitPloeg + "");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lijst2.Add("None");
|
||||
lijst2.Add("None");
|
||||
lijst2.Add("None");
|
||||
}
|
||||
return lijst2;
|
||||
}
|
||||
public int[] GetPersoonID()
|
||||
{
|
||||
return personenMetId.Keys.ToArray();
|
||||
}
|
||||
public int[] GetWedstrijdID()
|
||||
{
|
||||
int[] wedstrijdID = new int[wedstrijden.Count];
|
||||
int teller = 0;
|
||||
foreach (Wedstrijden w in wedstrijden)
|
||||
{
|
||||
wedstrijdID[teller] = w.wedstrijdID;
|
||||
teller++;
|
||||
}
|
||||
return wedstrijdID;
|
||||
}
|
||||
private Wedstrijden GetWedstrijd(int ID)
|
||||
{
|
||||
foreach(Wedstrijden w in wedstrijden)
|
||||
{
|
||||
if(w.wedstrijdID == ID)
|
||||
{
|
||||
return w;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public double GetWinst(int ID)
|
||||
{
|
||||
double winst = 0;
|
||||
foreach (Keuze k in keuzes)
|
||||
{
|
||||
if(k.spelerID == ID)
|
||||
{
|
||||
Gokken g = k.gok;
|
||||
double temp = k.inzet;
|
||||
Wedstrijden w = GetWedstrijd(k.matchID);
|
||||
Gokken uitKomst = w.GetWinnaar();
|
||||
if(uitKomst == g)
|
||||
{
|
||||
switch (uitKomst)
|
||||
{
|
||||
case Gokken.Gelijk:
|
||||
winst += temp * w.geldGelijk;
|
||||
break;
|
||||
case Gokken.Thuisploeg:
|
||||
winst += temp * w.geldThuisPloeg;
|
||||
break;
|
||||
case Gokken.Uitploeg:
|
||||
winst += temp * w.geldUitPloeg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return winst;
|
||||
}
|
||||
|
||||
private Persoon GetPersoon(int id)
|
||||
{
|
||||
return personenMetId[id];
|
||||
}
|
||||
|
||||
public void ClonePersoon(int id)
|
||||
{
|
||||
try
|
||||
{
|
||||
Persoon clone = GetPersoon(id);
|
||||
|
||||
int [] lijst = GetPersoonID();
|
||||
int fixedID = lijst.Max()+1;
|
||||
//clone.persoonID = fixedID;
|
||||
Persoon test = new Persoon(clone);
|
||||
test.persoonID = fixedID;
|
||||
personen.Add(new Persoon(test));
|
||||
FixDictonary();
|
||||
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
//throw new Exception("Persoon kon niet gevonden worden met id, desync van de getId lijst op ui");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void ClearList()
|
||||
{
|
||||
wedstrijden = new List<Wedstrijden>();
|
||||
personen = new List<Persoon>();
|
||||
keuzes = new List<Keuze>();
|
||||
}
|
||||
}
|
||||
}
|
81
Blok2 Online Gokkantoor/LogicLayer/Keuze.cs
Normal file
81
Blok2 Online Gokkantoor/LogicLayer/Keuze.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using DataLaag.Interfaces;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace LogicLayer
|
||||
{
|
||||
public class Keuze : IFKeuze
|
||||
{
|
||||
|
||||
public int matchID { get; set; }
|
||||
public int spelerID { get; set; }
|
||||
public double inzet { get; set; }
|
||||
public Gokken gok { get; set; } // thuis uit of gelijk
|
||||
|
||||
[JsonConstructor]
|
||||
public Keuze(int matchID, int spelerID, double inzet, Gokken gok)
|
||||
{
|
||||
string naam = "";
|
||||
string data = "";
|
||||
string varNaam = $"Probleem bij het ingeven van {naam} met waarde {data}";
|
||||
try
|
||||
{
|
||||
this.matchID = matchID;
|
||||
|
||||
} catch (Exception e)
|
||||
{
|
||||
naam = "matchID";
|
||||
data = matchID + "";
|
||||
throw new Exception(varNaam);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.spelerID = spelerID;
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
naam = "spelerID";
|
||||
data = spelerID + "";
|
||||
throw new Exception(varNaam);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.inzet = inzet;
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
naam = "inzet";
|
||||
data = inzet + "";
|
||||
throw new Exception(varNaam);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.gok = gok;
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
naam = "gok";
|
||||
data = gok + "";
|
||||
throw new Exception(varNaam);
|
||||
}
|
||||
}
|
||||
public Keuze(Keuze keuze)
|
||||
{
|
||||
this.gok = keuze.gok;
|
||||
this.inzet = keuze.inzet;
|
||||
this.matchID = keuze.matchID;
|
||||
this.spelerID = keuze.spelerID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
63
Blok2 Online Gokkantoor/LogicLayer/LogicLayer.csproj
Normal file
63
Blok2 Online Gokkantoor/LogicLayer/LogicLayer.csproj
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{517C3448-BD87-4D62-9316-6BABBC9A9CFC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LogicLayer</RootNamespace>
|
||||
<AssemblyName>LogicLayer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="General.cs" />
|
||||
<Compile Include="Keuze.cs" />
|
||||
<Compile Include="Persoon.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Wedstrijden.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataLaag\DataLaag.csproj">
|
||||
<Project>{ca62d8ea-2739-4c85-81b4-fba040592dae}</Project>
|
||||
<Name>DataLaag</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
99
Blok2 Online Gokkantoor/LogicLayer/Persoon.cs
Normal file
99
Blok2 Online Gokkantoor/LogicLayer/Persoon.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using DataLaag.Interfaces;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace LogicLayer
|
||||
{
|
||||
public class Persoon : IFPersoon
|
||||
{
|
||||
public int persoonID { get; set; }
|
||||
public string voorNaam { get; set; }
|
||||
public string naam { get; set; }
|
||||
public string adres { get; set; }
|
||||
public string gsm { get; set; }
|
||||
public double balans { get; set; }
|
||||
|
||||
[JsonConstructor]
|
||||
public Persoon(int persoonID, string voorNaam, string naam, string adres, string gsm, double balans)
|
||||
{
|
||||
string varNaam = "", data = "", er = $"Foutieve ingave: Probleem ingeven {varNaam} controleer syntax van {data}";
|
||||
|
||||
try
|
||||
{
|
||||
this.persoonID = persoonID;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
varNaam = "persoonID";
|
||||
data = persoonID + "";
|
||||
throw new Exception($"Foutieve ingave: Probleem aanmaken {varNaam} zie databank voor waarde {data}");
|
||||
}
|
||||
try
|
||||
{
|
||||
this.voorNaam = voorNaam;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
varNaam = "voorNaam";
|
||||
data = voorNaam + "";
|
||||
throw new Exception(er);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.naam = naam;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
varNaam = "naam";
|
||||
data = naam + "";
|
||||
throw new Exception(er);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.adres = adres;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
varNaam = "adres";
|
||||
data = adres + "";
|
||||
throw new Exception(er);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.gsm = gsm;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
varNaam = "gsm nummer";
|
||||
data = gsm + "";
|
||||
throw new Exception(er);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.balans = balans;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
varNaam = "balans";
|
||||
data = balans + "";
|
||||
throw new Exception($"Foutieve ingave: een probleem bij het setten van de {varNaam} : {data}");
|
||||
}
|
||||
}
|
||||
public Persoon(Persoon persoon)
|
||||
{
|
||||
persoonID = persoon.persoonID;
|
||||
voorNaam = persoon.voorNaam;
|
||||
naam = persoon.naam + " BACK UP";
|
||||
adres = persoon.adres;
|
||||
gsm = persoon.gsm;
|
||||
balans = persoon.balans;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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")]
|
124
Blok2 Online Gokkantoor/LogicLayer/Wedstrijden.cs
Normal file
124
Blok2 Online Gokkantoor/LogicLayer/Wedstrijden.cs
Normal file
@@ -0,0 +1,124 @@
|
||||
using DataLaag.Interfaces;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace LogicLayer
|
||||
{
|
||||
public class Wedstrijden : IFWedstrijden
|
||||
{
|
||||
public int wedstrijdID { get; set; }
|
||||
public string thuisPloeg { get; set; }
|
||||
public string uitPloeg { get; set; }
|
||||
public int scoreThuisPloeg { get; set; }
|
||||
public int scoreUitPloeg { get; set; }
|
||||
public double geldThuisPloeg { get; set; }
|
||||
public double geldGelijk { get; set; }
|
||||
public double geldUitPloeg { get; set; }
|
||||
|
||||
|
||||
[JsonConstructor]
|
||||
public Wedstrijden(int wedstrijdID, string thuisPloeg, string uitPloeg, int scoreThuisPloeg, int scoreUitPloeg, double geldThuisPloeg, double geldGelijk, double geldUitPloeg)
|
||||
{
|
||||
string varNaam = "", data = "", error = $"Probleem bij het invoeren van {varNaam} met de waarde {data}";
|
||||
try
|
||||
{
|
||||
this.wedstrijdID = wedstrijdID;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "wedstrijdID";
|
||||
data = wedstrijdID + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.thuisPloeg = thuisPloeg;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "thuisPloeg";
|
||||
data = thuisPloeg + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.uitPloeg = uitPloeg;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "uitPloeg";
|
||||
data = uitPloeg + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.scoreThuisPloeg = scoreThuisPloeg;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "scoreThuisPloeg";
|
||||
data = scoreThuisPloeg + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.scoreUitPloeg = scoreUitPloeg;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "scoreUitPloeg";
|
||||
data = scoreUitPloeg + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.geldThuisPloeg = geldThuisPloeg;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "geldThuisPloeg";
|
||||
data = geldThuisPloeg + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.geldGelijk = geldGelijk;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "geldGelijk";
|
||||
data = geldGelijk + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
try
|
||||
{
|
||||
this.geldUitPloeg = geldUitPloeg;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
varNaam = "geldUitPloeg";
|
||||
data = geldUitPloeg + "";
|
||||
throw new Exception(error);
|
||||
}
|
||||
}
|
||||
|
||||
public Gokken GetWinnaar()
|
||||
{
|
||||
if(scoreThuisPloeg > scoreUitPloeg)
|
||||
{
|
||||
return Gokken.Thuisploeg;
|
||||
}else if(scoreUitPloeg > scoreThuisPloeg)
|
||||
{
|
||||
return Gokken.Uitploeg;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Gokken.Gelijk;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
4
Blok2 Online Gokkantoor/LogicLayer/packages.config
Normal file
4
Blok2 Online Gokkantoor/LogicLayer/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
43
Blok2 Online Gokkantoor/Online Gokkantoor Blok2.sln
Normal file
43
Blok2 Online Gokkantoor/Online Gokkantoor Blok2.sln
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2026
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Online GokkantoorGUI", "Online Gokkantoor\Online GokkantoorGUI.csproj", "{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataLaag", "DataLaag\DataLaag.csproj", "{CA62D8EA-2739-4C85-81B4-FBA040592DAE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogicLayer", "LogicLayer\LogicLayer.csproj", "{517C3448-BD87-4D62-9316-6BABBC9A9CFC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Info", "Opstarten\Info.csproj", "{8F83F7BE-61E6-4128-9269-4865CC8C5259}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CA62D8EA-2739-4C85-81B4-FBA040592DAE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{517C3448-BD87-4D62-9316-6BABBC9A9CFC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F83F7BE-61E6-4128-9269-4865CC8C5259}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {13B0BD72-57FE-4A9D-86CA-848D0C9EE5EB}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
393
Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
generated
Normal file
393
Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
generated
Normal file
@@ -0,0 +1,393 @@
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
partial class Aanmeldscherm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.titel = new System.Windows.Forms.Label();
|
||||
this.voornaam = new System.Windows.Forms.Label();
|
||||
this.naam = new System.Windows.Forms.Label();
|
||||
this.textVoornaam = new System.Windows.Forms.TextBox();
|
||||
this.textNaam = new System.Windows.Forms.TextBox();
|
||||
this.adres = new System.Windows.Forms.Label();
|
||||
this.textAdres = new System.Windows.Forms.TextBox();
|
||||
this.textGsm = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.labelMatch = new System.Windows.Forms.Label();
|
||||
this.comboKeuze = new System.Windows.Forms.ComboBox();
|
||||
this.labelThuisploeg = new System.Windows.Forms.Label();
|
||||
this.labelGelijk = new System.Windows.Forms.Label();
|
||||
this.labelUitploeg = new System.Windows.Forms.Label();
|
||||
this.buttonGokken = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textInzet = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.button2 = new System.Windows.Forms.Button();
|
||||
this.gebruikersBox = new System.Windows.Forms.ListBox();
|
||||
this.matchbox = new System.Windows.Forms.ListBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
this.labelError = new System.Windows.Forms.Label();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.labelWinst = new System.Windows.Forms.Label();
|
||||
this.euroTeken = new System.Windows.Forms.Label();
|
||||
this.buttonCloneGebruiker = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// titel
|
||||
//
|
||||
this.titel.AutoSize = true;
|
||||
this.titel.Location = new System.Drawing.Point(576, 40);
|
||||
this.titel.Name = "titel";
|
||||
this.titel.Size = new System.Drawing.Size(94, 13);
|
||||
this.titel.TabIndex = 0;
|
||||
this.titel.Text = "Vul je gegevens in";
|
||||
//
|
||||
// voornaam
|
||||
//
|
||||
this.voornaam.AutoSize = true;
|
||||
this.voornaam.Location = new System.Drawing.Point(443, 59);
|
||||
this.voornaam.Name = "voornaam";
|
||||
this.voornaam.Size = new System.Drawing.Size(55, 13);
|
||||
this.voornaam.TabIndex = 1;
|
||||
this.voornaam.Text = "Voornaam";
|
||||
//
|
||||
// naam
|
||||
//
|
||||
this.naam.AutoSize = true;
|
||||
this.naam.Location = new System.Drawing.Point(463, 84);
|
||||
this.naam.Name = "naam";
|
||||
this.naam.Size = new System.Drawing.Size(35, 13);
|
||||
this.naam.TabIndex = 2;
|
||||
this.naam.Text = "Naam";
|
||||
//
|
||||
// textVoornaam
|
||||
//
|
||||
this.textVoornaam.Location = new System.Drawing.Point(519, 56);
|
||||
this.textVoornaam.Name = "textVoornaam";
|
||||
this.textVoornaam.Size = new System.Drawing.Size(225, 20);
|
||||
this.textVoornaam.TabIndex = 3;
|
||||
//
|
||||
// textNaam
|
||||
//
|
||||
this.textNaam.Location = new System.Drawing.Point(519, 81);
|
||||
this.textNaam.Name = "textNaam";
|
||||
this.textNaam.Size = new System.Drawing.Size(225, 20);
|
||||
this.textNaam.TabIndex = 4;
|
||||
//
|
||||
// adres
|
||||
//
|
||||
this.adres.AutoSize = true;
|
||||
this.adres.Location = new System.Drawing.Point(463, 109);
|
||||
this.adres.Name = "adres";
|
||||
this.adres.Size = new System.Drawing.Size(34, 13);
|
||||
this.adres.TabIndex = 5;
|
||||
this.adres.Text = "Adres";
|
||||
//
|
||||
// textAdres
|
||||
//
|
||||
this.textAdres.Location = new System.Drawing.Point(519, 106);
|
||||
this.textAdres.Name = "textAdres";
|
||||
this.textAdres.Size = new System.Drawing.Size(225, 20);
|
||||
this.textAdres.TabIndex = 6;
|
||||
//
|
||||
// textGsm
|
||||
//
|
||||
this.textGsm.Location = new System.Drawing.Point(519, 132);
|
||||
this.textGsm.Name = "textGsm";
|
||||
this.textGsm.Size = new System.Drawing.Size(225, 20);
|
||||
this.textGsm.TabIndex = 7;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(470, 135);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(28, 13);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "Gsm";
|
||||
//
|
||||
// labelMatch
|
||||
//
|
||||
this.labelMatch.AutoSize = true;
|
||||
this.labelMatch.Location = new System.Drawing.Point(179, 238);
|
||||
this.labelMatch.Name = "labelMatch";
|
||||
this.labelMatch.Size = new System.Drawing.Size(108, 13);
|
||||
this.labelMatch.TabIndex = 9;
|
||||
this.labelMatch.Text = "Geselecteerde match";
|
||||
//
|
||||
// comboKeuze
|
||||
//
|
||||
this.comboKeuze.FormattingEnabled = true;
|
||||
this.comboKeuze.Location = new System.Drawing.Point(293, 233);
|
||||
this.comboKeuze.Name = "comboKeuze";
|
||||
this.comboKeuze.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboKeuze.TabIndex = 10;
|
||||
//
|
||||
// labelThuisploeg
|
||||
//
|
||||
this.labelThuisploeg.AutoSize = true;
|
||||
this.labelThuisploeg.Location = new System.Drawing.Point(516, 238);
|
||||
this.labelThuisploeg.Name = "labelThuisploeg";
|
||||
this.labelThuisploeg.Size = new System.Drawing.Size(59, 13);
|
||||
this.labelThuisploeg.TabIndex = 11;
|
||||
this.labelThuisploeg.Text = "Thuisploeg";
|
||||
//
|
||||
// labelGelijk
|
||||
//
|
||||
this.labelGelijk.AutoSize = true;
|
||||
this.labelGelijk.Location = new System.Drawing.Point(619, 238);
|
||||
this.labelGelijk.Name = "labelGelijk";
|
||||
this.labelGelijk.Size = new System.Drawing.Size(33, 13);
|
||||
this.labelGelijk.TabIndex = 12;
|
||||
this.labelGelijk.Text = "Gelijk";
|
||||
//
|
||||
// labelUitploeg
|
||||
//
|
||||
this.labelUitploeg.AutoSize = true;
|
||||
this.labelUitploeg.Location = new System.Drawing.Point(698, 236);
|
||||
this.labelUitploeg.Name = "labelUitploeg";
|
||||
this.labelUitploeg.Size = new System.Drawing.Size(46, 13);
|
||||
this.labelUitploeg.TabIndex = 13;
|
||||
this.labelUitploeg.Text = "Uitploeg";
|
||||
//
|
||||
// buttonGokken
|
||||
//
|
||||
this.buttonGokken.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
|
||||
this.buttonGokken.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
|
||||
this.buttonGokken.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.buttonGokken.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.buttonGokken.Location = new System.Drawing.Point(339, 367);
|
||||
this.buttonGokken.Name = "buttonGokken";
|
||||
this.buttonGokken.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonGokken.TabIndex = 14;
|
||||
this.buttonGokken.Text = "GOKKEN";
|
||||
this.buttonGokken.UseVisualStyleBackColor = false;
|
||||
this.buttonGokken.Click += new System.EventHandler(this.knopGokken);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(257, 290);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(30, 13);
|
||||
this.label2.TabIndex = 16;
|
||||
this.label2.Text = "Inzet";
|
||||
//
|
||||
// textInzet
|
||||
//
|
||||
this.textInzet.Location = new System.Drawing.Point(293, 283);
|
||||
this.textInzet.Name = "textInzet";
|
||||
this.textInzet.Size = new System.Drawing.Size(90, 20);
|
||||
this.textInzet.TabIndex = 17;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(578, 9);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(92, 13);
|
||||
this.label3.TabIndex = 19;
|
||||
this.label3.Text = "Nieuwe Gebruiker";
|
||||
//
|
||||
// button2
|
||||
//
|
||||
this.button2.Location = new System.Drawing.Point(581, 158);
|
||||
this.button2.Name = "button2";
|
||||
this.button2.Size = new System.Drawing.Size(163, 28);
|
||||
this.button2.TabIndex = 20;
|
||||
this.button2.Text = "Gebruiker Toevoegen";
|
||||
this.button2.UseVisualStyleBackColor = true;
|
||||
this.button2.Click += new System.EventHandler(this.knopGebruikerToevoegen);
|
||||
//
|
||||
// gebruikersBox
|
||||
//
|
||||
this.gebruikersBox.FormattingEnabled = true;
|
||||
this.gebruikersBox.Location = new System.Drawing.Point(13, 40);
|
||||
this.gebruikersBox.Name = "gebruikersBox";
|
||||
this.gebruikersBox.Size = new System.Drawing.Size(274, 160);
|
||||
this.gebruikersBox.TabIndex = 21;
|
||||
this.gebruikersBox.SelectedIndexChanged += new System.EventHandler(this.GebruikersBox_SelectedIndexChanged);
|
||||
//
|
||||
// matchbox
|
||||
//
|
||||
this.matchbox.FormattingEnabled = true;
|
||||
this.matchbox.Location = new System.Drawing.Point(13, 230);
|
||||
this.matchbox.Name = "matchbox";
|
||||
this.matchbox.Size = new System.Drawing.Size(160, 160);
|
||||
this.matchbox.TabIndex = 22;
|
||||
this.matchbox.SelectedIndexChanged += new System.EventHandler(this.matchbox_SelectedIndexChanged);
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(12, 24);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(61, 13);
|
||||
this.label4.TabIndex = 23;
|
||||
this.label4.Text = "Gebruikers:";
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.Location = new System.Drawing.Point(10, 214);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(49, 13);
|
||||
this.label5.TabIndex = 24;
|
||||
this.label5.Text = "Matchen";
|
||||
//
|
||||
// button3
|
||||
//
|
||||
this.button3.Location = new System.Drawing.Point(713, 415);
|
||||
this.button3.Name = "button3";
|
||||
this.button3.Size = new System.Drawing.Size(75, 23);
|
||||
this.button3.TabIndex = 25;
|
||||
this.button3.Text = "exit";
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.knopExit);
|
||||
//
|
||||
// labelError
|
||||
//
|
||||
this.labelError.AutoSize = true;
|
||||
this.labelError.Location = new System.Drawing.Point(524, 167);
|
||||
this.labelError.Name = "labelError";
|
||||
this.labelError.Size = new System.Drawing.Size(0, 13);
|
||||
this.labelError.TabIndex = 26;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Location = new System.Drawing.Point(309, 56);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(37, 13);
|
||||
this.label6.TabIndex = 27;
|
||||
this.label6.Text = "Winst:";
|
||||
//
|
||||
// labelWinst
|
||||
//
|
||||
this.labelWinst.AutoSize = true;
|
||||
this.labelWinst.Location = new System.Drawing.Point(309, 88);
|
||||
this.labelWinst.Name = "labelWinst";
|
||||
this.labelWinst.Size = new System.Drawing.Size(0, 13);
|
||||
this.labelWinst.TabIndex = 28;
|
||||
//
|
||||
// euroTeken
|
||||
//
|
||||
this.euroTeken.AutoSize = true;
|
||||
this.euroTeken.Location = new System.Drawing.Point(389, 290);
|
||||
this.euroTeken.Name = "euroTeken";
|
||||
this.euroTeken.Size = new System.Drawing.Size(13, 13);
|
||||
this.euroTeken.TabIndex = 29;
|
||||
this.euroTeken.Text = "€";
|
||||
//
|
||||
// buttonCloneGebruiker
|
||||
//
|
||||
this.buttonCloneGebruiker.Location = new System.Drawing.Point(293, 177);
|
||||
this.buttonCloneGebruiker.Name = "buttonCloneGebruiker";
|
||||
this.buttonCloneGebruiker.Size = new System.Drawing.Size(90, 23);
|
||||
this.buttonCloneGebruiker.TabIndex = 30;
|
||||
this.buttonCloneGebruiker.Text = "Clone Gebruiker";
|
||||
this.buttonCloneGebruiker.UseVisualStyleBackColor = true;
|
||||
this.buttonCloneGebruiker.Click += new System.EventHandler(this.buttonCloneGebruiker_Click);
|
||||
//
|
||||
// Aanmeldscherm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Controls.Add(this.buttonCloneGebruiker);
|
||||
this.Controls.Add(this.euroTeken);
|
||||
this.Controls.Add(this.labelWinst);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Controls.Add(this.labelError);
|
||||
this.Controls.Add(this.button3);
|
||||
this.Controls.Add(this.label5);
|
||||
this.Controls.Add(this.label4);
|
||||
this.Controls.Add(this.matchbox);
|
||||
this.Controls.Add(this.gebruikersBox);
|
||||
this.Controls.Add(this.button2);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.textInzet);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.buttonGokken);
|
||||
this.Controls.Add(this.labelUitploeg);
|
||||
this.Controls.Add(this.labelGelijk);
|
||||
this.Controls.Add(this.labelThuisploeg);
|
||||
this.Controls.Add(this.comboKeuze);
|
||||
this.Controls.Add(this.labelMatch);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.textGsm);
|
||||
this.Controls.Add(this.textAdres);
|
||||
this.Controls.Add(this.adres);
|
||||
this.Controls.Add(this.textNaam);
|
||||
this.Controls.Add(this.textVoornaam);
|
||||
this.Controls.Add(this.naam);
|
||||
this.Controls.Add(this.voornaam);
|
||||
this.Controls.Add(this.titel);
|
||||
this.Name = "Aanmeldscherm";
|
||||
this.Text = "Aanmeldscherm";
|
||||
this.Load += new System.EventHandler(this.Aanmeldscherm_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label titel;
|
||||
private System.Windows.Forms.Label voornaam;
|
||||
private System.Windows.Forms.Label naam;
|
||||
private System.Windows.Forms.TextBox textVoornaam;
|
||||
private System.Windows.Forms.TextBox textNaam;
|
||||
private System.Windows.Forms.Label adres;
|
||||
private System.Windows.Forms.TextBox textAdres;
|
||||
private System.Windows.Forms.TextBox textGsm;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label labelMatch;
|
||||
private System.Windows.Forms.ComboBox comboKeuze;
|
||||
private System.Windows.Forms.Label labelThuisploeg;
|
||||
private System.Windows.Forms.Label labelGelijk;
|
||||
private System.Windows.Forms.Label labelUitploeg;
|
||||
private System.Windows.Forms.Button buttonGokken;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox textInzet;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button button2;
|
||||
private System.Windows.Forms.ListBox gebruikersBox;
|
||||
private System.Windows.Forms.ListBox matchbox;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.Label labelError;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Label labelWinst;
|
||||
private System.Windows.Forms.Label euroTeken;
|
||||
private System.Windows.Forms.Button buttonCloneGebruiker;
|
||||
}
|
||||
}
|
195
Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
Normal file
195
Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
Normal file
@@ -0,0 +1,195 @@
|
||||
using DataLaag;
|
||||
using LogicLayer;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
public partial class Aanmeldscherm : Form
|
||||
{
|
||||
private int[] persoonID;
|
||||
private int[] wedstrijdID;
|
||||
private General g;
|
||||
private List<Persoon> personen = new List<Persoon>();
|
||||
private string[] uitkomsten = { "Uitploeg", "Gelijk", "Thuisploeg" };
|
||||
public Aanmeldscherm()
|
||||
{
|
||||
InitializeComponent();
|
||||
try
|
||||
{
|
||||
g = new General();
|
||||
g.Deserialize();
|
||||
UpdateUI();
|
||||
|
||||
}
|
||||
catch (System.NullReferenceException probleem)
|
||||
{
|
||||
Debug.WriteLine(probleem);
|
||||
}
|
||||
catch (Exception e )
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(e + "");
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateUI()
|
||||
{
|
||||
gebruikersBox.DataSource = g.GetGebruikers();
|
||||
matchbox.DataSource = g.GetWedstrijden();
|
||||
persoonID = g.GetPersoonID();
|
||||
wedstrijdID = g.GetWedstrijdID();
|
||||
labelError.Text = "";
|
||||
}
|
||||
private void Save()
|
||||
{
|
||||
string nieuw = JsonConvert.SerializeObject(personen);
|
||||
Debug.WriteLine(nieuw);
|
||||
}
|
||||
|
||||
private string RandomGok()
|
||||
{
|
||||
Random randm = new Random();
|
||||
int willekeurigeGok = randm.Next(0, 2);
|
||||
return uitkomsten[willekeurigeGok];
|
||||
|
||||
}
|
||||
|
||||
private void knopGokken(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
int gebruikerID = persoonID[gebruikersBox.SelectedIndex];
|
||||
int matchID = wedstrijdID[matchbox.SelectedIndex];
|
||||
g.PlaatsGok(matchID, gebruikerID, Double.Parse(textInzet.Text), comboKeuze.Items[comboKeuze.SelectedIndex].ToString());
|
||||
}
|
||||
catch (System.NullReferenceException probleem)
|
||||
{
|
||||
Debug.WriteLine(probleem);
|
||||
}
|
||||
catch (System.ArgumentOutOfRangeException)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show("Zorg ervoor dat een geldige gebruiker, match en uitkomst geselecteerd zijn.");
|
||||
}
|
||||
catch (System.FormatException error)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show($"Kan {textInzet.Text} niet omzetten naar double");
|
||||
}
|
||||
catch (Exception e2)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(e2 + "");
|
||||
}
|
||||
}
|
||||
|
||||
private void matchbox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
labelMatch.Text = (string)this.matchbox.SelectedItem;
|
||||
List<string> geld = g.GetGeldVerdubbeling(wedstrijdID[matchbox.SelectedIndex]);
|
||||
labelThuisploeg.Text = "Thuisploeg:" + geld[0];
|
||||
labelGelijk.Text = "Gelijk:" + geld[1];
|
||||
labelUitploeg.Text = "Uitploeg:" + geld[2];
|
||||
|
||||
}
|
||||
catch (System.NullReferenceException probleem)
|
||||
{
|
||||
Debug.WriteLine(probleem);
|
||||
}
|
||||
catch (Exception exceptie)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(exceptie + "");
|
||||
}
|
||||
//UpdateUI();
|
||||
}
|
||||
|
||||
private void Aanmeldscherm_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
labelThuisploeg.Text = "Thuisploeg:";
|
||||
labelGelijk.Text = "Gelijk:";
|
||||
labelUitploeg.Text = "Uitploeg:";
|
||||
|
||||
foreach(string s in uitkomsten)
|
||||
{
|
||||
comboKeuze.Items.Add(s);
|
||||
}
|
||||
}
|
||||
|
||||
private void GebruikersBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
int ID = persoonID[gebruikersBox.SelectedIndex];
|
||||
|
||||
labelWinst.Text = g.GetWinst(ID) + "€";
|
||||
|
||||
}
|
||||
catch (System.NullReferenceException probleem)
|
||||
{
|
||||
Debug.WriteLine(probleem);
|
||||
}
|
||||
catch (Exception e1)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(e1 + "");
|
||||
}
|
||||
}
|
||||
|
||||
private void knopGebruikerToevoegen(object sender, EventArgs e)
|
||||
{
|
||||
string tmp = "";
|
||||
if (textVoornaam.Text.Length == 0) tmp+= "\n een voornaam";
|
||||
if (textNaam.Text.Length == 0) tmp += "\n een naam";
|
||||
if (textAdres.Text.Length == 0) tmp += "\n een adres";
|
||||
if (textGsm.Text.Length == 0) tmp += "\n een gsm nummer";
|
||||
if (tmp.Length > 0)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show($"Please geef volgende argumenten: {tmp}");
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
g.GebruikerToevoegen(textVoornaam.Text, textNaam.Text, textAdres.Text, textGsm.Text);
|
||||
UpdateUI();
|
||||
}
|
||||
catch (System.NullReferenceException probleem)
|
||||
{
|
||||
Debug.WriteLine(probleem);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(ex + "");
|
||||
}
|
||||
}
|
||||
|
||||
private void knopExit(object sender, EventArgs e)
|
||||
{
|
||||
UpdateUI();
|
||||
g.Serialize();
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonCloneGebruiker_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
g.ClonePersoon(persoonID[gebruikersBox.SelectedIndex]);
|
||||
UpdateUI();
|
||||
}
|
||||
catch(Exception except)
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(except + "");
|
||||
UpdateUI(); //fix de ui omdat de lijst van indexen gebroken is.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
Normal file
120
Blok2 Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
6
Blok2 Online Gokkantoor/Online Gokkantoor/App.config
Normal file
6
Blok2 Online Gokkantoor/Online Gokkantoor/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
</startup>
|
||||
</configuration>
|
39
Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.Designer.cs
generated
Normal file
39
Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.Designer.cs
generated
Normal file
@@ -0,0 +1,39 @@
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
partial class NieuweMatch
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
||||
this.Text = "NieuweMatch";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
20
Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.cs
Normal file
20
Blok2 Online Gokkantoor/Online Gokkantoor/NieuweMatch.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
public partial class NieuweMatch : Form
|
||||
{
|
||||
public NieuweMatch()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Online_Gokkantoor</RootNamespace>
|
||||
<AssemblyName>Online Gokkantoor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Aanmeldscherm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Aanmeldscherm.Designer.cs">
|
||||
<DependentUpon>Aanmeldscherm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NieuweMatch.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="NieuweMatch.Designer.cs">
|
||||
<DependentUpon>NieuweMatch.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Aanmeldscherm.resx">
|
||||
<DependentUpon>Aanmeldscherm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Voorstel_COO.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataLaag\DataLaag.csproj">
|
||||
<Project>{ca62d8ea-2739-4c85-81b4-fba040592dae}</Project>
|
||||
<Name>DataLaag</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LogicLayer\LogicLayer.csproj">
|
||||
<Project>{517c3448-bd87-4d62-9316-6babbc9a9cfc}</Project>
|
||||
<Name>LogicLayer</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
29
Blok2 Online Gokkantoor/Online Gokkantoor/Program.cs
Normal file
29
Blok2 Online Gokkantoor/Online Gokkantoor/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Aanmeldscherm());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -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")]
|
63
Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
generated
Normal file
63
Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Online_Gokkantoor.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Online_Gokkantoor.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
26
Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
generated
Normal file
26
Blok2 Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Online_Gokkantoor.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
48
Blok2 Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
Normal file
48
Blok2 Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
C# OO - zelfevaluatie
|
||||
=========================================
|
||||
|
||||
Naam: Michiel Van Dorpe
|
||||
Datum: 3 oktober 2018
|
||||
Volgnummer blok: 1
|
||||
|
||||
Onderwerp: Online gokkantoor
|
||||
|
||||
Beschrijving:
|
||||
|
||||
Met behulp van deze toepassing kan er een simulatie gemaakt worden waarbij er gegokt kan worden op wedstrijden.
|
||||
|
||||
Functionele beschrijving:
|
||||
|
||||
De bezoeker zal eerst en vooral een keuzeformulier voorgeschoten krijgen met daarop de wedstrijden waar er gegokt op kan worden.
|
||||
Dit keuzeformulier zal dus bestaan uit wedstrijden, een woordje uitleg en de mogelijkheid om naar een GUI-toepassing te gaan.
|
||||
|
||||
In deze GUI-toepassing zullen personen kunnen toegevoegd worden die deelnemen aan het gokkantoor,
|
||||
hier zullen persoonlijke gegevens worden ingegeven met daarbij de wedstrijd(en) waarop er deelgenomen wordt.
|
||||
|
||||
Eens deze correct is ingevuld (18+) zullen deze gegevens worden opgeslaan in een lokaal bestand.
|
||||
|
||||
Wanneer dit lokaal bestand is aangevuld kunnen de wedstrijden gesorteerd worden
|
||||
waarbij het duidelijk zichtbaar is hoeveel personen op gelijkspel, winst of verlies hebben gegokt.
|
||||
Hier zal dus ook de winnaar(s) bekend gemaakt worden.
|
||||
|
||||
Voor de routines die gemeenschappelijk vanuit beide toepassingen gebruikt worden,
|
||||
zal een afzonderlijke klassebibliotheek opgesteld worden (die vanuit beide toepassingen gebruikt wordt).
|
||||
|
||||
Leerdoelen:
|
||||
|
||||
Blok 1:
|
||||
|
||||
- kennismaking met Visual Studio & C#
|
||||
- debugging
|
||||
- unit tests
|
||||
- programmeerstijl
|
||||
- exception handling
|
||||
- enum
|
||||
- properties
|
||||
- generic collections
|
||||
- werken met bestanden/streams
|
||||
- objecten: cloning & serialisatie
|
||||
|
||||
Bijkomend:
|
||||
|
||||
- architectuur van een toepassing: meerlagenmodel
|
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
6
Blok2 Online Gokkantoor/Opstarten/App.config
Normal file
6
Blok2 Online Gokkantoor/Opstarten/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
53
Blok2 Online Gokkantoor/Opstarten/Info.csproj
Normal file
53
Blok2 Online Gokkantoor/Opstarten/Info.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8F83F7BE-61E6-4128-9269-4865CC8C5259}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Opstarten</RootNamespace>
|
||||
<AssemblyName>Opstarten</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
19
Blok2 Online Gokkantoor/Opstarten/Program.cs
Normal file
19
Blok2 Online Gokkantoor/Opstarten/Program.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Opstarten
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Welkom in het Online Gokkantoor");
|
||||
Console.WriteLine("Dit project is opgestart door Michiel Van Dorpe op datum 1/10/2018");
|
||||
Console.WriteLine("Duw op eender welke toets om te sluiten.");
|
||||
Console.ReadKey();
|
||||
}
|
||||
}
|
||||
}
|
36
Blok2 Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
Normal file
36
Blok2 Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Opstarten")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Opstarten")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8f83f7be-61e6-4128-9269-4865cc8c5259")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
52
Online Gokkantoor/ClassLibrary1/General.cs
Normal file
52
Online Gokkantoor/ClassLibrary1/General.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class General
|
||||
{
|
||||
/*
|
||||
bijna alle berekeningen voor het prorgamma gaan uit deze klasse komen
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* hier komen de wedstrijden en zo die je inlaad*/
|
||||
public List<Wedstrijden> wedstrijden { get; set; }
|
||||
public List<Persoon> personen { get; set; }
|
||||
public List<Keuze> keuzes { get; set; }
|
||||
public enum Gokken { ThuisPloeg, Gelijk, Uitploeg }
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
door gebruik van deze klassen kan je bekijken welk team gewonnen heeft en
|
||||
door gebruik van keuze kan je zien hoeveel de persoon met id x ingezet heeft en zo de winst berekenen.
|
||||
*/
|
||||
|
||||
public double Winst(int wedstrijdID, int persoonID, int keuzeID)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/*
|
||||
deze functie haalt een persoon uit de lijst van personen met de juiste id, best ook mss maken voor een wedstrijd en een keuze, gewoon voor gemak later.
|
||||
*/
|
||||
|
||||
public Persoon GetPersoonById(int id)
|
||||
{
|
||||
return new Persoon();
|
||||
}
|
||||
|
||||
public void OnLoad()
|
||||
{
|
||||
wedstrijden = Laad_Wedstrijden();
|
||||
}
|
||||
}
|
||||
}
|
19
Online Gokkantoor/ClassLibrary1/Keuze.cs
Normal file
19
Online Gokkantoor/ClassLibrary1/Keuze.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Logic.General;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class Keuze
|
||||
{
|
||||
|
||||
public int Match_ID { get; set; }
|
||||
public int Speler_ID { get; set; }
|
||||
public double Inzet { get; set; }
|
||||
public Gokken Gok { get; set; } // thuis uit of gelijk
|
||||
|
||||
}
|
||||
}
|
7
Online Gokkantoor/ClassLibrary1/Logic.csproj
Normal file
7
Online Gokkantoor/ClassLibrary1/Logic.csproj
Normal file
@@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard1.4</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
23
Online Gokkantoor/ClassLibrary1/Persoon.cs
Normal file
23
Online Gokkantoor/ClassLibrary1/Persoon.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Logic.General;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class Persoon
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public string Voornaam { get; set; }
|
||||
public string Naam { get; set; }
|
||||
public string Adres { get; set; }
|
||||
public string Gsm { get; set; }
|
||||
public double Balans { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
32
Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
Normal file
32
Online Gokkantoor/ClassLibrary1/Wedstrijden.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using static Logic.General;
|
||||
|
||||
namespace Logic
|
||||
{
|
||||
public class Wedstrijden
|
||||
{
|
||||
public int Wedstrijd_ID { get; set; }
|
||||
public string ThuisPloeg { get; set; }
|
||||
public string UitPloeg { get; set; }
|
||||
public int Score_ThuisPloeg { get; set; }
|
||||
public int Score_UitPloeg { get; set; }
|
||||
|
||||
public Gokken Winnaar()
|
||||
{
|
||||
if(Score_ThuisPloeg > Score_UitPloeg)
|
||||
{
|
||||
return Gokken.ThuisPloeg;
|
||||
}else if(Score_UitPloeg > Score_ThuisPloeg)
|
||||
{
|
||||
return Gokken.Uitploeg;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Gokken.Gelijk;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
6
Online Gokkantoor/Console/App.config
Normal file
6
Online Gokkantoor/Console/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
53
Online Gokkantoor/Console/ConsoleApp.csproj
Normal file
53
Online Gokkantoor/Console/ConsoleApp.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{75E1DDD1-C2F0-4C29-A95A-85A72D8C4948}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Console</RootNamespace>
|
||||
<AssemblyName>Console</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
20
Online Gokkantoor/Console/Program.cs
Normal file
20
Online Gokkantoor/Console/Program.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
36
Online Gokkantoor/Console/Properties/AssemblyInfo.cs
Normal file
36
Online Gokkantoor/Console/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("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")]
|
66
Online Gokkantoor/DataLaag/DataLaag.csproj
Normal file
66
Online Gokkantoor/DataLaag/DataLaag.csproj
Normal file
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CA62D8EA-2739-4C85-81B4-FBA040592DAE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DataLaag</RootNamespace>
|
||||
<AssemblyName>DataLaag</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="Interfaces\IFKeuze.cs" />
|
||||
<Compile Include="Interfaces\IFPersoon.cs" />
|
||||
<Compile Include="Interfaces\IFWedstrijden.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Gegevens\Keuzes.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="packages.config" />
|
||||
<Content Include="Gegevens\Personen.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Gegevens\Wedstrijden.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
13
Online Gokkantoor/DataLaag/Enums.cs
Normal file
13
Online Gokkantoor/DataLaag/Enums.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataLaag
|
||||
{
|
||||
public class Enums
|
||||
{
|
||||
public enum Gokken { Uitploeg, Gelijk, Thuisploeg}
|
||||
}
|
||||
}
|
1
Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
Normal file
1
Online Gokkantoor/DataLaag/Gegevens/Keuzes.json
Normal file
@@ -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}]
|
1
Online Gokkantoor/DataLaag/Gegevens/Personen.json
Normal file
1
Online Gokkantoor/DataLaag/Gegevens/Personen.json
Normal file
@@ -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}]
|
1
Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json
Normal file
1
Online Gokkantoor/DataLaag/Gegevens/Wedstrijden.json
Normal file
@@ -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}]
|
17
Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
Normal file
17
Online Gokkantoor/DataLaag/Interfaces/IFKeuze.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace DataLaag.Interfaces
|
||||
{
|
||||
public interface IFKeuze
|
||||
{
|
||||
int match_ID { get; set; }
|
||||
int speler_ID { get; set; }
|
||||
double inzet { get; set; }
|
||||
Gokken gok { get; set; }
|
||||
}
|
||||
}
|
18
Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
Normal file
18
Online Gokkantoor/DataLaag/Interfaces/IFPersoon.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DataLaag.Interfaces
|
||||
{
|
||||
public interface IFPersoon
|
||||
{
|
||||
int persoon_ID { get; set; }
|
||||
string voorNaam { get; set; }
|
||||
string naam { get; set; }
|
||||
string adres { get; set; }
|
||||
string gsm { get; set; }
|
||||
double balans { get; set; }
|
||||
}
|
||||
}
|
19
Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
Normal file
19
Online Gokkantoor/DataLaag/Interfaces/IFWedstrijden.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static DataLaag.Enums;
|
||||
|
||||
namespace DataLaag.Interfaces
|
||||
{
|
||||
public interface IFWedstrijden
|
||||
{
|
||||
int wedstrijd_ID { get; set; }
|
||||
string thuisPloeg { get; set; }
|
||||
string uitPloeg { get; set; }
|
||||
int score_ThuisPloeg { get; set; }
|
||||
int score_UitPloeg { get; set; }
|
||||
Gokken GetWinnaar();
|
||||
}
|
||||
}
|
36
Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
Normal file
36
Online Gokkantoor/DataLaag/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("DataLaag")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DataLaag")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("ca62d8ea-2739-4c85-81b4-fba040592dae")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
4
Online Gokkantoor/DataLaag/packages.config
Normal file
4
Online Gokkantoor/DataLaag/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
241
Online Gokkantoor/LogicLayer/General.cs
Normal file
241
Online Gokkantoor/LogicLayer/General.cs
Normal file
@@ -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> wedstrijden { get; set; }
|
||||
public List<Persoon> personen { get; set; }
|
||||
public List<Keuze> keuzes { get; set; }
|
||||
|
||||
public General()
|
||||
{
|
||||
wedstrijden = new List<Wedstrijden>();
|
||||
try
|
||||
{
|
||||
personen = new List<Persoon>();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new Exception("" + ex);
|
||||
}
|
||||
try
|
||||
{
|
||||
keuzes = new List<Keuze>();
|
||||
}catch (Exception e)
|
||||
{
|
||||
throw new Exception("" + e);
|
||||
}
|
||||
Deserialize();
|
||||
}
|
||||
|
||||
public void Deserialize()
|
||||
{
|
||||
using (StreamReader file = File.OpenText(@"Gegevens\Keuzes.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
keuzes = (List<Keuze>)serializer.Deserialize(file, typeof(List<Keuze>));
|
||||
|
||||
}
|
||||
using (StreamReader file = File.OpenText(@"Gegevens\Personen.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
personen = (List<Persoon>)serializer.Deserialize(file, typeof(List<Persoon>));
|
||||
}
|
||||
using (StreamReader file = File.OpenText(@"Gegevens\Wedstrijden.json"))
|
||||
{
|
||||
JsonSerializer serializer = new JsonSerializer();
|
||||
wedstrijden = (List<Wedstrijden>)serializer.Deserialize(file, typeof(List<Wedstrijden>));
|
||||
}
|
||||
wedstrijden = (wedstrijden == null) ? new List<Wedstrijden>() : wedstrijden;
|
||||
personen = (personen == null) ? new List<Persoon>() : personen;
|
||||
keuzes = (keuzes == null) ? new List<Keuze>() : 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<string> GetGebruikers()
|
||||
{
|
||||
List<string> lijst = new List<string>();
|
||||
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<string> GetWedstrijden()
|
||||
{
|
||||
List<string> temp = new List<string>();
|
||||
if (personen != null)
|
||||
{
|
||||
foreach (Wedstrijden w in wedstrijden)
|
||||
{
|
||||
temp.Add( w.thuisPloeg + " - " + w.uitPloeg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
temp.Add("None");
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
public List<string> GetGeldVerdubbeling(int ID)
|
||||
{
|
||||
List<string> lijst2 = new List<string>();
|
||||
if (personen != null)
|
||||
{
|
||||
foreach (Wedstrijden a in wedstrijden)
|
||||
{
|
||||
if(a.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;
|
||||
}
|
||||
}
|
||||
}
|
35
Online Gokkantoor/LogicLayer/Keuze.cs
Normal file
35
Online Gokkantoor/LogicLayer/Keuze.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
63
Online Gokkantoor/LogicLayer/LogicLayer.csproj
Normal file
63
Online Gokkantoor/LogicLayer/LogicLayer.csproj
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{517C3448-BD87-4D62-9316-6BABBC9A9CFC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>LogicLayer</RootNamespace>
|
||||
<AssemblyName>LogicLayer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="General.cs" />
|
||||
<Compile Include="Keuze.cs" />
|
||||
<Compile Include="Persoon.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Wedstrijden.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataLaag\DataLaag.csproj">
|
||||
<Project>{ca62d8ea-2739-4c85-81b4-fba040592dae}</Project>
|
||||
<Name>DataLaag</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
41
Online Gokkantoor/LogicLayer/Persoon.cs
Normal file
41
Online Gokkantoor/LogicLayer/Persoon.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
36
Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs
Normal file
36
Online Gokkantoor/LogicLayer/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("LogicLayer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("LogicLayer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("517c3448-bd87-4d62-9316-6babbc9a9cfc")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
48
Online Gokkantoor/LogicLayer/Wedstrijden.cs
Normal file
48
Online Gokkantoor/LogicLayer/Wedstrijden.cs
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
4
Online Gokkantoor/LogicLayer/packages.config
Normal file
4
Online Gokkantoor/LogicLayer/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
43
Online Gokkantoor/Online Gokkantoor.sln
Normal file
43
Online Gokkantoor/Online Gokkantoor.sln
Normal file
@@ -0,0 +1,43 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28010.2026
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Online 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
|
380
Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
generated
Normal file
380
Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.Designer.cs
generated
Normal file
@@ -0,0 +1,380 @@
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
partial class Aanmeldscherm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.titel = new System.Windows.Forms.Label();
|
||||
this.voornaam = new System.Windows.Forms.Label();
|
||||
this.naam = new System.Windows.Forms.Label();
|
||||
this.textVoornaam = new System.Windows.Forms.TextBox();
|
||||
this.textNaam = new System.Windows.Forms.TextBox();
|
||||
this.adres = new System.Windows.Forms.Label();
|
||||
this.textAdres = new System.Windows.Forms.TextBox();
|
||||
this.textGsm = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.labelMatch = new System.Windows.Forms.Label();
|
||||
this.comboKeuze = new System.Windows.Forms.ComboBox();
|
||||
this.labelThuisploeg = new System.Windows.Forms.Label();
|
||||
this.labelGelijk = new System.Windows.Forms.Label();
|
||||
this.labelUitploeg = new System.Windows.Forms.Label();
|
||||
this.buttonGokken = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.textInzet = new System.Windows.Forms.TextBox();
|
||||
this.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;
|
||||
}
|
||||
}
|
135
Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
Normal file
135
Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.cs
Normal file
@@ -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<Persoon> personen = new List<Persoon>();
|
||||
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<string> 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();
|
||||
}
|
||||
}
|
||||
}
|
120
Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
Normal file
120
Online Gokkantoor/Online Gokkantoor/Aanmeldscherm.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
6
Online Gokkantoor/Online Gokkantoor/App.config
Normal file
6
Online Gokkantoor/Online Gokkantoor/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
|
||||
</startup>
|
||||
</configuration>
|
103
Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj
Normal file
103
Online Gokkantoor/Online Gokkantoor/Online Gokkantoor_GUI.csproj
Normal file
@@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{62E2ECA5-72AF-4401-9FE3-D7BD5044D7E9}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Online_Gokkantoor</RootNamespace>
|
||||
<AssemblyName>Online Gokkantoor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Aanmeldscherm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Aanmeldscherm.Designer.cs">
|
||||
<DependentUpon>Aanmeldscherm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Aanmeldscherm.resx">
|
||||
<DependentUpon>Aanmeldscherm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Voorstel_COO.txt" />
|
||||
<Content Include="ZelfEvaluatie.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\DataLaag\DataLaag.csproj">
|
||||
<Project>{ca62d8ea-2739-4c85-81b4-fba040592dae}</Project>
|
||||
<Name>DataLaag</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\LogicLayer\LogicLayer.csproj">
|
||||
<Project>{517c3448-bd87-4d62-9316-6babbc9a9cfc}</Project>
|
||||
<Name>LogicLayer</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
29
Online Gokkantoor/Online Gokkantoor/Program.cs
Normal file
29
Online Gokkantoor/Online Gokkantoor/Program.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Online_Gokkantoor
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Aanmeldscherm());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -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")]
|
63
Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
generated
Normal file
63
Online Gokkantoor/Online Gokkantoor/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Online_Gokkantoor.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Online_Gokkantoor.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx
Normal file
117
Online Gokkantoor/Online Gokkantoor/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
26
Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
generated
Normal file
26
Online Gokkantoor/Online Gokkantoor/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Online_Gokkantoor.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
48
Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
Normal file
48
Online Gokkantoor/Online Gokkantoor/Voorstel_COO.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
C# OO - zelfevaluatie
|
||||
=========================================
|
||||
|
||||
Naam: Michiel Van Dorpe
|
||||
Datum: 3 oktober 2018
|
||||
Volgnummer blok: 1
|
||||
|
||||
Onderwerp: Online gokkantoor
|
||||
|
||||
Beschrijving:
|
||||
|
||||
Met behulp van deze toepassing kan er een simulatie gemaakt worden waarbij er gegokt kan worden op wedstrijden.
|
||||
|
||||
Functionele beschrijving:
|
||||
|
||||
De bezoeker zal eerst en vooral een keuzeformulier voorgeschoten krijgen met daarop de wedstrijden waar er gegokt op kan worden.
|
||||
Dit keuzeformulier zal dus bestaan uit wedstrijden, een woordje uitleg en de mogelijkheid om naar een GUI-toepassing te gaan.
|
||||
|
||||
In deze GUI-toepassing zullen personen kunnen toegevoegd worden die deelnemen aan het gokkantoor,
|
||||
hier zullen persoonlijke gegevens worden ingegeven met daarbij de wedstrijd(en) waarop er deelgenomen wordt.
|
||||
|
||||
Eens deze correct is ingevuld (18+) zullen deze gegevens worden opgeslaan in een lokaal bestand.
|
||||
|
||||
Wanneer dit lokaal bestand is aangevuld kunnen de wedstrijden gesorteerd worden
|
||||
waarbij het duidelijk zichtbaar is hoeveel personen op gelijkspel, winst of verlies hebben gegokt.
|
||||
Hier zal dus ook de winnaar(s) bekend gemaakt worden.
|
||||
|
||||
Voor de routines die gemeenschappelijk vanuit beide toepassingen gebruikt worden,
|
||||
zal een afzonderlijke klassebibliotheek opgesteld worden (die vanuit beide toepassingen gebruikt wordt).
|
||||
|
||||
Leerdoelen:
|
||||
|
||||
Blok 1:
|
||||
|
||||
- kennismaking met Visual Studio & C#
|
||||
- debugging
|
||||
- unit tests
|
||||
- programmeerstijl
|
||||
- exception handling
|
||||
- enum
|
||||
- properties
|
||||
- generic collections
|
||||
- werken met bestanden/streams
|
||||
- objecten: cloning & serialisatie
|
||||
|
||||
Bijkomend:
|
||||
|
||||
- architectuur van een toepassing: meerlagenmodel
|
49
Online Gokkantoor/Online Gokkantoor/ZelfEvaluatie.txt
Normal file
49
Online Gokkantoor/Online Gokkantoor/ZelfEvaluatie.txt
Normal file
@@ -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<63>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
|
||||
|
||||
>
|
4
Online Gokkantoor/Online Gokkantoor/packages.config
Normal file
4
Online Gokkantoor/Online Gokkantoor/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
6
Online Gokkantoor/Opstarten/App.config
Normal file
6
Online Gokkantoor/Opstarten/App.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
</configuration>
|
53
Online Gokkantoor/Opstarten/Opstarten.csproj
Normal file
53
Online Gokkantoor/Opstarten/Opstarten.csproj
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{8F83F7BE-61E6-4128-9269-4865CC8C5259}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Opstarten</RootNamespace>
|
||||
<AssemblyName>Opstarten</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
18
Online Gokkantoor/Opstarten/Program.cs
Normal file
18
Online Gokkantoor/Opstarten/Program.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
36
Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
Normal file
36
Online Gokkantoor/Opstarten/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Opstarten")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Opstarten")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("8f83f7be-61e6-4128-9269-4865cc8c5259")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Reference in New Issue
Block a user