void ddd_Closed(object sender, EventArgs e) { Views.cldDropDownDialogue ddd = sender as Views.cldDropDownDialogue; if (ddd.DialogResult == false || string.IsNullOrEmpty(ddd.chosen)) { return; } Cursor = Cursors.Wait; client.deleteAllDecksCompleted += client_deleteAllDecksCompleted; client.deleteAllDecksAsync(M.username, ddd.chosen); }
private void cmdChangePool_Click(object sender, RoutedEventArgs e) { MessageBoxResult res = MessageBox.Show("You have chosen to change pools." + Environment.NewLine + Environment.NewLine + "When you do, all of your current Cards and Decks under your account will be DELETED. Are you sure you want to continue?", "Change Pool", MessageBoxButton.OKCancel); if (res != MessageBoxResult.OK) { return; } Views.cldDropDownDialogue ddd = new Views.cldDropDownDialogue("Choose your new pool"); foreach (string pool in M.PoolOptions) { ddd.addChoice(pool); } ddd.Closed += ddd_Closed; ddd.Show(); }