123456789101112131415161718192021222324252627282930313233 |
- using Avalonia;
- using Avalonia.Controls;
- using Avalonia.Controls.ApplicationLifetimes;
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using Xilium.CefGlue;
- using Xilium.CefGlue.Common;
- using Xilium.CefGlue.Common.Shared;
- namespace Flyinsono.Demo
- {
- class Program
- {
- // Initialization code. Don't use any Avalonia, third-party APIs or any
- // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
- // yet and stuff might break.
- public static void Main(string[] args)
- {
- BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
- }
- // Avalonia configuration, don't remove; also used by visual designer.
- public static AppBuilder BuildAvaloniaApp()
- {
- return AppBuilder.Configure<App>()
- .UsePlatformDetect()
- .AfterSetup(_ => CefRuntimeLoader.Initialize(
- new CefSettings() { Locale = CultureInfo.CurrentCulture.Name},
- flags: new[] {new KeyValuePair<string, string>("autoplay-policy", "no-user-gesture-required")}));
- }
- }
- }
|