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 removeTlkButton_Click(object sender, EventArgs e) { int n = listBox1.SelectedIndex; if (n != -1) { ME3TalkFiles.removeTLK(n); refresh(); } }
private void tlkDownButton_Click(object sender, EventArgs e) { int n = listBox1.SelectedIndex; if (n != -1 && n < listBox1.Items.Count - 1) { ME3TalkFiles.moveTLKDown(n); refresh(); listBox1.SelectedIndex = n + 1; } }
private void tlkUpButton_Click(object sender, EventArgs e) { int n = listBox1.SelectedIndex; if (n > 0) { ME3TalkFiles.moveTLKUp(n); refresh(); listBox1.SelectedIndex = n - 1; } }
private void addTlkButton_Click(object sender, EventArgs e) { OpenFileDialog d = new OpenFileDialog(); d.Filter = "*.tlk|*.tlk"; if (d.ShowDialog() == DialogResult.OK) { ME3TalkFiles.addTLK(d.FileName); refresh(); listBox1.SelectedIndex = listBox1.Items.Count - 1; } }
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(); } }
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture) { IMEPackage pcc = values[1] as IMEPackage; if (values[0] is int && pcc != null) { int strRef = (int)values[0]; switch (pcc.Game) { case MEGame.ME1: return($"\"{(new ME1Explorer.Unreal.Classes.BioTlkFileSet(pcc as ME1Package)).findDataById(strRef)}\""); case MEGame.ME2: return($"\"{ME2Explorer.ME2TalkFiles.findDataById(strRef)}\""); case MEGame.ME3: return($"\"{ME3TalkFiles.findDataById(strRef)}\""); case MEGame.UDK: return("UDK StrRef not supported"); } } return("No Data"); }
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); }); }
private void toolStripButton1_Click(object sender, EventArgs e) { ME3TalkFiles.ReloadTLKData(); MessageBox.Show(this, "TLKs have been reloaded.", "TLK list reloaded"); }