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
- StructuralCache.cs
- EditorBrowsableAttribute.cs
- ConditionCollection.cs
- AxisAngleRotation3D.cs
- BuilderPropertyEntry.cs
- IdentityReference.cs
- ProviderCollection.cs
- _AutoWebProxyScriptEngine.cs
- XmlWriterDelegator.cs
- OracleInfoMessageEventArgs.cs
- RelatedCurrencyManager.cs
- MultiPageTextView.cs
- BitmapMetadata.cs
- QuestionEventArgs.cs
- AbstractExpressions.cs
- BinaryFormatterWriter.cs
- EpmContentDeSerializerBase.cs
- TiffBitmapDecoder.cs
- EntityCollection.cs
- validationstate.cs
- ColorAnimationBase.cs
- SID.cs
- BitmapEffectRenderDataResource.cs
- InputBinder.cs
- IsolatedStorageFileStream.cs
- WebRequestModuleElementCollection.cs
- DriveInfo.cs
- NoClickablePointException.cs
- ObjectAnimationBase.cs
- MetadataSource.cs
- AudienceUriMode.cs
- CompoundFileStorageReference.cs
- XmlSchemaSimpleContent.cs
- ToolboxItemFilterAttribute.cs
- LockCookie.cs
- PictureBoxDesigner.cs
- ResourceAssociationType.cs
- FontSizeConverter.cs
- WaitForChangedResult.cs
- EntityContainerEmitter.cs
- RelOps.cs
- RemoveStoryboard.cs
- TypeHelpers.cs
- TagPrefixAttribute.cs
- Html32TextWriter.cs
- MonitorWrapper.cs
- DbUpdateCommandTree.cs
- SafePEFileHandle.cs
- ScheduleChanges.cs
- CompositeCollectionView.cs
- DataGridViewIntLinkedList.cs
- compensatingcollection.cs
- ArrayWithOffset.cs
- ResourceDescriptionAttribute.cs
- LookupBindingPropertiesAttribute.cs
- ToolStripItemImageRenderEventArgs.cs
- DataComponentGenerator.cs
- SoapReflectionImporter.cs
- HostDesigntimeLicenseContext.cs
- FunctionParameter.cs
- ClientApiGenerator.cs
- CodeMemberField.cs
- RemoteWebConfigurationHostStream.cs
- WebPageTraceListener.cs
- OutputCacheSettingsSection.cs
- WebCategoryAttribute.cs
- AssemblyName.cs
- DefaultTraceListener.cs
- WebPartAddingEventArgs.cs
- PersonalizationStateInfo.cs
- NamespaceEmitter.cs
- Authorization.cs
- CaseInsensitiveHashCodeProvider.cs
- LayoutEditorPart.cs
- FileEnumerator.cs
- MSAAWinEventWrap.cs
- LocatorPartList.cs
- DataControlExtensions.cs
- CodeCommentStatement.cs
- FindProgressChangedEventArgs.cs
- QilChoice.cs
- ObjectDataSource.cs
- Mapping.cs
- ReadOnlyPropertyMetadata.cs
- PositiveTimeSpanValidator.cs
- _Win32.cs
- BindableAttribute.cs
- ValueExpressions.cs
- HttpStreamMessage.cs
- BasicViewGenerator.cs
- WSIdentityFaultException.cs
- InstanceDataCollection.cs
- XmlToDatasetMap.cs
- Image.cs
- WebPartEventArgs.cs
- ConfigurationElement.cs
- WindowsToolbar.cs
- EntityModelSchemaGenerator.cs
- BaseTypeViewSchema.cs
- CharConverter.cs