private void btnShowImagePrintSettings_Click(object sender, EventArgs e) { using (Image testImage = Screenshot.CaptureActiveMonitor()) using (PrintForm printForm = new PrintForm(testImage, Program.Settings.PrintSettings, true)) { printForm.ShowDialog(); } }
public static void PrintImage(Image img) { if (Program.Settings.DontShowPrintSettingsDialog) { using (PrintHelper printHelper = new PrintHelper(img)) { printHelper.Settings = Program.Settings.PrintSettings; printHelper.Print(); } } else { using (PrintForm printForm = new PrintForm(img, Program.Settings.PrintSettings)) { printForm.ShowDialog(); } } }