mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
34 lines
802 B
C#
34 lines
802 B
C#
namespace Shigure;
|
|
|
|
internal static class Program
|
|
{
|
|
[STAThread]
|
|
private static void Main(string[] args)
|
|
{
|
|
if (!OperatingSystem.IsWindows())
|
|
{
|
|
MessageBox.Show(
|
|
"Shigure 需要在 Windows 上运行。",
|
|
"Shigure",
|
|
MessageBoxButtons.OK,
|
|
MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
|
|
ApplicationConfiguration.Initialize();
|
|
|
|
var relaunchResult = RandomizedExecutableLauncher.TryRelaunch(args);
|
|
if (relaunchResult == RandomizedRelaunchResult.Started)
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (relaunchResult == RandomizedRelaunchResult.Failed)
|
|
{
|
|
return;
|
|
}
|
|
|
|
Application.Run(new MainForm(AppOptions.FromArgs(args)));
|
|
}
|
|
}
|