diff --git a/.drone.yml b/.drone.yml index a2db58e..a13720b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,6 @@ kind: pipeline name: default steps: - name: build - image: mono + image: mcr.microsoft.com/dotnet/sdk:6.0 commands: - - msbuild Tidstagning.sln \ No newline at end of file + - dotnet publish -c Debug -o out -r win-x86 --self-contained true \ No newline at end of file diff --git a/Tidstagning.sln b/Tidstagning.sln index 17b650b..3c05fae 100644 --- a/Tidstagning.sln +++ b/Tidstagning.sln @@ -1,22 +1,25 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30330.147 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31808.319 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tidstagning", "Tidstagning\Tidstagning.csproj", "{DFE0844B-9986-4623-8188-7F4A828FBB02}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tidstagning", "Tidstagning\Tidstagning.csproj", "{5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DFE0844B-9986-4623-8188-7F4A828FBB02}.Debug|x86.ActiveCfg = Debug|x86 - {DFE0844B-9986-4623-8188-7F4A828FBB02}.Debug|x86.Build.0 = Debug|x86 + {5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5AF4CA7E-39CF-4DB6-BED3-4FDB23BEDE86}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {37B43424-1917-4948-A936-67BBE67DED35} + SolutionGuid = {FF5491E4-A9E1-4EA9-86F1-3CF119710682} EndGlobalSection EndGlobal diff --git a/Tidstagning.suo b/Tidstagning.suo deleted file mode 100644 index 25e86f0..0000000 Binary files a/Tidstagning.suo and /dev/null differ diff --git a/Tidstagning/Deltager.txt b/Tidstagning/Deltager.txt deleted file mode 100644 index a9babac..0000000 --- a/Tidstagning/Deltager.txt +++ /dev/null @@ -1,16 +0,0 @@ -Opus,1 -Cartan,13 -Dixi,26 -Grace,28 -Sanus,19 -Blup,12 -Fønix,16 -Krone 2,99 -Den sorte enke,38 -Havfruen,18 -Nicoline,66 -Mamse,99 -Mallue,11 -Buggabo,9 -Marie,2 -Splinten,11 diff --git a/Tidstagning/Procedure.cs b/Tidstagning/Procedure.cs index 9429cbf..b922578 100644 --- a/Tidstagning/Procedure.cs +++ b/Tidstagning/Procedure.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; +using System.Diagnostics; namespace Tidstagning { @@ -12,7 +9,7 @@ namespace Tidstagning List signaler; uint signalLength = 500; - Timer timer; + System.Threading.Timer timer; Int16 idx = 0; public Procedure() diff --git a/Tidstagning/Properties/AssemblyInfo.cs b/Tidstagning/Properties/AssemblyInfo.cs deleted file mode 100644 index 154bc7e..0000000 --- a/Tidstagning/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Tidstagning")] -[assembly: AssemblyDescription("Kontakt jens.chr.true@gmail.com - https://jcktrue.dk")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("LEAX")] -[assembly: AssemblyProduct("Tidstagning")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("1f547dc7-1ba1-4877-9e70-dc09cc1d3f64")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tidstagning/Properties/Resources.Designer.cs b/Tidstagning/Properties/Resources.Designer.cs deleted file mode 100644 index 112f4b4..0000000 --- a/Tidstagning/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Tidstagning.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tidstagning.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/Tidstagning/Properties/Resources.resx b/Tidstagning/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/Tidstagning/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/Tidstagning/Properties/Settings.Designer.cs b/Tidstagning/Properties/Settings.Designer.cs index 98984e9..a2cc2f6 100644 --- a/Tidstagning/Properties/Settings.Designer.cs +++ b/Tidstagning/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Tidstagning.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/Tidstagning/Properties/app.manifest b/Tidstagning/Properties/app.manifest deleted file mode 100644 index 2856403..0000000 --- a/Tidstagning/Properties/app.manifest +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tidstagning/Relay.cs b/Tidstagning/Relay.cs index 0972fd2..4486012 100644 --- a/Tidstagning/Relay.cs +++ b/Tidstagning/Relay.cs @@ -8,7 +8,7 @@ namespace Tidstagning class Relay { SerialPort com; - Timer cooldownTimer; + System.Threading.Timer cooldownTimer; struct SignalSpec { @@ -17,7 +17,7 @@ namespace Tidstagning }; Queue signals = new Queue(); bool processing_queue = false; - public Relay(string ComPort = null) + public Relay(string ComPort) { com = new SerialPort(); com.PortName = ComPort; diff --git a/Tidstagning/Settings.Designer.cs b/Tidstagning/Settings.Designer.cs new file mode 100644 index 0000000..ad5a00e --- /dev/null +++ b/Tidstagning/Settings.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tidstagning { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("N/A")] + public string ComPort { + get { + return ((string)(this["ComPort"])); + } + set { + this["ComPort"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool AutoStartProcedure { + get { + return ((bool)(this["AutoStartProcedure"])); + } + set { + this["AutoStartProcedure"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("500")] + public uint SignalLength { + get { + return ((uint)(this["SignalLength"])); + } + set { + this["SignalLength"] = value; + } + } + } +} diff --git a/Tidstagning/Startprocedure.txt b/Tidstagning/Startprocedure.txt deleted file mode 100644 index 0ca00d9..0000000 --- a/Tidstagning/Startprocedure.txt +++ /dev/null @@ -1,4 +0,0 @@ -18:00:00 -18:01:00 -18:04:00 -18:05:00 \ No newline at end of file diff --git a/Tidstagning/Tidstagning.csproj b/Tidstagning/Tidstagning.csproj index e9542fb..335db81 100644 --- a/Tidstagning/Tidstagning.csproj +++ b/Tidstagning/Tidstagning.csproj @@ -1,186 +1,36 @@ - - + + - Debug - x86 - 8.0.30703 - 2.0 - {DFE0844B-9986-4623-8188-7F4A828FBB02} WinExe - Properties - Tidstagning - Tidstagning - v4.7.2 - - - 512 - false - C:\Users\JCT\Documents\Tidstagning\ - true - Disk - false - Foreground - 7 - Days - false - false - false - Tidstagning - LEAX - false - 27 - 1.1.2.%2a - true - true - true - false + net6.0-windows + enable + true + enable + Tidstagning.Program - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - 86AFBD08924E61031114EAB5B6DF6585A43E2B5F - - - Tidstagning_TemporaryKey.pfx - - - true - - - false - - - icon.ico - - - - Custom - - - - + - - - - - - - - - - - - + + - - Form - - - AboutBox.cs - - - Form - - - ConfigUI.cs - - - - Form - - - MainUI.cs - - - - - - - - - AboutBox.cs - - - ConfigUI.cs - - - MainUI.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - + + True True - Resources.resx - True + Settings.settings - - - + + True + True + Settings.settings + + + + + SettingsSingleFileGenerator Settings.Designer.cs - - True - Settings.settings - True - - - - False - Microsoft .NET Framework 4 Client Profile %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - - - + \ No newline at end of file diff --git a/Tidstagning/Tidstagning.csproj.user b/Tidstagning/Tidstagning.csproj.user index 96634b2..676249f 100644 --- a/Tidstagning/Tidstagning.csproj.user +++ b/Tidstagning/Tidstagning.csproj.user @@ -1,17 +1,14 @@  - - - C:\Users\JCT\Documents\Tidstagning\|G:\Tidstagning\|G:\|publish\ - - - - - - en-US - false - ProjectFiles - - - false - + + + + Form + + + Form + + + Form + + \ No newline at end of file diff --git a/Tidstagning/app.config b/Tidstagning/app.config deleted file mode 100644 index 99db4d3..0000000 --- a/Tidstagning/app.config +++ /dev/null @@ -1,22 +0,0 @@ - - - - -
- - - - - - - N/A - - - False - - - 500 - - - - diff --git a/Tidstagning/icon.ico b/Tidstagning/icon.ico deleted file mode 100644 index 01ff6d1..0000000 Binary files a/Tidstagning/icon.ico and /dev/null differ