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
Afficher le fichier Open project: Hli4S/TestMeApp Class Usage Examples

Private Properties

Свойство 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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

Stops rendering the Document.
public Cancel ( ) : void
Résultat void

CoolPrintPreviewControl() public méthode

Initializes a new instance of a CoolPrintPreviewControl control.
public CoolPrintPreviewControl ( ) : System
Résultat System

IsInputKey() protected méthode

protected IsInputKey ( Keys keyData ) : bool
keyData Keys
Résultat bool

OnKeyDown() protected méthode

protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
Résultat void

OnMouseDown() protected méthode

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnMouseMove() protected méthode

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnMouseUp() protected méthode

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnMouseWheel() protected méthode

protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
Résultat void

OnPageCountChanged() protected méthode

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

OnPaint() protected méthode

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnPaintBackground() protected méthode

protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
Résultat void

OnSizeChanged() protected méthode

protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnStartPageChanged() protected méthode

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

OnZoomModeChanged() protected méthode

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

Print() public méthode

Prints the current document honoring the selected page range.
public Print ( ) : void
Résultat void

RefreshPreview() public méthode

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