milimoe 189abf1986
WPF 支持和无边框的主界面窗体拖放 (#31)
* 添加无边框窗体可拖放

* 添加了 WPF 的支持(方便模组启动 WPF 界面)
2025-05-08 00:08:09 +08:00

35 lines
971 B
C#

namespace Milimoe.FunGame.Desktop.UI
{
internal static class Start
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(params string[] args)
{
foreach (string option in args)
{
switch (option)
{
case "-debug":
Core.Library.Constant.FunGameInfo.FunGame_DebugMode = true;
break;
}
}
// ³õʼ»¯ WinForms ÅäÖÃ
ApplicationConfiguration.Initialize();
// ³õʼ»¯ WPF Application
System.Windows.Application wpfApp = new()
{
ShutdownMode = System.Windows.ShutdownMode.OnExplicitShutdown
};
wpfApp.Dispatcher.Invoke(() => { });
Application.Run(new Main());
wpfApp.Shutdown();
}
}
}