Class PreviewMetaFile
Windowed control to preview report MetaFiles, it's used by PreviewWinForms.
Inherited Members
Namespace: Reportman.Drawing.Forms
Assembly: Reportman.Drawing.Forms.dll
Syntax
[ToolboxBitmap(typeof(PreviewMetaFile), "previewmetafile.ico")]
public class PreviewMetaFile : ScrollableControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable
Remarks
You can use this control to create customized preview windows
Constructors
PreviewMetaFile()
Constructor, initialization of the control
Declaration
public PreviewMetaFile()
PreviewMetaFile(IContainer)
Constructor required by Windows.Forms
Declaration
public PreviewMetaFile(IContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| IContainer | container |
Fields
OnMail
Event to modify mail parameters before sending
Declaration
public SendMailEvent OnMail
Field Value
| Type | Description |
|---|---|
| SendMailEvent |
OnPageSetup
Event to launch when the user click page setup icon
Declaration
public AlterReportEvent OnPageSetup
Field Value
| Type | Description |
|---|---|
| AlterReportEvent |
OnReportParams
Event to launch when the user click report parameters icon
Declaration
public AlterReportEvent OnReportParams
Field Value
| Type | Description |
|---|---|
| AlterReportEvent |
OptimizeWMF
Windows Metafile optimization
Declaration
public WMFOptimization OptimizeWMF
Field Value
| Type | Description |
|---|---|
| WMFOptimization |
ProgressCancel
When the window is processing a report it stores if the user canceled the report
Declaration
public bool ProgressCancel
Field Value
| Type | Description |
|---|---|
| bool |
prdriver
Internal print driver
Declaration
protected PrintOutNet prdriver
Field Value
| Type | Description |
|---|---|
| PrintOutNet |
Properties
AutoScale
Determines how the page is scaled to the window
Declaration
public AutoScaleType AutoScale { get; set; }
Property Value
| Type | Description |
|---|---|
| AutoScaleType |
EntirePageCount
Draw multiple pages at a time, on modern high resolution monitors, two vertical standard pages can fit on screen at a readable scale
Declaration
public int EntirePageCount { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
EntireToDown
When multiple pages are drawn (EntirePageCount), if you set this property the path to draw them will be from top to bottom
Declaration
public bool EntireToDown { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
MetaFile
MetaFile to process
Declaration
[Browsable(false)]
public MetaFile MetaFile { get; set; }
Property Value
| Type | Description |
|---|---|
| MetaFile |
Page
Get or set current page, first page index is 0.
Declaration
[Browsable(false)]
public int Page { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
PagesDrawn
Number of pages drawn, when the mode is full page and EntirePageCount is greater than one.
Declaration
public int PagesDrawn { get; }
Property Value
| Type | Description |
|---|---|
| int |
PreviewScale
Get or set scaling index, setting this property will automatically set also the AutoScale to AutoScaleType.Custom
Declaration
public float PreviewScale { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ProgressPageCount
When the window is processing a report it stores the number of pages processed
Declaration
public int ProgressPageCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
ProgressRecords
When the window is processing a report it stores the number of records processed
Declaration
public int ProgressRecords { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing |
Overrides
LastPage()
Draws the last page
Declaration
public void LastPage()
NextPage()
Draws the next page
Declaration
public void NextPage()
PriorPage()
Draws the prior page
Declaration
public void PriorPage()
ReDrawPage()
Internal main procedure performing the draw of the page at selected scale
Declaration
protected void ReDrawPage()
RefreshPage()
Redraws current page
Declaration
public void RefreshPage()
SetDriver(PrintOutNet)
Override print driver
Declaration
public void SetDriver(PrintOutNet newdriver)
Parameters
| Type | Name | Description |
|---|---|---|
| PrintOutNet | newdriver |
SetMetaFile(MetaFile)
Internal procedure initializing data when setting metafile, it draws also the first page
Declaration
protected void SetMetaFile(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta |
WorkProgress(int, int, ref bool)
Force the event OnWorkProgress, used internally while processing a report
Declaration
public void WorkProgress(int records, int pagecount, ref bool docancel)
Parameters
| Type | Name | Description |
|---|---|---|
| int | records | Current number of records processed |
| int | pagecount | Current number of pages processed |
| bool | docancel | Reference variable, then it is set to true the report will be cancelled |
Events
OnPageDrawn
Event launched each time a page is drawn
Declaration
public event PageDrawnEvent OnPageDrawn
Event Type
| Type | Description |
|---|---|
| PageDrawnEvent |
OnWorkProgress
Event launched while processing the report, you can use it to provide information to the user
Declaration
public event MetaFileWorkProgress OnWorkProgress
Event Type
| Type | Description |
|---|---|
| MetaFileWorkProgress |