Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / UIAutomation / UIAutomationClient / System / Windows / Automation / InvokePattern.cs / 1 / 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
- KnownBoxes.cs
- BevelBitmapEffect.cs
- iisPickupDirectory.cs
- TransformerConfigurationWizardBase.cs
- SizeFConverter.cs
- DataServiceContext.cs
- Model3DGroup.cs
- XmlComplianceUtil.cs
- SystemColors.cs
- LicFileLicenseProvider.cs
- EncoderFallback.cs
- DataGridViewMethods.cs
- AsymmetricKeyExchangeFormatter.cs
- GridToolTip.cs
- WithStatement.cs
- RandomNumberGenerator.cs
- ProfileInfo.cs
- PeerApplicationLaunchInfo.cs
- ScriptServiceAttribute.cs
- COM2ExtendedBrowsingHandler.cs
- SmiRecordBuffer.cs
- HttpException.cs
- ExtensionQuery.cs
- ControlCollection.cs
- StoreUtilities.cs
- MouseWheelEventArgs.cs
- XmlTextReader.cs
- NullReferenceException.cs
- Converter.cs
- DelegatingConfigHost.cs
- TraceUtility.cs
- FileChangesMonitor.cs
- DoubleAnimationUsingKeyFrames.cs
- RegexCompiler.cs
- DataGridViewCellStyleConverter.cs
- ClientUrlResolverWrapper.cs
- ControlEvent.cs
- Certificate.cs
- Cursors.cs
- ScheduleChanges.cs
- CompositionAdorner.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- XmlTextReaderImplHelpers.cs
- SpellerError.cs
- COM2TypeInfoProcessor.cs
- StringUtil.cs
- DesignerActionItemCollection.cs
- ConstraintEnumerator.cs
- CachedBitmap.cs
- RequestCachingSection.cs
- EnumBuilder.cs
- FormViewInsertedEventArgs.cs
- XmlSchemaException.cs
- ReverseComparer.cs
- BitmapData.cs
- Ref.cs
- BroadcastEventHelper.cs
- FixedSOMFixedBlock.cs
- CodeTypeParameterCollection.cs
- MessagingDescriptionAttribute.cs
- ConfigXmlWhitespace.cs
- ToolStripSystemRenderer.cs
- OperatorExpressions.cs
- CreateUserErrorEventArgs.cs
- XmlWrappingWriter.cs
- DataColumn.cs
- ProcessHost.cs
- StaticFileHandler.cs
- UnauthorizedAccessException.cs
- Win32NamedPipes.cs
- NullRuntimeConfig.cs
- DbgUtil.cs
- TrustLevelCollection.cs
- FullTextBreakpoint.cs
- AddInProcess.cs
- SHA1.cs
- InvokeProviderWrapper.cs
- XmlValueConverter.cs
- FileChangesMonitor.cs
- PathGradientBrush.cs
- HwndSubclass.cs
- CapabilitiesUse.cs
- ManifestResourceInfo.cs
- UnicodeEncoding.cs
- UnsafeNativeMethods.cs
- AuthenticationModuleElementCollection.cs
- TextSelectionHighlightLayer.cs
- Literal.cs
- FormatConvertedBitmap.cs
- SoapExtensionReflector.cs
- XmlHierarchicalEnumerable.cs
- PropertyItemInternal.cs
- DiscoveryEndpoint.cs
- SchemaSetCompiler.cs
- ValidationSummary.cs
- CodeCastExpression.cs
- ObjectContext.cs
- CapabilitiesUse.cs
- CodeMemberMethod.cs
- HttpsTransportBindingElement.cs