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
- TextTrailingWordEllipsis.cs
- ListenerSessionConnection.cs
- ThreadStartException.cs
- GraphicsPath.cs
- EventLogPermissionEntry.cs
- OdbcConnectionStringbuilder.cs
- PtsContext.cs
- OleAutBinder.cs
- ErrorStyle.cs
- WmfPlaceableFileHeader.cs
- HtmlInputButton.cs
- TypeBrowserDialog.cs
- WebPartEditVerb.cs
- DataListItemEventArgs.cs
- PropertyDescriptor.cs
- SchemaHelper.cs
- ServiceModelEnumValidator.cs
- Guid.cs
- HttpRequestCacheValidator.cs
- Brush.cs
- ValidateNames.cs
- TableCellAutomationPeer.cs
- HopperCache.cs
- WorkflowElementDialog.cs
- SqlLiftWhereClauses.cs
- OptimizedTemplateContent.cs
- VoiceInfo.cs
- metadatamappinghashervisitor.cs
- QilFunction.cs
- Site.cs
- XmlReaderSettings.cs
- X509ThumbprintKeyIdentifierClause.cs
- ProfileGroupSettingsCollection.cs
- ConstraintStruct.cs
- DesignerDataSchemaClass.cs
- ExpressionEditorSheet.cs
- OdbcStatementHandle.cs
- ReferencedType.cs
- DataIdProcessor.cs
- XmlAttribute.cs
- SystemEvents.cs
- DbParameterCollection.cs
- Events.cs
- DetailsViewPageEventArgs.cs
- AppSecurityManager.cs
- TreeNodeCollection.cs
- ExceptionUtil.cs
- MetadataProperty.cs
- WebBrowsableAttribute.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- FormViewRow.cs
- EdmProviderManifest.cs
- HostDesigntimeLicenseContext.cs
- ObjectContextServiceProvider.cs
- HtmlInputPassword.cs
- HTMLTextWriter.cs
- BulletedListEventArgs.cs
- BitmapEffectGroup.cs
- ProviderIncompatibleException.cs
- GenericXmlSecurityToken.cs
- ExpressionVisitor.cs
- BaseCodeDomTreeGenerator.cs
- ResourceDefaultValueAttribute.cs
- ComplexBindingPropertiesAttribute.cs
- ErrorWrapper.cs
- SqlCacheDependencyDatabase.cs
- PublisherIdentityPermission.cs
- SqlConnection.cs
- SqlClientWrapperSmiStreamChars.cs
- GeneralTransformGroup.cs
- IProvider.cs
- ObjectResult.cs
- BitmapFrameEncode.cs
- UrlAuthorizationModule.cs
- Types.cs
- PathData.cs
- FieldBuilder.cs
- WindowsListViewItemCheckBox.cs
- DataGridViewLayoutData.cs
- WebPageTraceListener.cs
- TabControlCancelEvent.cs
- SynchronizationLockException.cs
- DataObjectCopyingEventArgs.cs
- M3DUtil.cs
- OutputScopeManager.cs
- ToolStripGripRenderEventArgs.cs
- Attributes.cs
- SendingRequestEventArgs.cs
- PropertyEmitterBase.cs
- DataGridViewColumnCollectionDialog.cs
- ToolStripContentPanelDesigner.cs
- BitmapCodecInfo.cs
- ObjectSet.cs
- XmlNamespaceManager.cs
- SystemTcpConnection.cs
- InkCanvasSelectionAdorner.cs
- TimeSpanMinutesConverter.cs
- PersonalizableAttribute.cs
- PartialArray.cs
- HandlerBase.cs