Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / UIAutomation / UIAutomationClient / MS / Internal / Automation / WinEventQueueItem.cs / 1 / WinEventQueueItem.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Class to create a queue on its own thread. // // History: // 06/17/2003 : BrendanM Ported to WCP // //--------------------------------------------------------------------------- using System.Windows.Automation; using System.Windows.Automation.Provider; using System; using System.Threading; using System.Collections; using MS.Internal.Automation; using MS.Win32; namespace MS.Internal.Automation { // Worker class used to handle WinEvents internal class WinEventQueueItem : QueueItem { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal WinEventQueueItem(WinEventWrap winEventWrap, int state) { _winEventWrap = winEventWrap; _state = state; } #endregion Constructors //------------------------------------------------------ // // Public Constants / Readonly Fields // //----------------------------------------------------- #region Public Constants and Readonly Fields internal const int StartListening = 1; internal const int StopListening = 2; #endregion Public Constants and Readonly Fields //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal override void Process() { if (_state == StartListening) { _winEventWrap.StartListening(); } else { _winEventWrap.StopListening(); } } #endregion Internal Methods //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private WinEventWrap _winEventWrap; private int _state; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Class to create a queue on its own thread. // // History: // 06/17/2003 : BrendanM Ported to WCP // //--------------------------------------------------------------------------- using System.Windows.Automation; using System.Windows.Automation.Provider; using System; using System.Threading; using System.Collections; using MS.Internal.Automation; using MS.Win32; namespace MS.Internal.Automation { // Worker class used to handle WinEvents internal class WinEventQueueItem : QueueItem { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors internal WinEventQueueItem(WinEventWrap winEventWrap, int state) { _winEventWrap = winEventWrap; _state = state; } #endregion Constructors //------------------------------------------------------ // // Public Constants / Readonly Fields // //----------------------------------------------------- #region Public Constants and Readonly Fields internal const int StartListening = 1; internal const int StopListening = 2; #endregion Public Constants and Readonly Fields //------------------------------------------------------ // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal override void Process() { if (_state == StartListening) { _winEventWrap.StartListening(); } else { _winEventWrap.StopListening(); } } #endregion Internal Methods //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private WinEventWrap _winEventWrap; private int _state; #endregion Private Fields } } // 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
- CategoryAttribute.cs
- TextPointerBase.cs
- SignedXml.cs
- SegmentInfo.cs
- DataGrid.cs
- Logging.cs
- DocumentCollection.cs
- TextDataBindingHandler.cs
- CryptoConfig.cs
- DictionaryEntry.cs
- SignedXml.cs
- Visual.cs
- UpdateCompiler.cs
- DocumentViewerBaseAutomationPeer.cs
- OracleTimeSpan.cs
- RotationValidation.cs
- ImageBrush.cs
- Vector3DCollectionConverter.cs
- CodeBinaryOperatorExpression.cs
- BoundField.cs
- XmlSchemaSequence.cs
- GAC.cs
- TextTreeInsertUndoUnit.cs
- StackOverflowException.cs
- IIS7UserPrincipal.cs
- AuthenticationException.cs
- XamlWriter.cs
- XmlSchemaException.cs
- VisualCollection.cs
- DataDocumentXPathNavigator.cs
- LocalizableResourceBuilder.cs
- HttpDebugHandler.cs
- ConstructorNeedsTagAttribute.cs
- CqlQuery.cs
- MetadataWorkspace.cs
- SqlUtils.cs
- DispatchWrapper.cs
- Encoding.cs
- EncoderParameters.cs
- processwaithandle.cs
- NavigationFailedEventArgs.cs
- FileRecordSequenceCompletedAsyncResult.cs
- TextEffect.cs
- TracedNativeMethods.cs
- AssociationType.cs
- BitmapCodecInfo.cs
- SurrogateEncoder.cs
- EpmContentSerializer.cs
- ToolboxItemCollection.cs
- CommandDevice.cs
- TaskFormBase.cs
- SpecialFolderEnumConverter.cs
- NamespaceMapping.cs
- SymbolMethod.cs
- CompiledRegexRunner.cs
- FactoryGenerator.cs
- PolyQuadraticBezierSegment.cs
- GenericFlowSwitchHelper.cs
- InputLanguageSource.cs
- DecimalAnimationUsingKeyFrames.cs
- NetworkCredential.cs
- DispatcherExceptionEventArgs.cs
- WebPartTransformerCollection.cs
- TemplatedMailWebEventProvider.cs
- CryptoStream.cs
- ButtonBaseAutomationPeer.cs
- XmlAtomicValue.cs
- DynamicQueryableWrapper.cs
- figurelength.cs
- TraceHandler.cs
- PageParser.cs
- TrackingValidationObjectDictionary.cs
- DiffuseMaterial.cs
- SmiConnection.cs
- TaskExceptionHolder.cs
- ByteFacetDescriptionElement.cs
- METAHEADER.cs
- TimerEventSubscriptionCollection.cs
- LinkLabelLinkClickedEvent.cs
- EllipseGeometry.cs
- FormattedTextSymbols.cs
- TypeDescriptionProvider.cs
- SqlDataSourceCommandParser.cs
- SHA256.cs
- DynamicObjectAccessor.cs
- SqlWorkflowPersistenceService.cs
- LogFlushAsyncResult.cs
- FactoryMaker.cs
- PerspectiveCamera.cs
- LinearGradientBrush.cs
- ValueUtilsSmi.cs
- SignatureGenerator.cs
- ColumnWidthChangingEvent.cs
- InfoCardSymmetricAlgorithm.cs
- ProofTokenCryptoHandle.cs
- WSFederationHttpSecurity.cs
- ObjectListCommand.cs
- CurrentTimeZone.cs
- OleDbReferenceCollection.cs
- DataServiceContext.cs