Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ResourceExpressionBuilder.cs
- SqlDataSourceCommandEventArgs.cs
- DynamicDocumentPaginator.cs
- ValidatorCompatibilityHelper.cs
- StrongNameUtility.cs
- AtomMaterializer.cs
- RadioButton.cs
- CatalogPartChrome.cs
- RIPEMD160.cs
- HttpListenerPrefixCollection.cs
- ProfilePropertyMetadata.cs
- DbException.cs
- SystemFonts.cs
- KeyValuePairs.cs
- ThicknessAnimationBase.cs
- ToolStripItemCollection.cs
- ColumnHeader.cs
- TypeResolver.cs
- MatrixKeyFrameCollection.cs
- PassportIdentity.cs
- PeerNameRecordCollection.cs
- ErrorWrapper.cs
- ContainerParaClient.cs
- LineSegment.cs
- ReturnEventArgs.cs
- MemberPath.cs
- HttpHeaderCollection.cs
- SoundPlayer.cs
- InfoCardRequestException.cs
- ModelItemDictionaryImpl.cs
- GridViewRowEventArgs.cs
- TypeTypeConverter.cs
- XpsFixedPageReaderWriter.cs
- EditorBrowsableAttribute.cs
- EditorResources.cs
- GraphicsContext.cs
- ThemeDictionaryExtension.cs
- PeerNameRegistration.cs
- CapabilitiesAssignment.cs
- DependencyPropertyValueSerializer.cs
- DataServiceQueryException.cs
- PeerUnsafeNativeMethods.cs
- FontClient.cs
- LabelDesigner.cs
- ComponentManagerBroker.cs
- ButtonBase.cs
- FieldAccessException.cs
- CriticalFinalizerObject.cs
- FolderBrowserDialog.cs
- StateMachineDesignerPaint.cs
- SystemResourceKey.cs
- WindowsClientElement.cs
- XmlDownloadManager.cs
- ConnectionPoolManager.cs
- Timer.cs
- DuplicateWaitObjectException.cs
- DataServiceQuery.cs
- UrlParameterReader.cs
- ListCollectionView.cs
- KeyValuePair.cs
- StrokeNodeEnumerator.cs
- StorageEndPropertyMapping.cs
- EventEntry.cs
- CrossSiteScriptingValidation.cs
- SecUtil.cs
- COAUTHINFO.cs
- PolyQuadraticBezierSegment.cs
- SoapMessage.cs
- Point4DValueSerializer.cs
- ErrorTableItemStyle.cs
- DataGridViewSelectedRowCollection.cs
- UIElement3D.cs
- LinkLabel.cs
- Attributes.cs
- UInt16Storage.cs
- WorkerRequest.cs
- MetafileEditor.cs
- NameValueConfigurationElement.cs
- StackBuilderSink.cs
- VersionPair.cs
- HyperLinkField.cs
- GPStream.cs
- TemplateColumn.cs
- SqlStream.cs
- ObjectListGeneralPage.cs
- NumericExpr.cs
- IdnMapping.cs
- AppSettingsExpressionEditor.cs
- DBBindings.cs
- WebBaseEventKeyComparer.cs
- ContextProperty.cs
- XmlSerializationWriter.cs
- ArgIterator.cs
- EntityContainerEntitySet.cs
- ResXResourceReader.cs
- DataRowIndexBuffer.cs
- HttpResponse.cs
- TdsValueSetter.cs
- IndexedEnumerable.cs
- MobileComponentEditorPage.cs