-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add main menu button to check for updates
Closes #165
- Loading branch information
Showing
6 changed files
with
109 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Diagnostics; | ||
|
||
namespace DHT.Desktop.Common; | ||
|
||
static class SystemUtils { | ||
public static void OpenUrl(string url) { | ||
Process.Start(new ProcessStartInfo(url) { UseShellExecute = true }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,41 @@ | ||
using System.Diagnostics; | ||
using DHT.Desktop.Common; | ||
|
||
namespace DHT.Desktop.Main; | ||
|
||
sealed class AboutWindowModel { | ||
public void ShowOfficialWebsite() { | ||
OpenUrl("https://dht.chylex.com"); | ||
SystemUtils.OpenUrl(Program.Website); | ||
} | ||
|
||
public void ShowIssueTracker() { | ||
OpenUrl("https://github.com/chylex/Discord-History-Tracker/issues"); | ||
SystemUtils.OpenUrl("https://github.com/chylex/Discord-History-Tracker/issues"); | ||
} | ||
|
||
public void ShowSourceCode() { | ||
OpenUrl("https://github.com/chylex/Discord-History-Tracker"); | ||
SystemUtils.OpenUrl("https://github.com/chylex/Discord-History-Tracker"); | ||
} | ||
|
||
public void ShowLibraryNetCore() { | ||
OpenUrl("https://github.com/dotnet/core"); | ||
SystemUtils.OpenUrl("https://github.com/dotnet/core"); | ||
} | ||
|
||
public void ShowLibraryAvalonia() { | ||
OpenUrl("https://www.nuget.org/packages/Avalonia"); | ||
SystemUtils.OpenUrl("https://www.nuget.org/packages/Avalonia"); | ||
} | ||
|
||
public void ShowLibraryCommunityToolkit() { | ||
OpenUrl("https://github.com/CommunityToolkit/dotnet"); | ||
SystemUtils.OpenUrl("https://github.com/CommunityToolkit/dotnet"); | ||
} | ||
|
||
public void ShowLibrarySqlite() { | ||
OpenUrl("https://www.sqlite.org"); | ||
SystemUtils.OpenUrl("https://www.sqlite.org"); | ||
} | ||
|
||
public void ShowLibrarySqliteAdoNet() { | ||
OpenUrl("https://www.nuget.org/packages/Microsoft.Data.Sqlite"); | ||
SystemUtils.OpenUrl("https://www.nuget.org/packages/Microsoft.Data.Sqlite"); | ||
} | ||
|
||
public void ShowLibraryRxNet() { | ||
OpenUrl("https://github.com/dotnet/reactive"); | ||
} | ||
|
||
private static void OpenUrl(string url) { | ||
Process.Start(new ProcessStartInfo { FileName = url, UseShellExecute = true }); | ||
SystemUtils.OpenUrl("https://github.com/dotnet/reactive"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters