Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CommonUI / System / Drawing / BufferedGraphicsManager.cs / 1305376 / BufferedGraphicsManager.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Drawing { using System; using System.ComponentModel; using System.Collections; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Text; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; using System.Security; using System.Security.Permissions; using System.Runtime.ConstrainedExecution; ////// /// The BufferedGraphicsManager is used for accessing a BufferedGraphicsContext. /// public sealed class BufferedGraphicsManager { private static BufferedGraphicsContext bufferedGraphicsContext; ////// /// Private constructor. /// private BufferedGraphicsManager() { } ////// /// Static constructor. Here, we hook the exit & unload events so we can clean up our context buffer. /// static BufferedGraphicsManager() { AppDomain.CurrentDomain.ProcessExit += new EventHandler(BufferedGraphicsManager.OnShutdown); AppDomain.CurrentDomain.DomainUnload += new EventHandler(BufferedGraphicsManager.OnShutdown); bufferedGraphicsContext = new BufferedGraphicsContext(); } ////// /// Retrieves the context associated with the app domain. /// public static BufferedGraphicsContext Current { get { return bufferedGraphicsContext; } } ////// /// Called on process exit /// [PrePrepareMethod] private static void OnShutdown(object sender, EventArgs e) { BufferedGraphicsManager.Current.Invalidate(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _ReceiveMessageOverlappedAsyncResult.cs
- MaterialCollection.cs
- ActivityCodeDomReferenceService.cs
- DataTableMapping.cs
- ClientSettings.cs
- SmiConnection.cs
- SizeChangedInfo.cs
- ItemCheckEvent.cs
- AsymmetricSignatureFormatter.cs
- MouseDevice.cs
- InkCanvasSelectionAdorner.cs
- GridViewColumnCollection.cs
- ResourcesBuildProvider.cs
- PnrpPeerResolver.cs
- OLEDB_Enum.cs
- SRDisplayNameAttribute.cs
- ProfileProvider.cs
- SourceCollection.cs
- StylusEditingBehavior.cs
- DivideByZeroException.cs
- DBDataPermission.cs
- RemoteTokenFactory.cs
- ServiceContractDetailViewControl.cs
- SafeEventLogWriteHandle.cs
- ItemType.cs
- MessageContractImporter.cs
- MetadataImporter.cs
- CompilerError.cs
- BrowserCapabilitiesFactoryBase.cs
- SafeArrayRankMismatchException.cs
- XmlSchemaChoice.cs
- MobileUITypeEditor.cs
- ProcessInfo.cs
- RelatedImageListAttribute.cs
- LoginName.cs
- __Error.cs
- XamlGridLengthSerializer.cs
- ParserContext.cs
- ToolStripDropDownDesigner.cs
- InstanceKey.cs
- ClassicBorderDecorator.cs
- TreeWalker.cs
- xamlnodes.cs
- safePerfProviderHandle.cs
- XmlElementAttribute.cs
- PrintDialog.cs
- SoapInteropTypes.cs
- AnimationClockResource.cs
- ObjectResult.cs
- XmlSchemaComplexContentExtension.cs
- ImageSourceValueSerializer.cs
- DateTimeStorage.cs
- _ShellExpression.cs
- SoundPlayerAction.cs
- XmlQueryRuntime.cs
- UpWmlMobileTextWriter.cs
- ToolStripOverflow.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- MasterPage.cs
- MediaPlayer.cs
- DSASignatureDeformatter.cs
- RangeValidator.cs
- ReadWriteSpinLock.cs
- UriTemplateLiteralPathSegment.cs
- OutputCacheSection.cs
- ListBindingHelper.cs
- CultureInfo.cs
- CollectionDataContractAttribute.cs
- UnmanagedBitmapWrapper.cs
- MetaChildrenColumn.cs
- PauseStoryboard.cs
- WCFModelStrings.Designer.cs
- GeneralTransform3DGroup.cs
- DataSourceHelper.cs
- ViewBase.cs
- DbConnectionOptions.cs
- FloatSumAggregationOperator.cs
- X509UI.cs
- ContainerUIElement3D.cs
- Win32MouseDevice.cs
- CompilerScope.cs
- RtfControls.cs
- MenuBase.cs
- Adorner.cs
- KeyValueConfigurationCollection.cs
- WebEvents.cs
- BulletChrome.cs
- SinglePageViewer.cs
- MiniCustomAttributeInfo.cs
- FixedTextContainer.cs
- URLBuilder.cs
- HtmlElementErrorEventArgs.cs
- SpeakProgressEventArgs.cs
- SymbolMethod.cs
- XmlValidatingReader.cs
- QueryCacheKey.cs
- UInt32.cs
- TextServicesHost.cs
- Errors.cs
- DebugView.cs