Exemplo n.º 1
0
 public PrintTextForm(string text, PrintSettings settings)
 {
     InitializeComponent();
     printHelper = new PrintHelper(text);
     printHelper.Settings = printSettings = settings;
     LoadSettings();
 }
Exemplo n.º 2
0
 public PrintForm(Image img, PrintSettings settings, bool previewOnly = false)
 {
     InitializeComponent();
     printHelper = new PrintHelper(img);
     printHelper.Settings = printSettings = settings;
     btnPrint.Enabled = !previewOnly;
     LoadSettings();
 }
Exemplo n.º 3
0
 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();
         }
     }
 }