From 10733c1d80c0a9165584a25e17ceea8158f30852 Mon Sep 17 00:00:00 2001 From: AveryMadness Date: Sun, 4 Feb 2024 13:39:01 -0700 Subject: [PATCH] asdasd --- Partypacker/MainWindow.xaml.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Partypacker/MainWindow.xaml.cs b/Partypacker/MainWindow.xaml.cs index 2b6b9ea..47a0593 100644 --- a/Partypacker/MainWindow.xaml.cs +++ b/Partypacker/MainWindow.xaml.cs @@ -38,6 +38,7 @@ namespace Partypacker InitializeComponent(); InitializeRPC(); Application.Current.Exit += OnApplicationExit; + Process.GetCurrentProcess().Exited += MainWindow_Exited; var DiscordURL = PartypackServer.GET("/api/discord/url"); if (!DiscordURL.Key) @@ -53,6 +54,11 @@ namespace Partypacker AutoLogin(); } + private void MainWindow_Exited(object? sender, EventArgs e) + { + Proxx?.StopProxy(); + } + void OnApplicationExit(object sender, ExitEventArgs e) => Proxx?.StopProxy(); void OnChangePort(object sender, TextChangedEventArgs e) { if (!int.TryParse(((TextBox)sender).Text, out int P)) @@ -177,6 +183,7 @@ namespace Partypacker }); WaitingForGameToOpen = true; GameCheckTimer.Stop(); + Proxx?.StopProxy(); } async void OnLaunch(object sender, RoutedEventArgs e)