fix<*>: fix Process.Start with URL directly will crash on .NET 5.0

This commit is contained in:
leo 2021-03-31 10:35:03 +08:00
parent f84118ac9f
commit cb9274c1c6
2 changed files with 4 additions and 4 deletions

View file

@ -30,8 +30,8 @@ namespace SourceGit.UI {
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void OpenSource(object sender, RequestNavigateEventArgs e) { private void OpenSource(object sender, RequestNavigateEventArgs e) {
Process.Start(e.Uri.AbsoluteUri); //Process.Start(e.Uri.AbsoluteUri);
//Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true }); Process.Start(new ProcessStartInfo("cmd", $"/c start {e.Uri.AbsoluteUri}") { CreateNoWindow = true });
e.Handled = true; e.Handled = true;
} }

View file

@ -32,8 +32,8 @@ namespace SourceGit.UI {
/// <param name="sender"></param> /// <param name="sender"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void Download(object sender, RoutedEventArgs e) { private void Download(object sender, RoutedEventArgs e) {
Process.Start($"https://gitee.com/sourcegit/SourceGit/releases/{tag}"); //Process.Start($"https://gitee.com/sourcegit/SourceGit/releases/{tag}");
//Process.Start(new ProcessStartInfo("cmd", $"/c start https://gitee.com/sourcegit/SourceGit/releases/{tag}") { CreateNoWindow = true }); Process.Start(new ProcessStartInfo("cmd", $"/c start https://gitee.com/sourcegit/SourceGit/releases/{tag}") { CreateNoWindow = true });
e.Handled = true; e.Handled = true;
} }