Build enabled

This commit is contained in:
Jens True 2022-05-02 17:36:09 +02:00
parent 369f1934d3
commit dac937873e
2 changed files with 12 additions and 9 deletions

@ -4,16 +4,16 @@ namespace Tidstagning
{
class Entry
{
enum Score
public enum Score
{
-,
Score,
DNC,
DNS,
OCS,
DNF,
RET,
DSQ
}
};
//Competitors name
public string Name { get; set; }
//Competitor identifier (Sailnumber/Bownumber or other)
@ -37,7 +37,7 @@ namespace Tidstagning
public void DNF()
{
Code = DNF;
Code = Score.DNF;
this.Completed_Time = DateTime.Now;
}
}

@ -22,20 +22,23 @@ namespace Tidstagning
{
}
public Open(string ComPort)
public bool Open(string ComPort)
{
if(SerialPort.IsOpen())
SerialPort.Close();
if (com.IsOpen)
{
Close();
}
com.PortName = ComPort;
com.BaudRate = 9600;
try
{
com.Open();
return true;
}
catch
{
return false;
}
}