protected override void OnStartup(StartupEventArgs e) { #if DEBUG LogManager.AddDebugListener(true); #endif var languageService = ServiceLocator.Default.ResolveType <ILanguageService>(); // Note: it's best to use .CurrentUICulture in actual apps since it will use the preferred language // of the user. But in order to demo multilingual features for devs (who mostly have en-US as .CurrentUICulture), // we use .CurrentCulture for the sake of the demo languageService.PreferredCulture = CultureInfo.CurrentCulture; languageService.FallbackCulture = new CultureInfo("en-US"); FontMaterial.Initialize(false); FontAwesome.Initialize(); var serviceLocator = ServiceLocator.Default; var shellService = serviceLocator.ResolveType <IShellService>(); shellService.CreateAsync <ShellWindow>(); _stopwatch.Stop(); Log.Info("Elapsed startup stopwatch time: {0}", _stopwatch.Elapsed); }
static void Main() { Application.SetHighDpiMode(HighDpiMode.SystemAware); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); FontAwesome.Initialize(); Application.Run(new FormMain()); }