Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CommonUI / System / Drawing / Printing / PrintPageEvent.cs / 1305376 / PrintPageEvent.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Drawing.Printing { using System.Diagnostics; using System; using System.Drawing; using System.ComponentModel; using Microsoft.Win32; ////// /// // NOTE: Please keep this class consistent with PaintEventArgs. public class PrintPageEventArgs : EventArgs { private bool hasMorePages; private bool cancel; private Graphics graphics; private readonly Rectangle marginBounds; private readonly Rectangle pageBounds; private readonly PageSettings pageSettings; ///Provides data for the ////// event. /// /// public PrintPageEventArgs(Graphics graphics, Rectangle marginBounds, Rectangle pageBounds, PageSettings pageSettings) { this.graphics = graphics; // may be null, see PrintController this.marginBounds = marginBounds; this.pageBounds = pageBounds; this.pageSettings = pageSettings; } ///Initializes a new instance of the ///class. /// /// public bool Cancel { get { return cancel;} set { cancel = value;} } ///Gets or sets a value indicating whether the print job should be canceled. ////// /// public Graphics Graphics { get { return graphics; } } ////// Gets the ////// used to paint the /// item. /// /// /// public bool HasMorePages { get { return hasMorePages;} set { hasMorePages = value;} } ///Gets or sets a value indicating whether an additional page should /// be printed. ////// /// public Rectangle MarginBounds { get { return marginBounds; } } ///Gets the rectangular area that represents the portion of the page between the margins. ////// /// public Rectangle PageBounds { get { return pageBounds; } } ////// Gets the rectangular area that represents the total area of the page. /// ////// /// public PageSettings PageSettings { get { return pageSettings; } } ///Gets /// the page settings for the current page. ////// /// // We want a way to dispose the GDI+ Graphics, but we don't want to create one // simply to dispose it internal void Dispose() { graphics.Dispose(); } internal void SetGraphics(Graphics value) { this.graphics = value; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Disposes /// of the resources (other than memory) used by /// the ///. // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Drawing.Printing { using System.Diagnostics; using System; using System.Drawing; using System.ComponentModel; using Microsoft.Win32; ////// /// // NOTE: Please keep this class consistent with PaintEventArgs. public class PrintPageEventArgs : EventArgs { private bool hasMorePages; private bool cancel; private Graphics graphics; private readonly Rectangle marginBounds; private readonly Rectangle pageBounds; private readonly PageSettings pageSettings; ///Provides data for the ////// event. /// /// public PrintPageEventArgs(Graphics graphics, Rectangle marginBounds, Rectangle pageBounds, PageSettings pageSettings) { this.graphics = graphics; // may be null, see PrintController this.marginBounds = marginBounds; this.pageBounds = pageBounds; this.pageSettings = pageSettings; } ///Initializes a new instance of the ///class. /// /// public bool Cancel { get { return cancel;} set { cancel = value;} } ///Gets or sets a value indicating whether the print job should be canceled. ////// /// public Graphics Graphics { get { return graphics; } } ////// Gets the ////// used to paint the /// item. /// /// /// public bool HasMorePages { get { return hasMorePages;} set { hasMorePages = value;} } ///Gets or sets a value indicating whether an additional page should /// be printed. ////// /// public Rectangle MarginBounds { get { return marginBounds; } } ///Gets the rectangular area that represents the portion of the page between the margins. ////// /// public Rectangle PageBounds { get { return pageBounds; } } ////// Gets the rectangular area that represents the total area of the page. /// ////// /// public PageSettings PageSettings { get { return pageSettings; } } ///Gets /// the page settings for the current page. ////// /// // We want a way to dispose the GDI+ Graphics, but we don't want to create one // simply to dispose it internal void Dispose() { graphics.Dispose(); } internal void SetGraphics(Graphics value) { this.graphics = value; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Disposes /// of the resources (other than memory) used by /// the ///.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WmlPageAdapter.cs
- SoapIncludeAttribute.cs
- DataComponentNameHandler.cs
- sqlser.cs
- GACIdentityPermission.cs
- ellipse.cs
- TimelineGroup.cs
- typedescriptorpermissionattribute.cs
- SymbolMethod.cs
- SessionMode.cs
- ReservationNotFoundException.cs
- DragDrop.cs
- CodeGen.cs
- EDesignUtil.cs
- PropertyDescriptorGridEntry.cs
- MetaChildrenColumn.cs
- SignatureDescription.cs
- ConfigurationManagerInternal.cs
- controlskin.cs
- TextRunCacheImp.cs
- DateTime.cs
- GridToolTip.cs
- AppDomainManager.cs
- ContainerVisual.cs
- SoapReflectionImporter.cs
- RemotingAttributes.cs
- SecurityRuntime.cs
- elementinformation.cs
- ElementNotEnabledException.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DataGridViewRowHeaderCell.cs
- ParserStreamGeometryContext.cs
- SmiXetterAccessMap.cs
- VisualStyleElement.cs
- ItemCheckEvent.cs
- StreamBodyWriter.cs
- XmlAttributeHolder.cs
- MetadataSet.cs
- XmlSchemaCollection.cs
- ViewLoader.cs
- IdentityManager.cs
- ObjectDataSource.cs
- CodeConstructor.cs
- SHA384Managed.cs
- DataGridViewColumnCollection.cs
- SelectedCellsChangedEventArgs.cs
- EventLogPermissionAttribute.cs
- TemplateNodeContextMenu.cs
- ScrollBarAutomationPeer.cs
- DesignTimeSiteMapProvider.cs
- Paragraph.cs
- DataGridViewCellEventArgs.cs
- UrlMappingsModule.cs
- RichTextBox.cs
- ZipIOExtraFieldPaddingElement.cs
- SafeNativeMethodsOther.cs
- columnmapkeybuilder.cs
- BinaryMethodMessage.cs
- TileBrush.cs
- ClaimSet.cs
- TableLayoutRowStyleCollection.cs
- CodeExpressionStatement.cs
- EventMappingSettings.cs
- AudioException.cs
- LayoutEngine.cs
- BindableAttribute.cs
- ObjectParameterCollection.cs
- mediaeventargs.cs
- ToolboxDataAttribute.cs
- MenuCommand.cs
- Operand.cs
- GroupItem.cs
- StateItem.cs
- HttpRuntimeSection.cs
- RequestDescription.cs
- ThumbAutomationPeer.cs
- AssemblyBuilder.cs
- TemplateContainer.cs
- WebPartEventArgs.cs
- TimerEventSubscriptionCollection.cs
- DataRecordInternal.cs
- ToolZone.cs
- EditorZone.cs
- DBCommandBuilder.cs
- UInt32Storage.cs
- WebMessageEncodingElement.cs
- SqlCaseSimplifier.cs
- WebExceptionStatus.cs
- AuthenticationService.cs
- DbRetry.cs
- PrintEvent.cs
- Monitor.cs
- DownloadProgressEventArgs.cs
- WindowsFormsSynchronizationContext.cs
- ApplicationSecurityInfo.cs
- ComponentResourceKey.cs
- ComplexTypeEmitter.cs
- DragEventArgs.cs
- LocatorPart.cs
- PartialTrustVisibleAssembly.cs