Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CommonUI / System / Drawing / BufferedGraphicsManager.cs / 1 / 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
- cookieexception.cs
- Matrix3D.cs
- AnalyzedTree.cs
- XmlElementAttributes.cs
- XpsInterleavingPolicy.cs
- MultiByteCodec.cs
- TranslateTransform.cs
- XmlnsCompatibleWithAttribute.cs
- StateMachineAction.cs
- WorkflowApplicationEventArgs.cs
- XmlLangPropertyAttribute.cs
- PerformanceCounterCategory.cs
- xml.cs
- PathNode.cs
- ItemsPresenter.cs
- shaperfactoryquerycachekey.cs
- Literal.cs
- TimeSpanMinutesConverter.cs
- WindowInteropHelper.cs
- SimpleBitVector32.cs
- AutomationPatternInfo.cs
- ButtonColumn.cs
- WeakReference.cs
- GroupItemAutomationPeer.cs
- MachineKeyConverter.cs
- UpdateCommand.cs
- SimpleBitVector32.cs
- wgx_exports.cs
- DropSourceBehavior.cs
- ExpressionVisitor.cs
- Base64Stream.cs
- DataGridViewRowStateChangedEventArgs.cs
- ArgumentElement.cs
- EventSourceCreationData.cs
- FileRegion.cs
- NameValueSectionHandler.cs
- AffineTransform3D.cs
- PanelDesigner.cs
- RNGCryptoServiceProvider.cs
- BindingOperations.cs
- coordinatorscratchpad.cs
- SByteStorage.cs
- OleDbDataAdapter.cs
- UserControl.cs
- Token.cs
- EntityTypeBase.cs
- MSAANativeProvider.cs
- ClientTargetSection.cs
- _OSSOCK.cs
- DataTableTypeConverter.cs
- MemberListBinding.cs
- AsyncPostBackTrigger.cs
- MetroSerializationManager.cs
- ShaperBuffers.cs
- CounterCreationData.cs
- WebPartTransformerAttribute.cs
- GrammarBuilderPhrase.cs
- DependencyObjectPropertyDescriptor.cs
- CheckPair.cs
- TypeDescriptionProviderAttribute.cs
- ListContractAdapter.cs
- EnglishPluralizationService.cs
- MobileControlBuilder.cs
- _NativeSSPI.cs
- LockedBorderGlyph.cs
- ProvideValueServiceProvider.cs
- OleDbCommand.cs
- SiteMapDataSource.cs
- ResolvedKeyFrameEntry.cs
- URLAttribute.cs
- EventLogTraceListener.cs
- IPHostEntry.cs
- DbConnectionClosed.cs
- AppearanceEditorPart.cs
- TypeDescriptor.cs
- SymbolTable.cs
- NativeCppClassAttribute.cs
- PropagatorResult.cs
- XmlSignatureProperties.cs
- OptimizedTemplateContent.cs
- FunctionImportMapping.cs
- MsmqTransportBindingElement.cs
- TimerEventSubscription.cs
- DebugViewWriter.cs
- ArrayElementGridEntry.cs
- DataColumn.cs
- WeakRefEnumerator.cs
- ModulesEntry.cs
- SmtpMail.cs
- TextTreeNode.cs
- NoneExcludedImageIndexConverter.cs
- PersonalizationEntry.cs
- FormatConvertedBitmap.cs
- WebConfigurationHost.cs
- SqlUtils.cs
- FontWeights.cs
- MatrixAnimationUsingPath.cs
- ExceptionNotification.cs
- Automation.cs
- SetMemberBinder.cs