C# Class XSDDiagram.Rendering.DiagramPrinter

This manages or controls the output of a displayed diagram to the printer.

The System.Drawing.Printing.PrintDocument, required to print in a typical the Windows Forms applications, is automatically created and maintained by the instance of this class.

Inheritance: IDisposable
Mostra file Open project: dgis/xsddiagram Class Usage Examples

Private Properties

Property Type Description
Dispose void
OnBeginPrint void
OnEndPrint void
OnPrintPage void

Public Methods

Method Description
DiagramPrinter ( ) : System

Initializes a new instance of the DiagramPrinter class with the specified diagram engine.

Dispose ( ) : void

This cleans up any resources being used.

PageSetup ( ) : void

This creates and displays the page setup dialog, PageSetupDialog, which enables users to change page-related print settings, including margins and paper orientation.

The dialog is displayed in the modal state.

Print ( bool showDialog, bool isRunningOnMono ) : void

This prints the currently displayed diagram, with an option to display the print dialog, PrintDialog.

PrintPreview ( ) : void

This creates and displays the print-preview dialog to both preview and print the diagram.

The dialog is displayed in the modal state.

Private Methods

Method Description
Dispose ( bool disposing ) : void

This cleans up any resources being used.

OnBeginPrint ( object sender, System.Drawing.Printing.PrintEventArgs e ) : void

OnEndPrint ( object sender, System.Drawing.Printing.PrintEventArgs e ) : void

OnPrintPage ( object sender, System.Drawing.Printing.PrintPageEventArgs e ) : void

Method Details

DiagramPrinter() public method

Initializes a new instance of the DiagramPrinter class with the specified diagram engine.
public DiagramPrinter ( ) : System
return System

Dispose() public method

This cleans up any resources being used.
public Dispose ( ) : void
return void

PageSetup() public method

This creates and displays the page setup dialog, PageSetupDialog, which enables users to change page-related print settings, including margins and paper orientation.
The dialog is displayed in the modal state.
public PageSetup ( ) : void
return void

Print() public method

This prints the currently displayed diagram, with an option to display the print dialog, PrintDialog.
public Print ( bool showDialog, bool isRunningOnMono ) : void
showDialog bool /// This indicates whether to display the /// dialog or not. If , the print dialog is /// display to the user to prompt the print operation, and the user /// could cancel the print operation. ///
isRunningOnMono bool
return void

PrintPreview() public method

This creates and displays the print-preview dialog to both preview and print the diagram.
The dialog is displayed in the modal state.
public PrintPreview ( ) : void
return void