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
- GuidConverter.cs
- XmlSchemaAll.cs
- CssStyleCollection.cs
- ResourceDescriptionAttribute.cs
- XmlCharCheckingWriter.cs
- WebEvents.cs
- CallId.cs
- ChannelServices.cs
- Pkcs7Signer.cs
- WSSecurityJan2004.cs
- EntityDataSourceContainerNameConverter.cs
- dataprotectionpermission.cs
- MsmqMessageSerializationFormat.cs
- ConfigXmlElement.cs
- TextDecorationLocationValidation.cs
- IncrementalCompileAnalyzer.cs
- Point4DValueSerializer.cs
- TimeIntervalCollection.cs
- WebFaultException.cs
- RenderData.cs
- SystemGatewayIPAddressInformation.cs
- CredentialCache.cs
- UriScheme.cs
- PropertyKey.cs
- KeyedQueue.cs
- WebPartMinimizeVerb.cs
- SolidColorBrush.cs
- BinaryKeyIdentifierClause.cs
- EdmPropertyAttribute.cs
- PropertyTabAttribute.cs
- PreservationFileReader.cs
- TemplateXamlParser.cs
- FontConverter.cs
- PrintingPermission.cs
- CompiledELinqQueryState.cs
- DesignerActionKeyboardBehavior.cs
- ValidatorCompatibilityHelper.cs
- HwndKeyboardInputProvider.cs
- AsymmetricKeyExchangeFormatter.cs
- QilReference.cs
- ZoneButton.cs
- HtmlImage.cs
- SerializerProvider.cs
- ActivityMarkupSerializationProvider.cs
- GifBitmapEncoder.cs
- ConfigXmlComment.cs
- PrivilegedConfigurationManager.cs
- HttpCookieCollection.cs
- SqlServer2KCompatibilityCheck.cs
- DataRowCollection.cs
- EntityClientCacheKey.cs
- StackBuilderSink.cs
- TextSelectionHelper.cs
- DaylightTime.cs
- StylusPlugin.cs
- DebugView.cs
- RuntimeWrappedException.cs
- HostingEnvironment.cs
- PEFileEvidenceFactory.cs
- DocumentXPathNavigator.cs
- TraceData.cs
- DefaultExpression.cs
- UDPClient.cs
- SocketException.cs
- ClientType.cs
- StructuralObject.cs
- WebBrowsableAttribute.cs
- HashSetEqualityComparer.cs
- SQLDecimal.cs
- CodeMethodReturnStatement.cs
- SqlResolver.cs
- LogManagementAsyncResult.cs
- DateTimeEditor.cs
- DataGridCell.cs
- TemplateXamlParser.cs
- EntityCommandExecutionException.cs
- ReadOnlyObservableCollection.cs
- TextEndOfSegment.cs
- HwndSubclass.cs
- ListItemCollection.cs
- Viewport3DVisual.cs
- PropertyEmitter.cs
- FontCacheLogic.cs
- AbstractDataSvcMapFileLoader.cs
- ContentElementAutomationPeer.cs
- HashCodeCombiner.cs
- DispatcherTimer.cs
- StorageConditionPropertyMapping.cs
- RadioButtonFlatAdapter.cs
- StreamWithDictionary.cs
- RuntimeHandles.cs
- WebControlAdapter.cs
- CalendarDataBindingHandler.cs
- MaterialGroup.cs
- TypeDependencyAttribute.cs
- LastQueryOperator.cs
- CustomDictionarySources.cs
- LineServicesRun.cs
- XamlSerializationHelper.cs
- LOSFormatter.cs