test ding

This commit is contained in:
Beppe Vanrolleghem
2019-08-07 13:09:09 +02:00
parent a50e4d0e44
commit e32405674a
5 changed files with 52 additions and 15 deletions

View File

@@ -17,18 +17,16 @@ namespace GUI_Gokkantoor
public LogicLayer l;
public Login(LogicLayer l)
{
l = new LogicLayer();
this.l = l;
InitializeComponent();
listBox1.DataSource = l.persons;
listBox1.DataSource = l.persons;
}
private void button1_Click(object sender, EventArgs e)
{
Person p = (Person)listBox1.SelectedItem;
Gokspel a = new Gokspel(l,p);
this.Hide();
a.FormClosed += adminClosed;

View 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();
}
}
}

View File

@@ -34,6 +34,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\ploegInMatch.cs" />
<Compile Include="MyClass.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Classes\Bet.cs" />

View File

@@ -5,10 +5,5 @@ namespace Globals.Interfaces
{
int Id { get; set; }
string naam { get; set; }
int score { get; }
bool scoreSet { get; }
event EventHandler scoreChanged;
void setScore(int i);
int getScore();
}
}

View File

@@ -110,11 +110,13 @@ namespace Logic
public Person getPerson(int id)
{
foreach (Person b in persons)
{
if (b.Id == id) return b;
return persons.FindLast(x => id == x.Id);
}
throw new Exception("No bets found with that id");
public List<Person> filter(List<Person> p)
{
return filter(p);
}
public Ploeg getPloeg(int id)