mirror of
http://git.xinwangdao.com/cnnc-embedded-parts-detect/detect.git
synced 2025-06-24 21:44:12 +08:00
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
![]() |
using Avalonia;
|
|||
|
using Avalonia.ReactiveUI;
|
|||
|
using Serilog;
|
|||
|
using WebViewControl;
|
|||
|
using xwd.utils;
|
|||
|
|
|||
|
namespace detect.gui;
|
|||
|
|
|||
|
sealed class Program
|
|||
|
{
|
|||
|
public static void Main(string[] args)
|
|||
|
{
|
|||
|
AppSettingsManager.ActiveProfile = "dev";
|
|||
|
LogConfig.Init();
|
|||
|
Log.Information("系统启动");
|
|||
|
|
|||
|
WebView.Settings.OsrEnabled = true;
|
|||
|
WebView.Settings.AddCommandLineSwitch("--disable-web-security", "");
|
|||
|
WebView.Settings.AddCommandLineSwitch("--default-background-color", "transparent");
|
|||
|
WebView.Settings.AddCommandLineSwitch("--cast-app-background-color", "transparent");
|
|||
|
WebView.Settings.AddCommandLineSwitch("--disable-http-cache", "1");
|
|||
|
WebView.Settings.LogFile = "ceflog.txt";
|
|||
|
WebView.Settings.EnableErrorLogOnly = true;
|
|||
|
|
|||
|
BuildApp()
|
|||
|
.StartWithClassicDesktopLifetime(args);
|
|||
|
}
|
|||
|
|
|||
|
private static AppBuilder BuildApp()
|
|||
|
=> AppBuilder.Configure<App>()
|
|||
|
.UsePlatformDetect()
|
|||
|
.WithInterFont()
|
|||
|
.LogToTrace()
|
|||
|
.UseReactiveUI();
|
|||
|
}
|