diff --git a/MainUI.cs b/MainUI.cs index 09c3cba..77d2521 100644 --- a/MainUI.cs +++ b/MainUI.cs @@ -7,18 +7,15 @@ namespace Tidstagning public partial class MainUI : Form { delegate void SetTextCallback(string text); - BindingList entries = new BindingList - { - - }; + readonly BindingList entries = new() {}; ResultList? liste; - Relay horn = new Relay(); - Procedure startprocedure = new Procedure(); + readonly Relay horn = new(); + readonly Procedure startprocedure = new (); public MainUI(bool ShowConfig = false) { InitializeComponent(); - System.IO.StreamReader deltager_handle = new System.IO.StreamReader(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + "Deltager.txt"); + System.IO.StreamReader deltager_handle = new(Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "/Tidstagning/" + "Deltager.txt"); string? deltager; while ((deltager = deltager_handle.ReadLine()) != null) { @@ -60,7 +57,7 @@ namespace Tidstagning { if (this.txtDebug.InvokeRequired) { - SetTextCallback d = new SetTextCallback(LogAppend); + SetTextCallback d = new (LogAppend); this.Invoke(d, new object[] { text }); } else @@ -209,7 +206,7 @@ namespace Tidstagning private void buttonConfig_Click(object sender, EventArgs e) { - ConfigUI configui = new ConfigUI(); + ConfigUI configui = new(); configui.ShowDialog(); } diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json deleted file mode 100644 index d37f55d..0000000 --- a/Properties/launchSettings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "profiles": { - "Tidstagning": { - "commandName": "Project" - } - } -} \ No newline at end of file