#pragma warning disable 612,618 void DeleteButton_Click(object sender, RoutedEventArgs e) { var selectedMission = (Mission)DataGrid.SelectedItem; var dialog = new PasswordRequest { Owner = MainWindow.Instance }; if (dialog.ShowDialog() == true) { var password = dialog.PasswordBox.Password; Utils.InvokeInNewThread(delegate { try { var client = MissionServiceClientFactory.MakeClient(); client.DeleteMission(selectedMission.MissionID, selectedMission.AuthorName, password); RefreshList(); } catch (FaultException <ExceptionDetail> ex) { MessageBox.Show(ex.Message); } }); } }
#pragma warning disable 612,618 void DeleteButton_Click(object sender, RoutedEventArgs e) { var selectedMission = (Mission)DataGrid.SelectedItem; var dialog = new PasswordRequest { Owner = MainWindow.Instance }; if (dialog.ShowDialog() == true) { var password = dialog.PasswordBox.Password; Utils.InvokeInNewThread(delegate { try { var client = MissionServiceClientFactory.MakeClient(); client.DeleteMission(selectedMission.MissionID, selectedMission.AuthorName, password); RefreshList(); } catch (FaultException<ExceptionDetail> ex) { MessageBox.Show(ex.Message); } }); } }