Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / UIAutomationClient / MS / Internal / Automation / WinEventQueueItem.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StyleXamlParser.cs
- TextDpi.cs
- _ProxyChain.cs
- CaseDesigner.xaml.cs
- RepeaterDataBoundAdapter.cs
- HttpCookieCollection.cs
- AsyncOperation.cs
- XmlNodeChangedEventManager.cs
- ListBoxChrome.cs
- HitTestResult.cs
- GestureRecognizer.cs
- ChtmlLinkAdapter.cs
- BooleanToVisibilityConverter.cs
- Image.cs
- WebSysDefaultValueAttribute.cs
- StrongNamePublicKeyBlob.cs
- InputBinding.cs
- QualifiedCellIdBoolean.cs
- GenericWebPart.cs
- ProfilePropertySettingsCollection.cs
- ChannelRequirements.cs
- ColumnPropertiesGroup.cs
- securestring.cs
- SqlCacheDependencyDatabase.cs
- HostingEnvironment.cs
- CompositeCollectionView.cs
- Funcletizer.cs
- EditorAttribute.cs
- FrameworkContentElement.cs
- ViewPort3D.cs
- EntityDataSourceChangingEventArgs.cs
- IpcClientManager.cs
- RectValueSerializer.cs
- Cloud.cs
- OleDbRowUpdatingEvent.cs
- CodeLinePragma.cs
- AmbientValueAttribute.cs
- OutOfMemoryException.cs
- SignatureDescription.cs
- DefaultEventAttribute.cs
- ScriptComponentDescriptor.cs
- DefaultWorkflowTransactionService.cs
- BuildProviderAppliesToAttribute.cs
- BindingList.cs
- SessionPageStateSection.cs
- IISMapPath.cs
- Rotation3DAnimation.cs
- SQLMoneyStorage.cs
- AxParameterData.cs
- GridViewSortEventArgs.cs
- TransportSecurityBindingElement.cs
- BindableTemplateBuilder.cs
- Line.cs
- cookie.cs
- ModulesEntry.cs
- WebPartEditorOkVerb.cs
- DataServiceBuildProvider.cs
- MDIWindowDialog.cs
- Pkcs7Signer.cs
- XmlNodeWriter.cs
- EntityTypeEmitter.cs
- TextEditorSelection.cs
- Point3DCollection.cs
- DataSourceControlBuilder.cs
- KeyValueSerializer.cs
- TextBox.cs
- BinaryObjectReader.cs
- ListViewItem.cs
- querybuilder.cs
- GridEntryCollection.cs
- AlternateViewCollection.cs
- EditableTreeList.cs
- ListenerPerfCounters.cs
- EUCJPEncoding.cs
- PreDigestedSignedInfo.cs
- OracleColumn.cs
- WindowsToolbar.cs
- TextShapeableCharacters.cs
- PanelDesigner.cs
- OutputScope.cs
- XPathChildIterator.cs
- ElementHostAutomationPeer.cs
- WebPartCatalogAddVerb.cs
- MostlySingletonList.cs
- TimeManager.cs
- Binding.cs
- MD5CryptoServiceProvider.cs
- Literal.cs
- MetabaseServerConfig.cs
- XmlSchemaAny.cs
- ServerType.cs
- COM2IDispatchConverter.cs
- Int32Animation.cs
- HostElement.cs
- SupportsEventValidationAttribute.cs
- SafeFindHandle.cs
- ETagAttribute.cs
- StringAnimationUsingKeyFrames.cs
- OneOfScalarConst.cs
- CachedFontFace.cs