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); } }
private void SearchButton_Click(object sender, EventArgs e) { var cards = SearchBox.Text.Split(new[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); MtgController.AddCardsToForm(cards, GetSearchType()); }