private void OnExecute() { Application.Init(); var app = new Application("EvoS.PacketInspector", GLib.ApplicationFlags.NonUnique); app.Register(GLib.Cancellable.Current); // We require data from the game assets, so ensure we have a valid data path if (!AssetLoader.FindAssetRoot(Settings.AtlasReactorData)) { using var settingsUi = new SettingsUi(); settingsUi.Show(); app.AddWindow(settingsUi); var x = (ResponseType)settingsUi.Run(); if (x != ResponseType.Ok) { return; } } HashResolver.Init(AssetLoader.BasePath); Patcher.ResolveSyncListFields(); Patcher.PatchAll(); var win = new MainWindow(); if (!PacketsDir.IsNullOrEmpty()) { win.LoadPacketDump(PacketDumpType.PacketDirectory, PacketsDir); } else if (!ReplayFile.IsNullOrEmpty()) { win.LoadPacketDump(PacketDumpType.ReplayFile, ReplayFile); } app.AddWindow(win); win.Show(); Application.Run(); }
private void ButtonSettings_Activated(object sender, EventArgs e) { using var settingsUi = new SettingsUi(); settingsUi.Show(); settingsUi.Run(); }