Exemple #1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(txtPrintTitle.Text))
     {
         if (MessageBox.Show("No Page Title provided\nContinue ?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes)
         {
             MyPrinter.SetPrintTitle(txtPrintTitle.Text);
             MyPrinter.Print = true;
             this.Close();
         }
     }
     else
     {
         MyPrinter.SetPrintTitle(txtPrintTitle.Text);
         MyPrinter.Print = true;
         this.Close();
     }
 }