Example #1
0
        private void LoadDeck(string path)
        {
            deckFilename = path;
            cards.Clear();

            //CHECK file exists
            if (File.Exists(path))
            {
                if (path.ToLower().EndsWith(".dec") || path.ToLower().EndsWith(".txt"))
                {
                    bwLoadDeck.RunWorkerAsync(path);
                }
            }
            else
            {
                MessageBox.Show("File does not exist:\n" + path, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }