protected virtual void OnPrintOccured(object sender, PrintOccuredEventArgs e) { PrintOccuredHandler handler = PrintOccured; if (handler != null) { handler(this, e); } }
internal void printer_PrintOccured(object sender, PrintOccuredEventArgs e) { if (this.IsHandleCreated && txtPrinterOutput.IsHandleCreated && this.Visible) Invoke(new Action(() => { string text = EscapeASCII(e.Text) + "\r\n\r\n"; txtPrinterOutput.Text += text; })); }