Code:
/ DotNET / DotNET / 8.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
- LingerOption.cs
- ListSortDescriptionCollection.cs
- SqlConnectionStringBuilder.cs
- LostFocusEventManager.cs
- DataGridViewCellParsingEventArgs.cs
- MailFileEditor.cs
- SystemException.cs
- SoapInteropTypes.cs
- ManagementEventWatcher.cs
- Utils.cs
- ListQueryResults.cs
- UIElementIsland.cs
- BaseResourcesBuildProvider.cs
- PtsHelper.cs
- CompositeFontFamily.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- HttpPostedFile.cs
- QueryReaderSettings.cs
- AssociationEndMember.cs
- UidPropertyAttribute.cs
- WindowsFormsHelpers.cs
- OdbcUtils.cs
- BaseComponentEditor.cs
- SqlRowUpdatedEvent.cs
- UnionCodeGroup.cs
- XXXOnTypeBuilderInstantiation.cs
- NamedElement.cs
- BitmapEncoder.cs
- DataReaderContainer.cs
- TransactionalPackage.cs
- PriorityRange.cs
- InvokeProviderWrapper.cs
- ResourcePart.cs
- CheckBoxPopupAdapter.cs
- SparseMemoryStream.cs
- HttpListenerElement.cs
- CodeAssignStatement.cs
- DNS.cs
- ScrollBarAutomationPeer.cs
- TemplatePropertyEntry.cs
- ServiceContractListItemList.cs
- XamlContextStack.cs
- XamlToRtfParser.cs
- TextBoxAutoCompleteSourceConverter.cs
- GridView.cs
- X500Name.cs
- RoutedEventValueSerializer.cs
- FormsIdentity.cs
- SamlSecurityTokenAuthenticator.cs
- ProtocolsConfiguration.cs
- WebPartVerb.cs
- ClickablePoint.cs
- KerberosRequestorSecurityToken.cs
- ComplexTypeEmitter.cs
- Not.cs
- MonikerHelper.cs
- RewritingSimplifier.cs
- FixedSchema.cs
- DataGridViewAccessibleObject.cs
- StickyNoteAnnotations.cs
- MailAddress.cs
- BinaryNode.cs
- NativeRightsManagementAPIsStructures.cs
- SrgsNameValueTag.cs
- OleDbParameterCollection.cs
- LineVisual.cs
- ClientFormsIdentity.cs
- XmlSchemaIdentityConstraint.cs
- MessageFilterException.cs
- ObjectRef.cs
- InputBinder.cs
- ScrollViewerAutomationPeer.cs
- SerializableAttribute.cs
- Attributes.cs
- Compiler.cs
- CanonicalizationDriver.cs
- HttpHandlersInstallComponent.cs
- SqlConnectionPoolGroupProviderInfo.cs
- DataGridViewCheckBoxCell.cs
- XmlCharacterData.cs
- FontSource.cs
- Attributes.cs
- TemplateKey.cs
- ConstructorNeedsTagAttribute.cs
- CommandExpr.cs
- ArgumentOutOfRangeException.cs
- ZipIOExtraFieldElement.cs
- TableAdapterManagerMethodGenerator.cs
- Currency.cs
- MachineKeySection.cs
- ActivityCollectionMarkupSerializer.cs
- StorageEntityTypeMapping.cs
- Int32Rect.cs
- InfoCardSymmetricCrypto.cs
- InfoCardCryptoHelper.cs
- CheckBoxRenderer.cs
- WorkflowDesignerColors.cs
- MenuItemStyleCollection.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- FieldToken.cs