コード例 #1
0
        public void UpdateDeck(Deck deck)
        {
            var old = Decks.Single(d => d.Id == deck.Id);

            if (old.Id == SelectedDeck.OriginalId)
            {
                SelectedDeck = deck.AsCopy();
            }

            Decks[Decks.IndexOf(old)] = deck;
            db.UpdateDeck(deck);
        }