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
- ExceptQueryOperator.cs
- RequestResizeEvent.cs
- ResourceManagerWrapper.cs
- InstanceOwnerQueryResult.cs
- VectorConverter.cs
- PreservationFileReader.cs
- AsyncCompletedEventArgs.cs
- PassportPrincipal.cs
- HandleCollector.cs
- DeferredReference.cs
- MethodBody.cs
- DictionarySectionHandler.cs
- Compiler.cs
- LogFlushAsyncResult.cs
- NonVisualControlAttribute.cs
- DSASignatureDeformatter.cs
- MissingMethodException.cs
- LinqDataSourceInsertEventArgs.cs
- MasterPageBuildProvider.cs
- ConsoleKeyInfo.cs
- ExceptionUtil.cs
- SystemInfo.cs
- WebSysDescriptionAttribute.cs
- AbstractDataSvcMapFileLoader.cs
- unitconverter.cs
- MessageSecurityOverTcpElement.cs
- TextBoxRenderer.cs
- MemoryStream.cs
- _IPv6Address.cs
- EntityTypeBase.cs
- PropagatorResult.cs
- EndCreateSecurityTokenRequest.cs
- AttributeEmitter.cs
- DragStartedEventArgs.cs
- Timer.cs
- Crc32Helper.cs
- MetadataPropertyAttribute.cs
- BinHexDecoder.cs
- unsafeIndexingFilterStream.cs
- WebPartEventArgs.cs
- SoapProtocolImporter.cs
- SerializationSectionGroup.cs
- TextTreeTextBlock.cs
- HMACMD5.cs
- SwitchAttribute.cs
- ProtocolsConfigurationEntry.cs
- DefaultAsyncDataDispatcher.cs
- WmlPanelAdapter.cs
- UserControlFileEditor.cs
- MouseActionConverter.cs
- _AutoWebProxyScriptHelper.cs
- OdbcError.cs
- ConnectionPoint.cs
- XomlCompilerParameters.cs
- _NegoStream.cs
- ProgressBar.cs
- Tokenizer.cs
- EventDescriptorCollection.cs
- ContentPlaceHolderDesigner.cs
- BrowserCapabilitiesFactoryBase.cs
- PropertyGeneratedEventArgs.cs
- PropertyEntry.cs
- ToolBarOverflowPanel.cs
- DocumentPageTextView.cs
- ContainerFilterService.cs
- WindowsListView.cs
- SimpleLine.cs
- DocumentOrderQuery.cs
- WpfWebRequestHelper.cs
- Application.cs
- MulticastNotSupportedException.cs
- KerberosReceiverSecurityToken.cs
- StylusEventArgs.cs
- GridViewRow.cs
- UserControlBuildProvider.cs
- OleServicesContext.cs
- NativeObjectSecurity.cs
- HttpCapabilitiesBase.cs
- HtmlInputFile.cs
- _AuthenticationState.cs
- LinearGradientBrush.cs
- ChangePassword.cs
- TreeNode.cs
- elementinformation.cs
- StreamWithDictionary.cs
- ClientBuildManager.cs
- XmlElementCollection.cs
- PartialCachingControl.cs
- SafeEventLogWriteHandle.cs
- OdbcException.cs
- Attribute.cs
- AppLevelCompilationSectionCache.cs
- StreamWriter.cs
- Component.cs
- WebConfigurationFileMap.cs
- ExpandSegmentCollection.cs
- StandardCommandToolStripMenuItem.cs
- WebPartDisplayModeEventArgs.cs
- _RequestCacheProtocol.cs
- CapabilitiesUse.cs