예제 #1
0
        private void editCardButton_Click(object sender, EventArgs e)
        {
            //This isn't really an edit function more of a delete and bring up the add card screen. Needs work so that it functions more like an edit.
            CardCollection editCardColl = new CardCollection();

            editCardColl.RemoveCard(collectionListBox.SelectedItem.ToString(), cardListBox.SelectedItem.ToString());
            string      selectedCollection = collectionListBox.SelectedItem.ToString();
            AddCardForm newCardForm        = new AddCardForm(selectedCollection);

            newCardForm.Show();
            this.Hide();
        }
예제 #2
0
 private void collectionSelectionButton_Click(object sender, EventArgs e)
 {
     //this has data validation now.
     if (collectionListBox.SelectedItem == null)
     {
         MessageBox.Show("please select a collection");
     }
     else
     {
         string      selectedCollection = collectionListBox.SelectedItem.ToString();
         AddCardForm newCardForm        = new AddCardForm(selectedCollection);
         newCardForm.Show();
         this.Hide();
     }
 }