Formatting
This commit is contained in:
@ -44,8 +44,8 @@ namespace Tidstagning
|
||||
if (version is not null)
|
||||
{
|
||||
return version.ToString();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return "N/A";
|
||||
|
2
Entry.cs
2
Entry.cs
@ -37,7 +37,7 @@ namespace Tidstagning
|
||||
|
||||
public void DNF()
|
||||
{
|
||||
Code = Score.DNF;
|
||||
Code = Score.DNF;
|
||||
this.Completed_Time = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ namespace Tidstagning
|
||||
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["DNF"].Index)
|
||||
{
|
||||
entries[e.RowIndex].DNF();
|
||||
if(liste is not null)
|
||||
if (liste is not null)
|
||||
liste.WriteDNF(entries[e.RowIndex]);
|
||||
|
||||
grid.ClearSelection();
|
||||
@ -87,7 +87,7 @@ namespace Tidstagning
|
||||
if (e.RowIndex >= 0 && e.ColumnIndex == grid.Columns["Complete"].Index)
|
||||
{
|
||||
entries[e.RowIndex].Complete();
|
||||
if(liste is not null)
|
||||
if (liste is not null)
|
||||
liste.WriteComplete(entries[e.RowIndex]);
|
||||
|
||||
grid.ClearSelection();
|
||||
|
@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Timer=System.Threading.Timer;
|
||||
using Timer = System.Threading.Timer;
|
||||
namespace Tidstagning
|
||||
{
|
||||
class Procedure
|
||||
@ -125,9 +125,9 @@ namespace Tidstagning
|
||||
|
||||
private void Alarm()
|
||||
{
|
||||
if(log is not null)
|
||||
if (log is not null)
|
||||
log.Write("HORN!");
|
||||
if(horn is not null)
|
||||
if (horn is not null)
|
||||
horn.Sound(signalLength);
|
||||
next();
|
||||
Run();
|
||||
|
14
Program.cs
14
Program.cs
@ -16,13 +16,13 @@ namespace Tidstagning
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed<Options>(o =>
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainUI(o.Verbose));
|
||||
});
|
||||
Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed<Options>(o =>
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainUI(o.Verbose));
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
8
Relay.cs
8
Relay.cs
@ -61,12 +61,12 @@ namespace Tidstagning
|
||||
*/
|
||||
public void Sound(uint time)
|
||||
{
|
||||
if(!com.IsOpen)
|
||||
if (!com.IsOpen)
|
||||
{
|
||||
Debug.WriteLine("ComPort not open");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Debug.WriteLine("Requesting horn for: " + time.ToString() + "ms");
|
||||
SignalSpec on_signal;
|
||||
on_signal.duration = time;
|
||||
@ -91,11 +91,11 @@ namespace Tidstagning
|
||||
processing_queue = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
processing_queue = true;
|
||||
SignalSpec signal = signals.Peek();
|
||||
|
||||
if(signal.output_on)
|
||||
if (signal.output_on)
|
||||
{
|
||||
On();
|
||||
}
|
||||
|
Reference in New Issue
Block a user