diff --git a/Tidstagning/AboutBox.cs b/Tidstagning/AboutBox.cs index a004065..61ec8c4 100644 --- a/Tidstagning/AboutBox.cs +++ b/Tidstagning/AboutBox.cs @@ -32,7 +32,7 @@ namespace Tidstagning return titleAttribute.Title; } } - return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); + return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location); } } diff --git a/Tidstagning/MainUI.cs b/Tidstagning/MainUI.cs index 1e961b5..15a5e29 100644 --- a/Tidstagning/MainUI.cs +++ b/Tidstagning/MainUI.cs @@ -11,8 +11,8 @@ namespace Tidstagning { }; - ResultList liste; - Relay horn; + ResultList? liste; + Relay? horn; Procedure startprocedure = new Procedure(); public MainUI() diff --git a/Tidstagning/Procedure.cs b/Tidstagning/Procedure.cs index b922578..63de7ec 100644 --- a/Tidstagning/Procedure.cs +++ b/Tidstagning/Procedure.cs @@ -1,15 +1,17 @@ -using System.Diagnostics; +using System; +using System.Collections.Generic; +using System.Diagnostics; namespace Tidstagning { class Procedure { - Relay horn; - ResultList log; + Relay? horn; + ResultList? log; List signaler; uint signalLength = 500; - System.Threading.Timer timer; + System.Threading.Timer? timer; Int16 idx = 0; public Procedure() diff --git a/Tidstagning/Relay.cs b/Tidstagning/Relay.cs index 4486012..b6352c6 100644 --- a/Tidstagning/Relay.cs +++ b/Tidstagning/Relay.cs @@ -3,12 +3,13 @@ using System.Collections.Generic; using System.Diagnostics; using System.IO.Ports; using System.Threading; + namespace Tidstagning { class Relay { SerialPort com; - System.Threading.Timer cooldownTimer; + System.Threading.Timer? cooldownTimer; struct SignalSpec { diff --git a/Tidstagning/ResultList.cs b/Tidstagning/ResultList.cs index 4f0dc6a..7299eaa 100644 --- a/Tidstagning/ResultList.cs +++ b/Tidstagning/ResultList.cs @@ -8,7 +8,7 @@ namespace Tidstagning System.IO.StreamWriter filehandle; System.IO.StreamWriter filehandle2; Tidstagning.MainUI parentForm; - string racenumber; + string racenumber = ""; public ResultList(string filename, Tidstagning.MainUI log_object) { filename = MakeSafeFilename(filename, '_'); diff --git a/Tidstagning/Tidstagning.csproj b/Tidstagning/Tidstagning.csproj index 335db81..5986309 100644 --- a/Tidstagning/Tidstagning.csproj +++ b/Tidstagning/Tidstagning.csproj @@ -4,9 +4,22 @@ WinExe net6.0-windows enable - true - enable + True + disable Tidstagning.Program + portable + False + none + + + + + True + + + + + True