private void btnPrint_Click(object sender, EventArgs e) { try { if (exListBox1.Items.Count == 0) { return; } var itm = GetCurrItem(); saveFDPDF.FileName = itm.Name + " " + itm.WallTypes.Rw.ToString() + " " + itm.WallTypes.EI.ToString() + " " + itm.WallTypes.Tp.ToString(); if (saveFDPDF.ShowDialog() != DialogResult.OK) { return; } String flName = saveFDPDF.FileName; PDFManager mng = new PDFManager(flName, "KnaufInsulation"); mng.MakePDF(itm); mng.Save(); var ret = MessageBox.Show("Документ успешно сохранен.\r\nОткрыть файл?", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (ret == DialogResult.Yes) { Process.Start(flName); } } catch (Exception ex) { Helper.WriteLog("Ошибка печати" + ex.Message); MessageBox.Show(ex.Message); } }