Esempio n. 1
0
        public void SetDeck(Deck deck, CardRepository repo)
        {
            lock (DataSource)
                DataSource.Clear();

            MainDeck.SetDeck(deck.MainDeck);
            SideDeck.SetDeck(deck.Sideboard);
            MaybeDeck.SetDeck(deck.Maybeboard);

            LoadDeck(repo);
        }
Esempio n. 2
0
        public void Clear()
        {
            switch (CurrentZone)
            {
            case Zone.SampleHand:
                SampleHand.Clear();
                break;

            case Zone.Side:
                SideDeck.Clear();
                break;

            case Zone.Maybe:
                MaybeDeck.Clear();
                break;

            case Zone.Main:
                MainDeck.Clear();
                SideDeck.Clear();
                MaybeDeck.Clear();
                break;

            default:
                return;
            }

            lock (DataSource)
                DataSource.Clear();

            DeckChanged?.Invoke(
                listChanged: true,
                countChanged: true,
                card: null,
                touchedChanged: false,
                changedZone: CurrentZone,
                changeTerminatesBatch: true);
        }