コード例 #1
0
        protected async Task ShowDeckCards(Deck deck)
        {
            deckEdit     = deck;
            DisplayCards = await DeckState.GetDeckCards(deck);

            showCards = true;
            StateHasChanged();
        }
コード例 #2
0
        protected async Task DeleteDeck(Deck deck)
        {
            if (deck.IsDeleteConfirm)
            {
                var cards = await DeckState.GetDeckCards(deck);

                await DeckState.RemoveDeck(deck, cards);

                UserDecks.Remove(deck);
                deck.ConfirmDelete   = "";
                deck.CssConfirmClass = "";
            }
            else
            {
                deck.ConfirmDelete   = "Delete this deck and all card contents, forever?";
                deck.CssConfirmClass = "deckDelete zoom";
            }
            deck.IsDeleteConfirm = !deck.IsDeleteConfirm;
            deckDeleteMessage    = deck.ConfirmDelete;
        }