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
- TextProperties.cs
- LicenseException.cs
- DataServiceContext.cs
- NotifyIcon.cs
- XmlIncludeAttribute.cs
- DataGridViewEditingControlShowingEventArgs.cs
- PassportPrincipal.cs
- WebService.cs
- FlowDocumentReader.cs
- X509CertificateValidator.cs
- Model3D.cs
- MultiView.cs
- Transform.cs
- WindowsScrollBar.cs
- SchemaImporterExtensionsSection.cs
- CollectionsUtil.cs
- ApplicationSettingsBase.cs
- PropertyEmitter.cs
- HWStack.cs
- ToggleButton.cs
- BitmapEffectDrawingContextWalker.cs
- Debugger.cs
- RadialGradientBrush.cs
- RegexMatchCollection.cs
- BinaryParser.cs
- GridSplitterAutomationPeer.cs
- ReservationNotFoundException.cs
- DataViewSettingCollection.cs
- FrameworkRichTextComposition.cs
- InternalsVisibleToAttribute.cs
- GestureRecognizer.cs
- IgnoreSectionHandler.cs
- Hashtable.cs
- DurableInstanceProvider.cs
- DiscoveryClientProtocol.cs
- DesignSurfaceManager.cs
- CreateUserErrorEventArgs.cs
- ScrollEventArgs.cs
- ConnectionsZone.cs
- TitleStyle.cs
- SafeNativeMethods.cs
- x509store.cs
- CompatibleIComparer.cs
- SqlDependencyUtils.cs
- Translator.cs
- BooleanAnimationBase.cs
- ProviderIncompatibleException.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- StatusBar.cs
- CodeNamespaceImport.cs
- HandleExceptionArgs.cs
- CompiledXpathExpr.cs
- TraceUtility.cs
- ReflectionServiceProvider.cs
- WindowsTokenRoleProvider.cs
- DataSourceXmlTextReader.cs
- UIElementParagraph.cs
- MethodToken.cs
- FixedDocumentSequencePaginator.cs
- RoutedEventValueSerializer.cs
- CancellationState.cs
- FormatConvertedBitmap.cs
- RowToParametersTransformer.cs
- AlignmentXValidation.cs
- PagePropertiesChangingEventArgs.cs
- GrammarBuilderRuleRef.cs
- RC2CryptoServiceProvider.cs
- AffineTransform3D.cs
- SQLCharsStorage.cs
- HandlerFactoryWrapper.cs
- Int16Converter.cs
- RecognizedAudio.cs
- Button.cs
- GatewayIPAddressInformationCollection.cs
- SHA384.cs
- LinqMaximalSubtreeNominator.cs
- AspProxy.cs
- IntSecurity.cs
- UInt64Converter.cs
- CodeDirectoryCompiler.cs
- ValidationEventArgs.cs
- login.cs
- NamespaceListProperty.cs
- PerformanceCounterPermissionAttribute.cs
- XamlInterfaces.cs
- PasswordRecovery.cs
- HttpContextWrapper.cs
- TypeFieldSchema.cs
- CachedTypeface.cs
- ConfigurationSection.cs
- Line.cs
- Rules.cs
- CustomAttributeFormatException.cs
- ObsoleteAttribute.cs
- ProtectedConfiguration.cs
- XmlNavigatorFilter.cs
- AccessViolationException.cs
- CollectionChangedEventManager.cs
- StringCollection.cs
- XslCompiledTransform.cs