using Avalonia; namespace foodmarket.Pos.HwCheck; internal static class Program { /// Тестовая печать разрешена ТОЛЬКО при запуске с --allow-test-print /// (ключ даёт владелец). Без него кнопка «Тестовая печать» выключена и на принтер /// ничего не отправляется. public static bool AllowTestPrint { get; private set; } [STAThread] public static int Main(string[] args) { AllowTestPrint = args.Contains("--allow-test-print"); BuildAvaloniaApp().StartWithClassicDesktopLifetime(args); return 0; } public static AppBuilder BuildAvaloniaApp() { var b = AppBuilder.Configure().UsePlatformDetect(); // На headless/VM без GPU — ПО-рендеринг, чтобы окно не было чёрным. if (OperatingSystem.IsWindows()) b = b.With(new Win32PlatformOptions { RenderingMode = new[] { Win32RenderingMode.Software } }); return b.WithInterFont().LogToTrace(); } }