protected override void OnStartup(StartupEventArgs e) { // load settings file SparkSettings.Load(); if (SparkSettings.instance == null) { new MessageBox($"Error accessing settings.\nTry renaming/deleting the file in C:\\Users\\[USERNAME]\\AppData\\Roaming\\IgniteVR\\Spark\\settings.json").Show(); return; } System.Threading.Thread.CurrentThread.CurrentUICulture = SparkSettings.instance.languageIndex switch { 0 => new System.Globalization.CultureInfo("en"), 1 => new System.Globalization.CultureInfo("ja-JP"), _ => System.Threading.Thread.CurrentThread.CurrentUICulture }; ThemesController.SetTheme((ThemesController.ThemeTypes)SparkSettings.instance.theme); CheckWindowPositionsValid(); base.OnStartup(e); Program.Main(e.Args, this); }