示例#1
0
        private void ExportB_Click(object sender, EventArgs e)
        {
            try
            {
                var cardholders = GetCardHolders(GetPrintMode());
                if (cardholders == null || cardholders.Count == 0)
                {
                    MessageBox.Show("no cards found. search for cards first");
                    return;
                }

                var fn = GetImageFilename();
                MtgController.SavePDF(cardholders, fn);
                if (File.Exists(fn) && openPDFOnExportToolStripMenuItem.Checked)
                {
                    Process.Start(fn);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("an error has occured while exporting:" + ex);
            }
        }
示例#2
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            var cards = SearchBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);

            MtgController.AddCardsToForm(cards, GetSearchType());
        }