Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
Update neo-gui/GUI/MainForm.cs
Browse files Browse the repository at this point in the history
Co-Authored-By: Shargon <shargon@gmail.com>
  • Loading branch information
erikzhang and shargon committed Dec 3, 2019
1 parent c179492 commit f1d6ccf
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion neo-gui/GUI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,25 @@ private void optionsToolStripMenuItem_Click(object sender, EventArgs e)

private void 官网WToolStripMenuItem_Click(object sender, EventArgs e)
{
Process.Start("https://neo.org/");
OpenBrowser("https://neo.org/");
}

public static void OpenBrowser(string url)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
Process.Start(new ProcessStartInfo("cmd", $"/c start {url}"));
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
Process.Start("xdg-open", url);
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
Process.Start("open", url);
}
}

}

private void 开发人员工具TToolStripMenuItem_Click(object sender, EventArgs e)
Expand Down

0 comments on commit f1d6ccf

Please sign in to comment.