tidstagning/Entry.cs
2022-06-19 20:08:22 +02:00

45 lines
1001 B
C#

using System;
namespace Tidstagning
{
class Entry
{
public enum Score
{
Score,
DNC,
DNS,
OCS,
DNF,
RET,
DSQ
};
//Competitors name
public string Name { get; set; }
//Competitor identifier (Sailnumber/Bownumber or other)
public string SailNumber { get; set; }
//DateTime the user completed the course
public DateTime Completed_Time { get; set; }
//Retirement score.
public Score Code { get; set; }
public Entry(string name, string number)
{
this.Name = name;
this.SailNumber = number;
this.Completed_Time = DateTime.Today;
}
public void Complete()
{
this.Completed_Time = DateTime.Now;
}
public void DNF()
{
Code = Score.DNF;
this.Completed_Time = DateTime.Now;
}
}
}