Exemple #1
0
 public void deleteCard(Tables.CardItem cardForDelete)
 {
     CardItems.Remove(cardForDelete);
     cardForDelete.Deck.cardsCount -= 1;
     RemItDB.CardItems.DeleteOnSubmit(cardForDelete);
     RemItDB.SubmitChanges();
 }
Exemple #2
0
 public void createCard(Tables.CardItem newCard)
 {
     RemItDB.CardItems.InsertOnSubmit(newCard);
     RemItDB.SubmitChanges();
     CardItems.Add(newCard);
 }
Exemple #3
0
 private void AddNewCard_Click(object sender, EventArgs e)
 {
     Tables.CardItem newCard = new Tables.CardItem { Deck = workDeck, visualBackSide = Visibility.Visible, visualFrontSide = Visibility.Collapsed };
     App.ViewModel.createCard(newCard);
     newCard.Deck.CardItems.Add(newCard);
     newCard.Deck.cardsCount = newCard.Deck.CardItems.Count;
     cardsList.ScrollIntoView(newCard);
     this.Focus();
 }