mirror of
https://github.com/bvanroll/cs-oo-project.git
synced 2025-08-29 20:12:40 +00:00
test ding
This commit is contained in:
@@ -17,18 +17,16 @@ namespace GUI_Gokkantoor
|
|||||||
public LogicLayer l;
|
public LogicLayer l;
|
||||||
public Login(LogicLayer l)
|
public Login(LogicLayer l)
|
||||||
{
|
{
|
||||||
l = new LogicLayer();
|
this.l = l;
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
listBox1.DataSource = l.persons;
|
listBox1.DataSource = l.persons;
|
||||||
|
listBox1.DataSource = l.persons;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Person p = (Person)listBox1.SelectedItem;
|
Person p = (Person)listBox1.SelectedItem;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Gokspel a = new Gokspel(l,p);
|
Gokspel a = new Gokspel(l,p);
|
||||||
this.Hide();
|
this.Hide();
|
||||||
a.FormClosed += adminClosed;
|
a.FormClosed += adminClosed;
|
||||||
|
41
Online Gokkantoor/Globals/Classes/ploegInMatch.cs
Normal file
41
Online Gokkantoor/Globals/Classes/ploegInMatch.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
using Globals.classes;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Globals.Classes
|
||||||
|
{
|
||||||
|
public class PloegInMatch : Ploeg
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public int score;
|
||||||
|
|
||||||
|
public PloegInMatch(int score)
|
||||||
|
{
|
||||||
|
this.score = score;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override zegMijnNaam(string naam)
|
||||||
|
{
|
||||||
|
return "blabla " + naam;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Equals(object obj)
|
||||||
|
{
|
||||||
|
return base.Equals(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return base.GetHashCode();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return base.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -34,6 +34,7 @@
|
|||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="Classes\ploegInMatch.cs" />
|
||||||
<Compile Include="MyClass.cs" />
|
<Compile Include="MyClass.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Classes\Bet.cs" />
|
<Compile Include="Classes\Bet.cs" />
|
||||||
|
@@ -5,10 +5,5 @@ namespace Globals.Interfaces
|
|||||||
{
|
{
|
||||||
int Id { get; set; }
|
int Id { get; set; }
|
||||||
string naam { get; set; }
|
string naam { get; set; }
|
||||||
int score { get; }
|
|
||||||
bool scoreSet { get; }
|
|
||||||
event EventHandler scoreChanged;
|
|
||||||
void setScore(int i);
|
|
||||||
int getScore();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -110,11 +110,13 @@ namespace Logic
|
|||||||
|
|
||||||
public Person getPerson(int id)
|
public Person getPerson(int id)
|
||||||
{
|
{
|
||||||
foreach (Person b in persons)
|
return persons.FindLast(x => id == x.Id);
|
||||||
{
|
|
||||||
if (b.Id == id) return b;
|
}
|
||||||
}
|
|
||||||
throw new Exception("No bets found with that id");
|
public List<Person> filter(List<Person> p)
|
||||||
|
{
|
||||||
|
return filter(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Ploeg getPloeg(int id)
|
public Ploeg getPloeg(int id)
|
||||||
|
Reference in New Issue
Block a user