mirror of
https://github.com/waynebian01/Shigure.git
synced 2026-09-03 07:15:24 +08:00
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
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 options = AppOptions.FromArgs(args);
|
|
var baseDirectory = AppPaths.BaseDirectory;
|
|
var moduleStore = new ModuleStore(ModuleStore.ResolveModuleDirectory(baseDirectory));
|
|
var triggerKeyState = new WindowsTriggerKeyState();
|
|
var processLocator = new WowProcessLocator(baseDirectory);
|
|
var runtimeFactory = new ShigureRuntimeFactory(baseDirectory, moduleStore, triggerKeyState, processLocator);
|
|
var runtimeSession = new RuntimeSessionCoordinator(runtimeFactory);
|
|
|
|
Application.Run(new MainForm(
|
|
options,
|
|
baseDirectory,
|
|
moduleStore,
|
|
triggerKeyState,
|
|
processLocator,
|
|
runtimeSession));
|
|
}
|
|
}
|