Exemplo n.º 1
0
        private string ShowMissingCards(string deckPath)
        {
            string content = GetDeckDocument(deckPath);

            _worker.ReportProgress(50);
            DeckInfo deckInfo = DeckReaders.GetReader(deckPath).ReadDeck(content);

            deckInfo.GetOwned(_cards, _correctCardNames);
            DisplayMissingPage(deckInfo, deckPath);
            return(deckInfo.DeckName);
        }
Exemplo n.º 2
0
        private bool ShouldAccept(IDataObject data)
        {
            bool accept = _cardDataLoaded && !_working;

            if (accept)
            {
                if (data.GetDataPresent("Text"))
                {
                    accept = DeckReaders.HasReaderFor(data.GetData("Text").ToString());
                }
                else if (data.GetDataPresent("FileName"))
                {
                    accept = DeckReaders.HasReaderFor(GetFileName(data));
                }
                else
                {
                    accept = false;
                }
            }
            return(accept);
        }