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
- SqlException.cs
- UIntPtr.cs
- ListMarkerLine.cs
- DbMetaDataColumnNames.cs
- WebPartCancelEventArgs.cs
- PropertyChangedEventManager.cs
- ComboBox.cs
- DataGrid.cs
- DependencyObject.cs
- ExtensionWindow.cs
- StringUtil.cs
- MsdtcWrapper.cs
- Semaphore.cs
- SelectionListComponentEditor.cs
- DeobfuscatingStream.cs
- OrderPreservingPipeliningSpoolingTask.cs
- EventData.cs
- TraceContext.cs
- AsyncContentLoadedEventArgs.cs
- CacheMemory.cs
- ProfileServiceManager.cs
- SoapIncludeAttribute.cs
- InputMethodStateTypeInfo.cs
- Constraint.cs
- SafeHandles.cs
- _ContextAwareResult.cs
- IISUnsafeMethods.cs
- GuidTagList.cs
- ExcCanonicalXml.cs
- OracleString.cs
- HostExecutionContextManager.cs
- ConditionalAttribute.cs
- DataContractSerializerFaultFormatter.cs
- Size.cs
- HttpModulesSection.cs
- AutoResetEvent.cs
- BitmapEffect.cs
- BindingFormattingDialog.cs
- RelatedView.cs
- GiveFeedbackEventArgs.cs
- WithStatement.cs
- PreviewPageInfo.cs
- Parameter.cs
- NavigateUrlConverter.cs
- MobileContainerDesigner.cs
- HelpKeywordAttribute.cs
- ChangeDirector.cs
- DrawingImage.cs
- DataGridViewColumn.cs
- RegistryPermission.cs
- HeaderedItemsControl.cs
- BinaryObjectInfo.cs
- CodeObjectCreateExpression.cs
- ImageBrush.cs
- FacetEnabledSchemaElement.cs
- CheckPair.cs
- EdgeProfileValidation.cs
- AssemblyCache.cs
- RawStylusInputReport.cs
- HTTPNotFoundHandler.cs
- FixedPosition.cs
- EntityConnection.cs
- BaseDataList.cs
- GenerateScriptTypeAttribute.cs
- WebPartTransformer.cs
- PinnedBufferMemoryStream.cs
- EndpointFilterProvider.cs
- DataViewListener.cs
- EndPoint.cs
- DataGridViewComboBoxEditingControl.cs
- IPEndPoint.cs
- LogLogRecordHeader.cs
- NativeMethods.cs
- WizardPanelChangingEventArgs.cs
- CryptoKeySecurity.cs
- IImplicitResourceProvider.cs
- ObjectTag.cs
- ListBox.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- Point3DCollection.cs
- SqlFunctions.cs
- ResXResourceReader.cs
- KnownIds.cs
- _LocalDataStoreMgr.cs
- FakeModelItemImpl.cs
- ObjectStateEntry.cs
- newinstructionaction.cs
- ItemContainerGenerator.cs
- OuterGlowBitmapEffect.cs
- ContentTypeSettingClientMessageFormatter.cs
- SelectedCellsCollection.cs
- GeneratedContractType.cs
- ClientData.cs
- SafeLibraryHandle.cs
- SQLDecimalStorage.cs
- QuaternionValueSerializer.cs
- ProviderSettingsCollection.cs
- TextSpan.cs
- GraphicsContext.cs
- PagesChangedEventArgs.cs