Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / UIAutomation / UIAutomationClient / System / Windows / Automation / InvokePattern.cs / 1305600 / InvokePattern.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Client-side wrapper for Invoke Pattern // // History: // 06/23/2003 : BrendanM Ported to WCP // //--------------------------------------------------------------------------- using System; using System.Windows.Automation.Provider; using MS.Internal.Automation; namespace System.Windows.Automation { ////// Represents objects that have a single, unambiguous, action associated with them. /// /// Examples of UI that implments this includes: /// Push buttons /// Hyperlinks /// Menu items /// Radio buttons /// Check boxes /// #if (INTERNAL_COMPILE) internal class InvokePattern: BasePattern #else public class InvokePattern: BasePattern #endif { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors private InvokePattern(AutomationElement el, SafePatternHandle hPattern) : base(el, hPattern) { _hPattern = hPattern; } #endregion Constructors //------------------------------------------------------ // // Public Constants / Readonly Fields // //----------------------------------------------------- #region Public Constants and Readonly Fields ///Invokable pattern public static readonly AutomationPattern Pattern = InvokePatternIdentifiers.Pattern; ///Event ID: Invoked - event used to watch for Invokable pattern Invoked events public static readonly AutomationEvent InvokedEvent = InvokePatternIdentifiers.InvokedEvent; #endregion Public Constants and Readonly Fields //------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods ////// Request that the control initiate its action. /// Should return immediately without blocking. /// There is no way to determine what happened, when it happend, or whether /// anything happened at all. /// /// ////// This API does not work inside the secure execution environment. /// public void Invoke() { UiaCoreApi.InvokePattern_Invoke(_hPattern); } #endregion Public Methods //----------------------------------------------------- // // Public Properties // //------------------------------------------------------ #region Public Properties // No properties #endregion Public Properties //----------------------------------------------------- // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal static object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached) { return new InvokePattern(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 Invoke Pattern // // History: // 06/23/2003 : BrendanM Ported to WCP // //--------------------------------------------------------------------------- using System; using System.Windows.Automation.Provider; using MS.Internal.Automation; namespace System.Windows.Automation { ////// Represents objects that have a single, unambiguous, action associated with them. /// /// Examples of UI that implments this includes: /// Push buttons /// Hyperlinks /// Menu items /// Radio buttons /// Check boxes /// #if (INTERNAL_COMPILE) internal class InvokePattern: BasePattern #else public class InvokePattern: BasePattern #endif { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors private InvokePattern(AutomationElement el, SafePatternHandle hPattern) : base(el, hPattern) { _hPattern = hPattern; } #endregion Constructors //------------------------------------------------------ // // Public Constants / Readonly Fields // //----------------------------------------------------- #region Public Constants and Readonly Fields ///Invokable pattern public static readonly AutomationPattern Pattern = InvokePatternIdentifiers.Pattern; ///Event ID: Invoked - event used to watch for Invokable pattern Invoked events public static readonly AutomationEvent InvokedEvent = InvokePatternIdentifiers.InvokedEvent; #endregion Public Constants and Readonly Fields //------------------------------------------------------ // // Public Methods // //------------------------------------------------------ #region Public Methods ////// Request that the control initiate its action. /// Should return immediately without blocking. /// There is no way to determine what happened, when it happend, or whether /// anything happened at all. /// /// ////// This API does not work inside the secure execution environment. /// public void Invoke() { UiaCoreApi.InvokePattern_Invoke(_hPattern); } #endregion Public Methods //----------------------------------------------------- // // Public Properties // //------------------------------------------------------ #region Public Properties // No properties #endregion Public Properties //----------------------------------------------------- // // Internal Methods // //----------------------------------------------------- #region Internal Methods internal static object Wrap(AutomationElement el, SafePatternHandle hPattern, bool cached) { return new InvokePattern(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
- InfiniteIntConverter.cs
- StringInfo.cs
- SchemaTypeEmitter.cs
- GeometryDrawing.cs
- ExpressionEditorAttribute.cs
- CaseInsensitiveOrdinalStringComparer.cs
- RelOps.cs
- XmlSerializerFactory.cs
- URLAttribute.cs
- AutomationPropertyInfo.cs
- HttpHandlerAction.cs
- ControlCodeDomSerializer.cs
- DefaultObjectMappingItemCollection.cs
- PriorityItem.cs
- FormViewUpdatedEventArgs.cs
- MULTI_QI.cs
- ItemsControl.cs
- GraphicsPath.cs
- XmlToDatasetMap.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- BezierSegment.cs
- FixedSOMImage.cs
- XmlDocumentType.cs
- RootBrowserWindowAutomationPeer.cs
- OdbcHandle.cs
- AccessDataSource.cs
- FillErrorEventArgs.cs
- HttpListener.cs
- unsafeIndexingFilterStream.cs
- SqlTypeConverter.cs
- EntityDesignerUtils.cs
- ExpressionBuilder.cs
- EventLog.cs
- Package.cs
- MenuStrip.cs
- AncillaryOps.cs
- NotSupportedException.cs
- TransferRequestHandler.cs
- XpsDocumentEvent.cs
- Wizard.cs
- ILGen.cs
- CodeRegionDirective.cs
- StorageAssociationTypeMapping.cs
- SettingsPropertyIsReadOnlyException.cs
- CodeMemberMethod.cs
- XmlRawWriter.cs
- PolyLineSegment.cs
- WebPartEditorCancelVerb.cs
- ClientRuntimeConfig.cs
- NoPersistHandle.cs
- WebEventTraceProvider.cs
- DnsPermission.cs
- Subset.cs
- DependencyPropertyChangedEventArgs.cs
- ListenerBinder.cs
- ThreadPool.cs
- TextBoxRenderer.cs
- DocumentViewerConstants.cs
- PropertyDescriptor.cs
- MasterPageParser.cs
- CurrentTimeZone.cs
- ping.cs
- AppSettingsSection.cs
- DbDataReader.cs
- EasingQuaternionKeyFrame.cs
- SpellerError.cs
- Button.cs
- SemanticResultValue.cs
- RelativeSource.cs
- WebRequestModuleElement.cs
- TypeElement.cs
- ProxyWebPartConnectionCollection.cs
- RowsCopiedEventArgs.cs
- Win32NamedPipes.cs
- RawStylusInputCustomData.cs
- SourceCollection.cs
- Sql8ConformanceChecker.cs
- HttpRequest.cs
- AnnotationResourceCollection.cs
- baseaxisquery.cs
- ExpressionBinding.cs
- XamlPathDataSerializer.cs
- AssemblyCollection.cs
- XmlTextReaderImpl.cs
- AnnotationStore.cs
- HighlightVisual.cs
- AspNetSynchronizationContext.cs
- GuidConverter.cs
- WebPartConnectVerb.cs
- RenderData.cs
- SmiGettersStream.cs
- QueryableDataSourceEditData.cs
- ResourcePool.cs
- SpeakInfo.cs
- SqlInternalConnectionSmi.cs
- Timer.cs
- SiblingIterators.cs
- IsolatedStorageException.cs
- WebBrowser.cs
- TableChangeProcessor.cs