private async void ButtonStartTrack_Click(object sender, RoutedEventArgs e) { route.Clear(); viewModel.IsTracking = true; await userPreferencesLoader.UpdateAsync(o => o.LastCallsign = viewModel.Callsign); ButtonStartTrack.Visibility = Visibility.Collapsed; ButtonStopTrack.Visibility = Visibility.Visible; try { flightConnector.Send("Connected to Flight Events!"); } catch (COMException ex) when(ex.Message == "0xC000014B") { // broken pipe } if (!viewModel.DisableDiscordRP) { discordRichPresentLogic.Start(viewModel.Callsign); } }