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
- XmlConvert.cs
- WorkflowControlEndpoint.cs
- ResourceReader.cs
- HttpEncoderUtility.cs
- BStrWrapper.cs
- _Win32.cs
- TagMapCollection.cs
- UIElement3DAutomationPeer.cs
- DocumentViewerConstants.cs
- SettingsProviderCollection.cs
- AsyncDataRequest.cs
- KeyedHashAlgorithm.cs
- InstanceDataCollection.cs
- EventListener.cs
- File.cs
- DataServiceClientException.cs
- PageParserFilter.cs
- ToolStripProgressBar.cs
- FlowDocumentReaderAutomationPeer.cs
- RightsManagementErrorHandler.cs
- Formatter.cs
- ClientCredentialsElement.cs
- Permission.cs
- NativeCompoundFileAPIs.cs
- DESCryptoServiceProvider.cs
- DbProviderFactories.cs
- SignedXml.cs
- StringCollectionEditor.cs
- PriorityBinding.cs
- ScriptResourceInfo.cs
- ObjectQueryProvider.cs
- FixedSOMFixedBlock.cs
- GeometryCollection.cs
- RightsManagementInformation.cs
- TextTreeTextNode.cs
- BindingExpressionBase.cs
- SslStreamSecurityUpgradeProvider.cs
- ElementHostAutomationPeer.cs
- WebPartMovingEventArgs.cs
- MergablePropertyAttribute.cs
- COM2EnumConverter.cs
- SectionRecord.cs
- XmlSchemaCompilationSettings.cs
- CqlIdentifiers.cs
- KeyboardDevice.cs
- indexingfiltermarshaler.cs
- TargetConverter.cs
- DesignTimeVisibleAttribute.cs
- FileVersion.cs
- ItemContainerGenerator.cs
- UInt32Converter.cs
- UmAlQuraCalendar.cs
- MimePart.cs
- Point.cs
- XmlSerializationWriter.cs
- ProviderConnectionPointCollection.cs
- XmlDataDocument.cs
- XmlBaseWriter.cs
- SqlGenerator.cs
- FontStretches.cs
- ExternalDataExchangeService.cs
- __TransparentProxy.cs
- PerformanceCounterPermissionAttribute.cs
- MatchNoneMessageFilter.cs
- Roles.cs
- WebConfigManager.cs
- XmlSerializerNamespaces.cs
- CheckBoxField.cs
- Thumb.cs
- dsa.cs
- DataViewListener.cs
- RegisteredExpandoAttribute.cs
- HwndTarget.cs
- DateRangeEvent.cs
- CommandID.cs
- IdentitySection.cs
- TypeDescriptionProvider.cs
- DrawingVisual.cs
- DynamicRenderer.cs
- InvalidFilterCriteriaException.cs
- LinearKeyFrames.cs
- RegexCompiler.cs
- AttachedPropertyBrowsableAttribute.cs
- XmlCharType.cs
- GregorianCalendar.cs
- PhysicalAddress.cs
- GuidConverter.cs
- DataServiceRequestException.cs
- ImageSource.cs
- TimelineGroup.cs
- ClockGroup.cs
- GroupBoxRenderer.cs
- CompoundFileStreamReference.cs
- DoubleKeyFrameCollection.cs
- InternalCache.cs
- CanExpandCollapseAllConverter.cs
- TemplateControlParser.cs
- PagedControl.cs
- URLString.cs
- SoapFault.cs