Formatting time used in start procedure log output

This commit is contained in:
Jens True 2021-06-20 19:27:48 +02:00
parent 4a8b7bf3b7
commit e05155376e
4 changed files with 12 additions and 4 deletions

@ -114,7 +114,7 @@ namespace Tidstagning
Run(); Run();
return;//time already passed return;//time already passed
} }
log.Write("Næste signal: " + alertTime.ToString() + " Om: " + timeToGo.ToString()); log.Write("Næste signal: " + alertTime.ToString(@"HH\:mm\:ss") + " Om: " + timeToGo.ToString(@"hh\:mm\:ss"));
timer = new System.Threading.Timer(x => timer = new System.Threading.Timer(x =>
{ {
this.Alarm(); this.Alarm();

@ -35,12 +35,17 @@ namespace Tidstagning
} }
/**
* Sound the horn for a given time
* Uses a thread to postpone the off call.
*/
public void Sound(int time) public void Sound(int time)
{ {
Debug.WriteLine("Requesting horn for: " + time.ToString() + "ms"); Debug.WriteLine("Requesting horn for: " + time.ToString() + "ms");
On(); On();
cooldownTimer = new System.Threading.Timer(x => cooldownTimer = new System.Threading.Timer(x =>
{ {
Debug.WriteLine("Delayed off");
Off(); Off();
}, null, new TimeSpan(0, 0, time / 1000), new System.TimeSpan(0)); }, null, new TimeSpan(0, 0, time / 1000), new System.TimeSpan(0));
} }

@ -15,7 +15,7 @@
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>G:\Tidstagning\</PublishUrl> <PublishUrl>C:\Users\JCT\Documents\Tidstagning\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled> <UpdateEnabled>false</UpdateEnabled>
@ -29,7 +29,7 @@
<PublisherName>LEAX</PublisherName> <PublisherName>LEAX</PublisherName>
<SuiteName>Lemvig Sejlklub</SuiteName> <SuiteName>Lemvig Sejlklub</SuiteName>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish> <OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<ApplicationRevision>23</ApplicationRevision> <ApplicationRevision>24</ApplicationRevision>
<ApplicationVersion>1.1.2.%2a</ApplicationVersion> <ApplicationVersion>1.1.2.%2a</ApplicationVersion>
<UseApplicationTrust>true</UseApplicationTrust> <UseApplicationTrust>true</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
@ -64,7 +64,7 @@
<ManifestKeyFile>Tidstagning_TemporaryKey.pfx</ManifestKeyFile> <ManifestKeyFile>Tidstagning_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<GenerateManifests>false</GenerateManifests> <GenerateManifests>true</GenerateManifests>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignManifests>false</SignManifests> <SignManifests>false</SignManifests>

@ -11,4 +11,7 @@
<VerifyUploadedFiles>false</VerifyUploadedFiles> <VerifyUploadedFiles>false</VerifyUploadedFiles>
<ProjectView>ShowAllFiles</ProjectView> <ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project> </Project>