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
- CacheEntry.cs
- TemplateBindingExpression.cs
- FileDataSourceCache.cs
- EventWaitHandle.cs
- WebDescriptionAttribute.cs
- XmlStringTable.cs
- FontUnitConverter.cs
- ParsedAttributeCollection.cs
- JsonFormatGeneratorStatics.cs
- TreeViewItemAutomationPeer.cs
- InputBinder.cs
- TreeNodeCollection.cs
- PerformanceCounterCategory.cs
- SharedRuntimeState.cs
- AlternationConverter.cs
- PrintPreviewDialog.cs
- RequiredFieldValidator.cs
- ReadWriteSpinLock.cs
- ArrayTypeMismatchException.cs
- FontDriver.cs
- SignatureHelper.cs
- Page.cs
- EmptyImpersonationContext.cs
- CustomGrammar.cs
- Internal.cs
- ServerValidateEventArgs.cs
- XmlnsCache.cs
- GetCertificateRequest.cs
- XPathDocumentBuilder.cs
- ClassHandlersStore.cs
- DesignerDeviceConfig.cs
- ConfigurationValidatorAttribute.cs
- StructuralCache.cs
- UrlAuthFailedErrorFormatter.cs
- Object.cs
- AlphabeticalEnumConverter.cs
- EllipticalNodeOperations.cs
- InvalidComObjectException.cs
- MessageQueuePermissionAttribute.cs
- SqlTypeSystemProvider.cs
- BrushMappingModeValidation.cs
- ScriptReference.cs
- DbConnectionPoolGroupProviderInfo.cs
- DataGridView.cs
- SocketElement.cs
- Wizard.cs
- CmsUtils.cs
- RequestBringIntoViewEventArgs.cs
- VirtualDirectoryMappingCollection.cs
- Polygon.cs
- Privilege.cs
- FragmentQuery.cs
- HyperLinkStyle.cs
- StyleSelector.cs
- NameValueSectionHandler.cs
- FrameSecurityDescriptor.cs
- RijndaelManaged.cs
- SystemTcpStatistics.cs
- COM2EnumConverter.cs
- LinqDataSourceEditData.cs
- ConfigXmlElement.cs
- BufferedWebEventProvider.cs
- HandledMouseEvent.cs
- NotImplementedException.cs
- ExpressionDumper.cs
- Comparer.cs
- OutputScope.cs
- WindowsFont.cs
- TranslateTransform.cs
- ConfigurationManagerHelper.cs
- PassportPrincipal.cs
- HostProtectionException.cs
- RuntimeConfig.cs
- StringCollection.cs
- BrowserCapabilitiesCodeGenerator.cs
- IPHostEntry.cs
- securitymgrsite.cs
- XmlSerializerAssemblyAttribute.cs
- WCFBuildProvider.cs
- SQLInt64Storage.cs
- TypePropertyEditor.cs
- FileEnumerator.cs
- DialogResultConverter.cs
- InvalidCastException.cs
- ToolStripDropDownMenu.cs
- DesignerHost.cs
- ResourceAttributes.cs
- IgnoreFileBuildProvider.cs
- WSDualHttpBindingCollectionElement.cs
- FileLevelControlBuilderAttribute.cs
- PopupRootAutomationPeer.cs
- DataSourceSerializationException.cs
- OrderedParallelQuery.cs
- Point3DCollectionConverter.cs
- StateMachine.cs
- CheckBoxField.cs
- SiteMapDataSource.cs
- CorrelationScope.cs
- KeyFrames.cs
- InvalidWMPVersionException.cs