C# Class CoolPrintPreview.CoolPrintPreviewControl

Represents a preview of one or two pages in a PrintDocument.
This control is similar to the standard PrintPreviewControl but it displays pages as they are rendered. By contrast, the standard control waits until the entire document is rendered before it displays anything.
Inheritance: System.Windows.Forms.UserControl
Mostrar archivo Open project: Hli4S/TestMeApp Class Usage Examples

Private Properties

Property Type Description
GetImage Image
GetImageRectangle System.Drawing.Rectangle
GetImageSizeInPixels System.Drawing.Size
RenderPage void
SyncPageImages void
UpdatePreview void
UpdateScrollBars void
_doc_EndPrint void
_doc_PrintPage void

Public Methods

Method Description
Cancel ( ) : void

Stops rendering the Document.

CoolPrintPreviewControl ( ) : System

Initializes a new instance of a CoolPrintPreviewControl control.

Print ( ) : void

Prints the current document honoring the selected page range.

RefreshPreview ( ) : void

Regenerates the preview to reflect changes in the document layout.

Protected Methods

Method Description
IsInputKey ( Keys keyData ) : bool
OnKeyDown ( KeyEventArgs e ) : void
OnMouseDown ( MouseEventArgs e ) : void
OnMouseMove ( MouseEventArgs e ) : void
OnMouseUp ( MouseEventArgs e ) : void
OnMouseWheel ( MouseEventArgs e ) : void
OnPageCountChanged ( EventArgs e ) : void

Raises the PageCountChanged event.

OnPaint ( PaintEventArgs e ) : void
OnPaintBackground ( PaintEventArgs e ) : void
OnSizeChanged ( EventArgs e ) : void
OnStartPageChanged ( EventArgs e ) : void

Raises the StartPageChanged event.

OnZoomModeChanged ( EventArgs e ) : void

Raises the ZoomModeChanged event.

Private Methods

Method Description
GetImage ( int page ) : Image
GetImageRectangle ( Image img ) : Rectangle
GetImageSizeInPixels ( Image img ) : Size
RenderPage ( Graphics g, Image img, Rectangle rc ) : void
SyncPageImages ( bool lastPageReady ) : void
UpdatePreview ( ) : void
UpdateScrollBars ( ) : void
_doc_EndPrint ( object sender, System.Drawing.Printing.PrintEventArgs e ) : void
_doc_PrintPage ( object sender, System.Drawing.Printing.PrintPageEventArgs e ) : void

Method Details

Cancel() public method

Stops rendering the Document.
public Cancel ( ) : void
return void

CoolPrintPreviewControl() public method

Initializes a new instance of a CoolPrintPreviewControl control.
public CoolPrintPreviewControl ( ) : System
return System

IsInputKey() protected method

protected IsInputKey ( Keys keyData ) : bool
keyData Keys
return bool

OnKeyDown() protected method

protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
return void

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseMove() protected method

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseUp() protected method

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnMouseWheel() protected method

protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
return void

OnPageCountChanged() protected method

Raises the PageCountChanged event.
protected OnPageCountChanged ( EventArgs e ) : void
e System.EventArgs that provides the event data/
return void

OnPaint() protected method

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnPaintBackground() protected method

protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
return void

OnSizeChanged() protected method

protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
return void

OnStartPageChanged() protected method

Raises the StartPageChanged event.
protected OnStartPageChanged ( EventArgs e ) : void
e System.EventArgs that provides the event data.
return void

OnZoomModeChanged() protected method

Raises the ZoomModeChanged event.
protected OnZoomModeChanged ( EventArgs e ) : void
e System.EventArgs that contains the event data.
return void

Print() public method

Prints the current document honoring the selected page range.
public Print ( ) : void
return void

RefreshPreview() public method

Regenerates the preview to reflect changes in the document layout.
public RefreshPreview ( ) : void
return void