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
- StatusCommandUI.cs
- RuleSettingsCollection.cs
- Int32CAMarshaler.cs
- X509ChainPolicy.cs
- AnonymousIdentificationSection.cs
- ArgumentNullException.cs
- WebServicesDescriptionAttribute.cs
- DataPager.cs
- ThicknessKeyFrameCollection.cs
- BlurBitmapEffect.cs
- SmiEventStream.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- RoutedEventValueSerializer.cs
- OutputCacheModule.cs
- XmlJsonWriter.cs
- RemoteWebConfigurationHostStream.cs
- RijndaelManagedTransform.cs
- FormViewUpdateEventArgs.cs
- WindowsProgressbar.cs
- KeyboardEventArgs.cs
- HeaderedItemsControl.cs
- RightNameExpirationInfoPair.cs
- EdmItemCollection.cs
- TaiwanLunisolarCalendar.cs
- CompilationSection.cs
- SafeNativeMethods.cs
- SwitchDesigner.xaml.cs
- DataSpaceManager.cs
- CommandDevice.cs
- SslStream.cs
- DataGridTextBox.cs
- FontNamesConverter.cs
- HttpModuleAction.cs
- SafeRightsManagementSessionHandle.cs
- PrimarySelectionGlyph.cs
- DataShape.cs
- Camera.cs
- Point3DCollection.cs
- XmlFormatMapping.cs
- TableChangeProcessor.cs
- OleStrCAMarshaler.cs
- DynamicField.cs
- ShutDownListener.cs
- LineProperties.cs
- MetafileHeaderEmf.cs
- ResolveMatchesMessage11.cs
- TableCell.cs
- ProfessionalColorTable.cs
- StrongNameMembershipCondition.cs
- EndpointAddressMessageFilter.cs
- SafeEventLogWriteHandle.cs
- ErrorsHelper.cs
- DefaultAutoFieldGenerator.cs
- BindValidationContext.cs
- SupportsEventValidationAttribute.cs
- ScriptRef.cs
- ImageCodecInfoPrivate.cs
- HttpProfileGroupBase.cs
- WindowsEditBox.cs
- QueryOptionExpression.cs
- BooleanAnimationUsingKeyFrames.cs
- XsltInput.cs
- PropertyPathWorker.cs
- FormViewModeEventArgs.cs
- RuntimeWrappedException.cs
- EmbeddedMailObjectsCollection.cs
- RSAPKCS1KeyExchangeFormatter.cs
- PassportAuthenticationModule.cs
- CommandPlan.cs
- AnnotationResourceChangedEventArgs.cs
- ColumnHeaderConverter.cs
- SQLChars.cs
- ConfigurationLockCollection.cs
- CompressedStack.cs
- EventDriven.cs
- LoadedEvent.cs
- SimpleWebHandlerParser.cs
- HtmlEncodedRawTextWriter.cs
- DependencyPropertyConverter.cs
- BitmapData.cs
- MoveSizeWinEventHandler.cs
- PrivilegeNotHeldException.cs
- Method.cs
- CompilerCollection.cs
- ReadOnlyHierarchicalDataSource.cs
- WebServiceData.cs
- TransportDefaults.cs
- DesignerActionService.cs
- TypeHelpers.cs
- XmlSchemaObject.cs
- ReadOnlyHierarchicalDataSourceView.cs
- PropertyMapper.cs
- PatternMatcher.cs
- EntityDataSourceConfigureObjectContextPanel.cs
- ViewStateModeByIdAttribute.cs
- StrokeNodeEnumerator.cs
- HelpEvent.cs
- SecondaryIndexDefinition.cs
- precedingsibling.cs
- ReferencedAssembly.cs