private void Application_Startup(object sender, StartupEventArgs e) { //Winforms interop System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); System.Windows.Forms.Integration.WindowsFormsHost.EnableWindowsFormsInterop(); //set up AppData Folder if (!Directory.Exists(AppDataFolder)) { Directory.CreateDirectory(AppDataFolder); } //load in data files ME3TalkFiles.LoadSavedTlkList(); ME2Explorer.ME2TalkFiles.LoadSavedTlkList(); ME1UnrealObjectInfo.loadfromJSON(); ME2UnrealObjectInfo.loadfromJSON(); ME3UnrealObjectInfo.loadfromJSON(); //static class setup Tools.Initialize(); MEPackageHandler.Initialize(); int exitCode = 0; if (HandleCommandLineArgs(Environment.GetCommandLineArgs(), out exitCode)) { Shutdown(exitCode); } else { (new MainWindow()).Show(); } }
private void Application_Startup(object sender, StartupEventArgs e) { //Winforms interop System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); System.Windows.Forms.Integration.WindowsFormsHost.EnableWindowsFormsInterop(); //set up AppData Folder if (!Directory.Exists(AppDataFolder)) { Directory.CreateDirectory(AppDataFolder); } //load in data files ME3TalkFiles.LoadSavedTlkList(); ME2Explorer.ME2TalkFiles.LoadSavedTlkList(); ME1UnrealObjectInfo.loadfromJSON(); ME2UnrealObjectInfo.loadfromJSON(); ME3UnrealObjectInfo.loadfromJSON(); //static class setup Tools.Initialize(); MEPackageHandler.Initialize(); //load kismet font SequenceObjects.SText.LoadFont(); splashScreen.Close(TimeSpan.FromMilliseconds(1)); if (HandleCommandLineJumplistCall(Environment.GetCommandLineArgs(), out int exitCode) != 1) { Shutdown(exitCode); } else { this.Dispatcher.UnhandledException += OnDispatcherUnhandledException; //only start handling them after bootup (new MainWindow()).Show(); } }
private void StartLoadingTLKs() { Task.Run(() => { // load TLK strings try { ME1Explorer.ME1TalkFiles.LoadSavedTlkList(); TlkManagerNS.TLKManagerWPF.ME1LastReloaded = $"{DateTime.Now:HH:mm:ss tt}"; } catch { //? } try { ME2Explorer.ME2TalkFiles.LoadSavedTlkList(); TlkManagerNS.TLKManagerWPF.ME2LastReloaded = $"{DateTime.Now:HH:mm:ss tt}"; } catch { //? } try { ME3TalkFiles.LoadSavedTlkList(); TlkManagerNS.TLKManagerWPF.ME3LastReloaded = $"{DateTime.Now:HH:mm:ss tt}"; } catch { //? } App.TlkFirstLoadDone = true; }).ContinueWithOnUIThread(prevTask => { //StartingUpPanel.Visibility = Visibility.Invisible; DoubleAnimation fadeout = new DoubleAnimation { From = 1, To = 0, EasingFunction = new ExponentialEase(), Duration = new Duration(TimeSpan.FromSeconds(1)) }; fadeout.Completed += delegate { LoadingPanel.Visibility = Visibility.Collapsed; ME3TweaksLogoButton.Visibility = Visibility.Visible; LoadingPanel.Children.Remove(LoadingSpinnerImage); //This will remove the storyboard DoubleAnimation fadein = new DoubleAnimation { From = 0, To = 1, EasingFunction = new ExponentialEase(), Duration = new Duration(TimeSpan.FromSeconds(1)) }; ME3TweaksLogoButton.BeginAnimation(OpacityProperty, fadein); }; //da.RepeatBehavior=new RepeatBehavior(3); LoadingPanel.BeginAnimation(OpacityProperty, fadeout); }); }