Skip to content

Commit

Permalink
fix process launch
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyCorbett committed Mar 15, 2021
1 parent a5546e8 commit 2458e80
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
2 changes: 2 additions & 0 deletions OnlyT/Resources/TimersHtmlTemplate.html
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@
return "";

case "Timer":
{
onlineToOfflineCount = 0;
offlineTextElem.style.display = "none";
document.getElementById("timers").style.display = "";
Expand All @@ -330,6 +331,7 @@
return currentlyCountingUp
? getTimeDisplayStringCountingUp(clientTimerTotalElapsedSecs)
: getTimeDisplayStringCountingDown(clientTimerTotalElapsedSecs, currentTargetSecs);
}

default:
//
Expand Down
24 changes: 21 additions & 3 deletions OnlyT/ViewModel/OperatorPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,13 @@ private void GetVersionData()

private void DisplayNewVersionPage()
{
Process.Start(VersionDetection.LatestReleaseUrl);
var psi = new ProcessStartInfo
{
FileName = VersionDetection.LatestReleaseUrl,
UseShellExecute = true
};

Process.Start(psi);
}

private void CountUpToggle()
Expand All @@ -961,7 +967,13 @@ private void CountUpToggle()

private void LaunchHelp()
{
Process.Start(@"https://github.com/AntonyCorbett/OnlyT/wiki");
var psi = new ProcessStartInfo
{
FileName = @"https://github.com/AntonyCorbett/OnlyT/wiki",
UseShellExecute = true
};

Process.Start(psi);
}

private void BellToggle()
Expand Down Expand Up @@ -1091,7 +1103,13 @@ private void LaunchPdf(string pdf)
{
if (File.Exists(pdf))
{
Process.Start(pdf);
var psi = new ProcessStartInfo
{
FileName = pdf,
UseShellExecute = true
};

Process.Start(psi);
}
}

Expand Down
11 changes: 9 additions & 2 deletions OnlyT/ViewModel/SettingsPageViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Toolkit.Mvvm.ComponentModel;
using System.Diagnostics;
using Microsoft.Toolkit.Mvvm.ComponentModel;
using Microsoft.Toolkit.Mvvm.Input;
using Microsoft.Toolkit.Mvvm.Messaging;

Expand Down Expand Up @@ -881,7 +882,13 @@ private void Save()

private void OpenWebClockLink()
{
System.Diagnostics.Process.Start(WebClockUrl);
var psi = new ProcessStartInfo
{
FileName = WebClockUrl,
UseShellExecute = true
};

Process.Start(psi);
}

private void ReserveAndOpenPort()
Expand Down

0 comments on commit 2458e80

Please sign in to comment.