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
- DoubleLink.cs
- DocumentApplicationDocumentViewer.cs
- _WebProxyDataBuilder.cs
- SimplePropertyEntry.cs
- xsdvalidator.cs
- CardSpaceSelector.cs
- MarkupProperty.cs
- CompleteWizardStep.cs
- CharEnumerator.cs
- PropertiesTab.cs
- DocumentXmlWriter.cs
- WindowsNonControl.cs
- WorkflowElementDialogWindow.xaml.cs
- MetadataException.cs
- XmlBinaryReaderSession.cs
- Grammar.cs
- GcHandle.cs
- NativeRecognizer.cs
- InputQueueChannel.cs
- LoginCancelEventArgs.cs
- CodeDelegateCreateExpression.cs
- SystemTcpConnection.cs
- DefaultTextStore.cs
- ProviderUtil.cs
- DescendentsWalkerBase.cs
- DataGridViewCellValueEventArgs.cs
- ToolboxBitmapAttribute.cs
- Container.cs
- MyContact.cs
- LeftCellWrapper.cs
- NameValueConfigurationElement.cs
- AdapterUtil.cs
- DataGridCellAutomationPeer.cs
- ContentDisposition.cs
- WindowsMenu.cs
- LinqDataSourceDisposeEventArgs.cs
- OlePropertyStructs.cs
- Expression.cs
- SqlCacheDependency.cs
- RSAOAEPKeyExchangeDeformatter.cs
- NumberSubstitution.cs
- SQLSingle.cs
- DataTableNewRowEvent.cs
- DelegatingStream.cs
- BaseTemplateBuildProvider.cs
- AsmxEndpointPickerExtension.cs
- DynamicVirtualDiscoSearcher.cs
- RemoteWebConfigurationHost.cs
- StyleSelector.cs
- StackOverflowException.cs
- ClassHandlersStore.cs
- WindowsImpersonationContext.cs
- GeometryModel3D.cs
- MatchAllMessageFilter.cs
- URLIdentityPermission.cs
- Expression.cs
- Splitter.cs
- Trace.cs
- EncoderFallback.cs
- Oid.cs
- XmlSchemaSimpleContent.cs
- TextElement.cs
- AnonymousIdentificationModule.cs
- AddInProcess.cs
- ResizeGrip.cs
- PageContentAsyncResult.cs
- Ticks.cs
- SQLMembershipProvider.cs
- StreamInfo.cs
- ImmComposition.cs
- MenuCommandsChangedEventArgs.cs
- ProcessModelSection.cs
- XsltOutput.cs
- TypeConverterAttribute.cs
- Stroke.cs
- IsolatedStorageFileStream.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- SubqueryRules.cs
- ByteKeyFrameCollection.cs
- StringCollectionMarkupSerializer.cs
- BufferedReadStream.cs
- BehaviorDragDropEventArgs.cs
- DesignTable.cs
- DataRecord.cs
- XPathNodeIterator.cs
- PartitionResolver.cs
- InstanceOwnerQueryResult.cs
- WebBrowserPermission.cs
- AttachedPropertyBrowsableAttribute.cs
- InstanceLockQueryResult.cs
- MenuItemAutomationPeer.cs
- DecoderNLS.cs
- StaticSiteMapProvider.cs
- HttpTransportSecurityElement.cs
- SmtpMail.cs
- HtmlInputControl.cs
- UnsafeNativeMethodsCLR.cs
- ProviderConnectionPoint.cs
- MultipleViewProviderWrapper.cs
- SafePipeHandle.cs