kopia lustrzana https://github.com/njcrawford/EmbroideryReader
Catch InvalidPrinterException when showing print preview dialog. Should resolve issue #14.
rodzic
612b8d0a24
commit
aeb8aaf6e4
|
@ -558,10 +558,17 @@ namespace embroideryReader
|
|||
}
|
||||
|
||||
private void printPreviewToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
printPreviewDialog1.Document = printDocument1;
|
||||
printPreviewDialog1.ShowDialog();
|
||||
}
|
||||
catch(System.Drawing.Printing.InvalidPrinterException pex)
|
||||
{
|
||||
MessageBox.Show("Unable to find a default printer: " + pex.Message + Environment.NewLine + Environment.NewLine + "Possible reasons include: no printers are installed, or no printer is set as the default.");
|
||||
}
|
||||
}
|
||||
|
||||
private void copyToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue