Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / Printing / PrintPageEvent.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.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
- FocusTracker.cs
- DownloadProgressEventArgs.cs
- DiagnosticTrace.cs
- BaseTemplateParser.cs
- SqlDependencyListener.cs
- DropDownButton.cs
- DBConcurrencyException.cs
- SelfIssuedAuthAsymmetricKey.cs
- PageStatePersister.cs
- RootBuilder.cs
- ControlCachePolicy.cs
- Mappings.cs
- CodeCompileUnit.cs
- CriticalHandle.cs
- BitmapEffectRenderDataResource.cs
- RuntimeConfigLKG.cs
- OutputCacheModule.cs
- TransactionProtocolConverter.cs
- MdiWindowListStrip.cs
- VisualStyleInformation.cs
- ConfigXmlDocument.cs
- CustomGrammar.cs
- ByteAnimationUsingKeyFrames.cs
- Addressing.cs
- PagePropertiesChangingEventArgs.cs
- NavigationFailedEventArgs.cs
- XmlDictionaryReaderQuotas.cs
- PropertyConverter.cs
- ClickablePoint.cs
- DataSourceProvider.cs
- CompleteWizardStep.cs
- CommandBinding.cs
- TaskFileService.cs
- KeyedQueue.cs
- FixedPageProcessor.cs
- CompressedStack.cs
- Style.cs
- TextDecoration.cs
- EndEvent.cs
- HashStream.cs
- SoapMessage.cs
- TextElementAutomationPeer.cs
- COM2ICategorizePropertiesHandler.cs
- HtmlContainerControl.cs
- ExportOptions.cs
- BindableTemplateBuilder.cs
- ScriptBehaviorDescriptor.cs
- DataGridColumnCollection.cs
- ScaleTransform3D.cs
- MailHeaderInfo.cs
- TreeViewAutomationPeer.cs
- tooltip.cs
- CodeChecksumPragma.cs
- FormatVersion.cs
- FixedSOMSemanticBox.cs
- RelationshipConverter.cs
- TrackingMemoryStream.cs
- BookmarkScopeManager.cs
- ReferencedAssemblyResolver.cs
- CompiledScopeCriteria.cs
- EventHandlerList.cs
- FunctionNode.cs
- TextChangedEventArgs.cs
- Perspective.cs
- WebPartTracker.cs
- Constants.cs
- ControlBuilder.cs
- XmlSchemaGroup.cs
- IOThreadTimer.cs
- SmtpFailedRecipientsException.cs
- PassportIdentity.cs
- ProbeMatchesMessage11.cs
- AssemblyContextControlItem.cs
- AppDomain.cs
- ArrayElementGridEntry.cs
- Executor.cs
- Vector3DAnimation.cs
- ScriptRegistrationManager.cs
- DataGridTableStyleMappingNameEditor.cs
- ICollection.cs
- AuthorizationSection.cs
- ErrorTolerantObjectWriter.cs
- AdPostCacheSubstitution.cs
- PageResolution.cs
- ValidationEventArgs.cs
- TrustSection.cs
- DataColumnMappingCollection.cs
- Helpers.cs
- CodeVariableDeclarationStatement.cs
- SqlXmlStorage.cs
- MatrixTransform.cs
- FormsAuthentication.cs
- PerformanceCounterPermissionAttribute.cs
- MenuCommand.cs
- StorageInfo.cs
- SQLInt16Storage.cs
- PersonalizationProviderCollection.cs
- WebPartCloseVerb.cs
- SafeCoTaskMem.cs
- FileInfo.cs