This commit is contained in:
AveryMadness 2024-02-04 13:39:01 -07:00
parent 102c918d63
commit 10733c1d80

View File

@ -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)