C# Класс 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.
Наследование: System.Windows.Forms.UserControl
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetImage Image
GetImageRectangle System.Drawing.Rectangle
GetImageSizeInPixels System.Drawing.Size
RenderPage void
SyncPageImages void
UpdatePreview void
UpdateScrollBars void
_doc_EndPrint void
_doc_PrintPage void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Cancel() публичный Метод

Stops rendering the Document.
public Cancel ( ) : void
Результат void

CoolPrintPreviewControl() публичный Метод

Initializes a new instance of a CoolPrintPreviewControl control.
public CoolPrintPreviewControl ( ) : System
Результат System

IsInputKey() защищенный Метод

protected IsInputKey ( Keys keyData ) : bool
keyData Keys
Результат bool

OnKeyDown() защищенный Метод

protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs
Результат void

OnMouseDown() защищенный Метод

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnMouseMove() защищенный Метод

protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnMouseUp() защищенный Метод

protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnMouseWheel() защищенный Метод

protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs
Результат void

OnPageCountChanged() защищенный Метод

Raises the PageCountChanged event.
protected OnPageCountChanged ( EventArgs e ) : void
e System.EventArgs that provides the event data/
Результат void

OnPaint() защищенный Метод

protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnPaintBackground() защищенный Метод

protected OnPaintBackground ( PaintEventArgs e ) : void
e PaintEventArgs
Результат void

OnSizeChanged() защищенный Метод

protected OnSizeChanged ( EventArgs e ) : void
e System.EventArgs
Результат void

OnStartPageChanged() защищенный Метод

Raises the StartPageChanged event.
protected OnStartPageChanged ( EventArgs e ) : void
e System.EventArgs that provides the event data.
Результат void

OnZoomModeChanged() защищенный Метод

Raises the ZoomModeChanged event.
protected OnZoomModeChanged ( EventArgs e ) : void
e System.EventArgs that contains the event data.
Результат void

Print() публичный Метод

Prints the current document honoring the selected page range.
public Print ( ) : void
Результат void

RefreshPreview() публичный Метод

Regenerates the preview to reflect changes in the document layout.
public RefreshPreview ( ) : void
Результат void