Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / UIAutomationClient / System / Windows / Automation / SynchronizedInputPattern.cs / 1305600 / SynchronizedInputPattern.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Client-side wrapper for SynchronizedInput Pattern // // History: // 11/07/2008 : Added by [....]. // //--------------------------------------------------------------------------- using System; //using System.Collections; using System.Windows.Automation.Provider; using MS.Internal.Automation; namespace System.Windows.Automation { ////// Represents objects that support synchronized input events /// #if (INTERNAL_COMPILE) internal class SynchronizedInputPattern: BasePattern #else public class SynchronizedInputPattern: BasePattern #endif { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors private SynchronizedInputPattern(AutomationElement el, SafePatternHandle hPattern) : base(el, hPattern) { _hPattern = hPattern; } #endregion Constructors //------------------------------------------------------ // // Public Constants / Readonly Fields // //----------------------------------------------------- #region Public Constants and Readonly Fields ///SynchronizedInputPattern pattern public static readonly AutomationPattern Pattern = SynchronizedInputPatternIdentifiers.Pattern; ////// Event ID: InputReachedTarget - indicates input received by the current listening element. /// sourceElement refers to the current listening element. /// public static readonly AutomationEvent InputReachedTargetEvent = SynchronizedInputPatternIdentifiers.InputReachedTargetEvent; ////// /// Event ID: InputReachedOtherElement - indicates an input is handled by different element than the one currently listening on. /// sourceElement refers to the current listening element. /// public static readonly AutomationEvent InputReachedOtherElementEvent = SynchronizedInputPatternIdentifiers.InputReachedOtherElementEvent; ////// Event ID: InputDiscarded - indicates that input is discarded by the framework. /// sourceElement refers to the current listening element. /// public static readonly AutomationEvent InputDiscardedEvent = SynchronizedInputPatternIdentifiers.InputDiscardedEvent; #endregion Public Constants and Readonly Fields //------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods ////// The client calls this method to indicate the current element should start listening /// for input event of the given type. /// public void StartListening(SynchronizedInputType inputType) { UiaCoreApi.SynchronizedInputPattern_StartListening(_hPattern,inputType); } ////// If the element is currently listening, it will revert back to normal operation /// /// public void Cancel() { UiaCoreApi.SynchronizedInputPattern_Cancel(_hPattern); } #endregion Public Methods //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal static object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached) { return new SynchronizedInputPattern(el, hPattern); } #endregion Internal Methods //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private SafePatternHandle _hPattern; #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: Client-side wrapper for SynchronizedInput Pattern // // History: // 11/07/2008 : Added by [....]. // //--------------------------------------------------------------------------- using System; //using System.Collections; using System.Windows.Automation.Provider; using MS.Internal.Automation; namespace System.Windows.Automation { ////// Represents objects that support synchronized input events /// #if (INTERNAL_COMPILE) internal class SynchronizedInputPattern: BasePattern #else public class SynchronizedInputPattern: BasePattern #endif { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors private SynchronizedInputPattern(AutomationElement el, SafePatternHandle hPattern) : base(el, hPattern) { _hPattern = hPattern; } #endregion Constructors //------------------------------------------------------ // // Public Constants / Readonly Fields // //----------------------------------------------------- #region Public Constants and Readonly Fields ///SynchronizedInputPattern pattern public static readonly AutomationPattern Pattern = SynchronizedInputPatternIdentifiers.Pattern; ////// Event ID: InputReachedTarget - indicates input received by the current listening element. /// sourceElement refers to the current listening element. /// public static readonly AutomationEvent InputReachedTargetEvent = SynchronizedInputPatternIdentifiers.InputReachedTargetEvent; ////// /// Event ID: InputReachedOtherElement - indicates an input is handled by different element than the one currently listening on. /// sourceElement refers to the current listening element. /// public static readonly AutomationEvent InputReachedOtherElementEvent = SynchronizedInputPatternIdentifiers.InputReachedOtherElementEvent; ////// Event ID: InputDiscarded - indicates that input is discarded by the framework. /// sourceElement refers to the current listening element. /// public static readonly AutomationEvent InputDiscardedEvent = SynchronizedInputPatternIdentifiers.InputDiscardedEvent; #endregion Public Constants and Readonly Fields //------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods ////// The client calls this method to indicate the current element should start listening /// for input event of the given type. /// public void StartListening(SynchronizedInputType inputType) { UiaCoreApi.SynchronizedInputPattern_StartListening(_hPattern,inputType); } ////// If the element is currently listening, it will revert back to normal operation /// /// public void Cancel() { UiaCoreApi.SynchronizedInputPattern_Cancel(_hPattern); } #endregion Public Methods //----------------------------------------------------- // // Internal Methods // //------------------------------------------------------ #region Internal Methods internal static object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached) { return new SynchronizedInputPattern(el, hPattern); } #endregion Internal Methods //----------------------------------------------------- // // Private Fields // //----------------------------------------------------- #region Private Fields private SafePatternHandle _hPattern; #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
- DetailsViewPageEventArgs.cs
- StringConverter.cs
- CLSCompliantAttribute.cs
- ObjectDataSourceDisposingEventArgs.cs
- DataGridHeaderBorder.cs
- VisualStyleRenderer.cs
- DbProviderFactories.cs
- ExecutedRoutedEventArgs.cs
- ObjectResult.cs
- DataRowExtensions.cs
- WindowsSpinner.cs
- BinaryObjectWriter.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- AttributeProviderAttribute.cs
- RoutedEvent.cs
- ClientSettings.cs
- ProxyElement.cs
- Pair.cs
- panel.cs
- QilGenerator.cs
- ToolStripGrip.cs
- EventHandlersStore.cs
- Config.cs
- RoleService.cs
- ScrollChrome.cs
- hebrewshape.cs
- DelegateSerializationHolder.cs
- WebPartsPersonalization.cs
- FixedNode.cs
- Completion.cs
- HttpAsyncResult.cs
- ListItemCollection.cs
- Peer.cs
- ProvidersHelper.cs
- OrderByQueryOptionExpression.cs
- XmlObjectSerializerContext.cs
- BoolExpr.cs
- EventData.cs
- CheckBoxField.cs
- MonitoringDescriptionAttribute.cs
- Command.cs
- DataServiceEntityAttribute.cs
- ValueType.cs
- RolePrincipal.cs
- KeyValueConfigurationElement.cs
- UniqueConstraint.cs
- ClassValidator.cs
- StrokeIntersection.cs
- TabControl.cs
- ResourceDescriptionAttribute.cs
- ServiceOperationListItem.cs
- OperationContextScope.cs
- ToolStripEditorManager.cs
- DragCompletedEventArgs.cs
- CodeDOMUtility.cs
- TextDecorationCollection.cs
- SafeTokenHandle.cs
- LoginDesignerUtil.cs
- XPathConvert.cs
- XmlElement.cs
- DefaultCommandConverter.cs
- ResourceBinder.cs
- UInt16.cs
- StackOverflowException.cs
- PersistChildrenAttribute.cs
- DefaultTraceListener.cs
- WebPartDescriptionCollection.cs
- EmbossBitmapEffect.cs
- JavaScriptSerializer.cs
- XmlIlGenerator.cs
- TypeLoadException.cs
- MailDefinition.cs
- CustomCategoryAttribute.cs
- SeverityFilter.cs
- JoinQueryOperator.cs
- TimeBoundedCache.cs
- AsyncOperation.cs
- ServiceThrottlingElement.cs
- MdImport.cs
- ItemsPresenter.cs
- ListControl.cs
- DeflateEmulationStream.cs
- AbstractDataSvcMapFileLoader.cs
- LinkedDataMemberFieldEditor.cs
- HttpCapabilitiesBase.cs
- TabPageDesigner.cs
- ExpandableObjectConverter.cs
- PrinterUnitConvert.cs
- LocatorBase.cs
- SystemIPv6InterfaceProperties.cs
- Claim.cs
- SqlTransaction.cs
- StyleSheetDesigner.cs
- DataGridToolTip.cs
- TextTreeNode.cs
- ByteStorage.cs
- SocketCache.cs
- PageAsyncTaskManager.cs
- PersonalizationDictionary.cs
- X509UI.cs