diff --git a/AboutBox.cs b/AboutBox.cs index a1e3da3..b664739 100644 --- a/AboutBox.cs +++ b/AboutBox.cs @@ -44,8 +44,8 @@ namespace Tidstagning if (version is not null) { return version.ToString(); - - } + + } else { return "N/A"; diff --git a/Entry.cs b/Entry.cs index 4c274da..9b72929 100644 --- a/Entry.cs +++ b/Entry.cs @@ -37,7 +37,7 @@ namespace Tidstagning public void DNF() { - Code = Score.DNF; + Code = Score.DNF; this.Completed_Time = DateTime.Now; } } diff --git a/MainUI.cs b/MainUI.cs index b2538c0..a25040e 100644 --- a/MainUI.cs +++ b/MainUI.cs @@ -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(); diff --git a/Procedure.cs b/Procedure.cs index 20f55b2..58c63c3 100644 --- a/Procedure.cs +++ b/Procedure.cs @@ -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(); diff --git a/Program.cs b/Program.cs index 5aef9af..40170ee 100644 --- a/Program.cs +++ b/Program.cs @@ -16,13 +16,13 @@ namespace Tidstagning [STAThread] static void Main(string[] args) { - Parser.Default.ParseArguments(args) - .WithParsed(o => - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MainUI(o.Verbose)); - }); + Parser.Default.ParseArguments(args) + .WithParsed(o => + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainUI(o.Verbose)); + }); diff --git a/Relay.cs b/Relay.cs index dbccdab..a8f6e09 100644 --- a/Relay.cs +++ b/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(); }