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
- DictionaryCustomTypeDescriptor.cs
- InstalledFontCollection.cs
- LayoutEvent.cs
- MonthCalendar.cs
- FacetEnabledSchemaElement.cs
- UserControl.cs
- FunctionParameter.cs
- ListViewAutomationPeer.cs
- Padding.cs
- BasicKeyConstraint.cs
- RolePrincipal.cs
- CatalogPartDesigner.cs
- DependencyPropertyConverter.cs
- ObservableCollectionDefaultValueFactory.cs
- ControlDesignerState.cs
- Trustee.cs
- MonitoringDescriptionAttribute.cs
- AuthenticatedStream.cs
- DataGridViewUtilities.cs
- SqlBooleanizer.cs
- Walker.cs
- QualificationDataAttribute.cs
- SafeNativeMethods.cs
- PriorityQueue.cs
- CatalogZoneBase.cs
- FixedSOMPage.cs
- WebMethodAttribute.cs
- RecordsAffectedEventArgs.cs
- FunctionDescription.cs
- Soap12ProtocolImporter.cs
- HitTestParameters.cs
- SoapAttributeOverrides.cs
- RoleGroupCollection.cs
- DataServices.cs
- TemplateBindingExtension.cs
- CodeMemberEvent.cs
- DataServiceQueryOfT.cs
- GenericsInstances.cs
- LongTypeConverter.cs
- ReceiveParametersContent.cs
- TypedAsyncResult.cs
- DataGridViewDataConnection.cs
- MenuItem.cs
- TextParagraphCache.cs
- OletxEnlistment.cs
- AttributeXamlType.cs
- SymmetricAlgorithm.cs
- _FixedSizeReader.cs
- AttachmentService.cs
- Point3DConverter.cs
- DurableDispatcherAddressingFault.cs
- WebScriptClientGenerator.cs
- StreamInfo.cs
- CodeMemberProperty.cs
- ApplicationTrust.cs
- SortedSetDebugView.cs
- WorkerRequest.cs
- WebPartTransformer.cs
- TableItemPatternIdentifiers.cs
- NullableDecimalSumAggregationOperator.cs
- XPathCompileException.cs
- XmlILIndex.cs
- Int64KeyFrameCollection.cs
- GroupQuery.cs
- HttpProfileBase.cs
- ErrorCodes.cs
- CodeStatementCollection.cs
- PerspectiveCamera.cs
- WebRequest.cs
- NonParentingControl.cs
- IxmlLineInfo.cs
- EventManager.cs
- ExternalCalls.cs
- InstanceView.cs
- CacheChildrenQuery.cs
- QueryLifecycle.cs
- BackStopAuthenticationModule.cs
- EnumConverter.cs
- Decimal.cs
- ParallelTimeline.cs
- XmlSchemaSimpleContent.cs
- StorageConditionPropertyMapping.cs
- Encoding.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- LightweightCodeGenerator.cs
- LineSegment.cs
- CodeIdentifier.cs
- NativeMethods.cs
- ReferenceSchema.cs
- ListViewGroupConverter.cs
- ProcessThread.cs
- FormatterConverter.cs
- XmlCDATASection.cs
- WorkflowServiceOperationListItem.cs
- XmlDigitalSignatureProcessor.cs
- ZipIORawDataFileBlock.cs
- SudsCommon.cs
- RootBrowserWindow.cs
- Equal.cs
- SqlXml.cs