protected virtual void OnPrintSourcesCreated(PrintCompleteEventArgs e) { var handler = PrintSourcesCreated; if (handler != null) { handler(this, e); } }
private void OnPrintComplete(object sender, PrintCompleteEventArgs e) { Debug.Print(String.Format("Print request {0} completed. The following files were created:", e.RequestId)); foreach (string file in e.Files) { Debug.Print(String.Format("\t {0}", file)); } }
/// <summary>Event handler for successful printing</summary> private void WebControl_PrintComplete(object sender, PrintCompleteEventArgs e) { // Print the file to the printer. if (String.IsNullOrWhiteSpace(printerName)) { return; } foreach (string file in e.Files) { System.Diagnostics.Debug.Print("Printing file {0}", file); RawPrinterHelper.SendFileToPrinter(printerName, file); } }