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
- HtmlInputReset.cs
- ViewValidator.cs
- ChangeInterceptorAttribute.cs
- TeredoHelper.cs
- ControlAdapter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- LogArchiveSnapshot.cs
- ImageMapEventArgs.cs
- PeerPresenceInfo.cs
- RuleAttributes.cs
- IndependentAnimationStorage.cs
- WebRequestModulesSection.cs
- BaseResourcesBuildProvider.cs
- SqlInternalConnectionTds.cs
- TableLayoutPanelCodeDomSerializer.cs
- RankException.cs
- DataGridViewComboBoxColumnDesigner.cs
- SQLInt16Storage.cs
- BinaryParser.cs
- CompositeCollection.cs
- TextBoxRenderer.cs
- Grid.cs
- IOThreadScheduler.cs
- FreezableCollection.cs
- HtmlUtf8RawTextWriter.cs
- WebPartTransformerCollection.cs
- XmlSchemaSequence.cs
- AssemblyHash.cs
- CharStorage.cs
- HttpListenerElement.cs
- CustomCredentialPolicy.cs
- UTF32Encoding.cs
- WebPartDisplayModeCollection.cs
- UnknownWrapper.cs
- ConfigurationManagerHelper.cs
- Part.cs
- NTAccount.cs
- MediaContext.cs
- XmlTextWriter.cs
- Vector3DAnimationUsingKeyFrames.cs
- diagnosticsswitches.cs
- ScriptResourceInfo.cs
- ExpandoObject.cs
- User.cs
- CodeDesigner.cs
- RC2CryptoServiceProvider.cs
- ConnectionInterfaceCollection.cs
- HttpCacheVary.cs
- AuthStoreRoleProvider.cs
- GlyphCache.cs
- ColorTranslator.cs
- HeaderedContentControl.cs
- WarningException.cs
- EditingCoordinator.cs
- MetadataHelper.cs
- SystemColorTracker.cs
- GregorianCalendar.cs
- ItemList.cs
- QilReference.cs
- ParameterModifier.cs
- ToolStripProgressBar.cs
- XmlEntity.cs
- BindableAttribute.cs
- XmlUTF8TextWriter.cs
- StorageModelBuildProvider.cs
- EmptyStringExpandableObjectConverter.cs
- ShapeTypeface.cs
- WsatServiceAddress.cs
- ToolStripItemGlyph.cs
- DateTimeStorage.cs
- VerificationException.cs
- SecurityState.cs
- XmlDataLoader.cs
- ByteStreamMessageEncoderFactory.cs
- DispatchChannelSink.cs
- TextSchema.cs
- TableAdapterManagerHelper.cs
- ByteConverter.cs
- UriParserTemplates.cs
- SizeFConverter.cs
- TableLayoutCellPaintEventArgs.cs
- SafeNativeMethodsMilCoreApi.cs
- odbcmetadatafactory.cs
- XmlIlVisitor.cs
- OutputWindow.cs
- InternalBufferOverflowException.cs
- MemberMaps.cs
- RepeaterCommandEventArgs.cs
- Timer.cs
- ApplicationSecurityInfo.cs
- XmlWriter.cs
- AttachedPropertyBrowsableAttribute.cs
- ResourcesChangeInfo.cs
- DesignerTransactionCloseEvent.cs
- SelectorAutomationPeer.cs
- SignatureGenerator.cs
- ChameleonKey.cs
- AddInToken.cs
- LongValidatorAttribute.cs
- XPathNavigatorKeyComparer.cs