Deep Shallow copy moe nog gebeuren

This commit is contained in:
Beppe
2019-08-12 13:28:38 +02:00
parent e32405674a
commit fb078ec1d8
9 changed files with 137 additions and 101 deletions

View File

@@ -5,37 +5,47 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Globals.Classes
namespace Globals.classes
{
public class PloegInMatch : Ploeg
{
public int score;
public PloegInMatch(int score)
public PloegInMatch(int id, string naam) : base(id, naam)
{
}
public PloegInMatch(int id, string naam, int score) : base(id, naam)
{
setScore(score);
}
public PloegInMatch(Ploeg p) : base(p)
{
this.Id = p.Id;
this.naam = p.naam;
}
public PloegInMatch(Ploeg p, int score) : base(p)
{
this.Id = p.Id;
this.naam = p.naam;
setScore(score);
}
public int score { get; private set; }
public bool scoreSet { get; private set; }
public event EventHandler scoreChanged;
public void setScore(int score)
{
EventHandler h = scoreChanged;
if (null != h) h(this, EventArgs.Empty);
this.score = score;
this.scoreSet = true;
}
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();
}
}
}