2024-07-15 17:02:53 +08:00
|
|
|
|
using Avalonia;
|
2024-02-17 14:28:02 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.InteropServices;
|
2024-07-15 17:02:53 +08:00
|
|
|
|
using toast_mcl;
|
2024-02-17 14:28:02 +08:00
|
|
|
|
|
2024-03-05 23:30:02 +08:00
|
|
|
|
namespace toast_mcl
|
2024-02-17 14:28:02 +08:00
|
|
|
|
{
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
2024-07-15 17:02:53 +08:00
|
|
|
|
// 初始化代码。
|
|
|
|
|
// 在调用AppMain之前,请不要使用任何Avalonia、第三方API或任何依赖于SynchronizationContext的代码:
|
|
|
|
|
// 因为这些东西尚未初始化,可能会导致错误。
|
2024-02-17 14:28:02 +08:00
|
|
|
|
[STAThread]
|
2024-07-15 17:02:53 +08:00
|
|
|
|
public static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
Base.Init();
|
|
|
|
|
|
|
|
|
|
BuildAvaloniaApp()
|
2024-02-17 14:28:02 +08:00
|
|
|
|
.StartWithClassicDesktopLifetime(args);
|
2024-07-15 17:02:53 +08:00
|
|
|
|
}
|
2024-02-17 14:28:02 +08:00
|
|
|
|
|
2024-07-15 17:02:53 +08:00
|
|
|
|
// Avalonia配置,请勿删除;也被可视化设计器使用。
|
2024-02-17 14:28:02 +08:00
|
|
|
|
public static AppBuilder BuildAvaloniaApp()
|
2024-07-15 17:02:53 +08:00
|
|
|
|
{
|
|
|
|
|
return AppBuilder.Configure<App>()
|
2024-02-17 14:28:02 +08:00
|
|
|
|
.UsePlatformDetect()
|
|
|
|
|
.WithFont_LXGWWenKai()
|
|
|
|
|
.LogToTrace();
|
2024-07-15 17:02:53 +08:00
|
|
|
|
}
|
2024-02-17 14:28:02 +08:00
|
|
|
|
}
|
|
|
|
|
}
|