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
- dataprotectionpermissionattribute.cs
- NavigationEventArgs.cs
- SystemIPv6InterfaceProperties.cs
- PerformanceCounterManager.cs
- ListControl.cs
- RemoveStoryboard.cs
- MeasureData.cs
- IdleTimeoutMonitor.cs
- UnsafeNativeMethodsPenimc.cs
- XmlBindingWorker.cs
- DateTimeStorage.cs
- ClientFormsIdentity.cs
- SwitchLevelAttribute.cs
- ScrollBarAutomationPeer.cs
- TextEditorThreadLocalStore.cs
- PropertyValueUIItem.cs
- InstanceValue.cs
- DbParameterHelper.cs
- DataSetMappper.cs
- ServiceMetadataPublishingElement.cs
- ForeignKeyFactory.cs
- DataProtection.cs
- Timer.cs
- MediaEntryAttribute.cs
- MatrixCamera.cs
- RemoteWebConfigurationHostServer.cs
- DataGridViewCellStateChangedEventArgs.cs
- RegisteredExpandoAttribute.cs
- _NestedMultipleAsyncResult.cs
- WebServicesInteroperability.cs
- DictionarySectionHandler.cs
- TargetControlTypeAttribute.cs
- DataPagerFieldCollection.cs
- TextWriterTraceListener.cs
- Transform3DCollection.cs
- EventSourceCreationData.cs
- GlobalDataBindingHandler.cs
- Enum.cs
- Registration.cs
- Rotation3D.cs
- MethodBuilderInstantiation.cs
- RectAnimationUsingKeyFrames.cs
- PropertyDescriptorCollection.cs
- PermissionRequestEvidence.cs
- XmlWriterSettings.cs
- ProtocolImporter.cs
- SmtpNtlmAuthenticationModule.cs
- RegexFCD.cs
- PriorityQueue.cs
- Transform.cs
- SqlTransaction.cs
- PreDigestedSignedInfo.cs
- Button.cs
- SecurityAlgorithmSuiteConverter.cs
- ContentElement.cs
- HttpStreamXmlDictionaryWriter.cs
- RenderOptions.cs
- HostingEnvironment.cs
- Visual3D.cs
- DbConnectionPoolOptions.cs
- CodeRegionDirective.cs
- SettingsProviderCollection.cs
- WpfGeneratedKnownTypes.cs
- InvokeBase.cs
- _RequestLifetimeSetter.cs
- EntityDataSourceChangedEventArgs.cs
- PersonalizationStateInfoCollection.cs
- SkinBuilder.cs
- DbConnectionOptions.cs
- Stack.cs
- DataKeyArray.cs
- ConstrainedDataObject.cs
- UrlMappingsModule.cs
- HttpMethodAttribute.cs
- HttpException.cs
- Compiler.cs
- CollectionContainer.cs
- RemotingHelper.cs
- _DigestClient.cs
- WeakHashtable.cs
- HtmlTableRow.cs
- RuleProcessor.cs
- StrongNameUtility.cs
- Blend.cs
- SystemNetHelpers.cs
- _BufferOffsetSize.cs
- CompletedAsyncResult.cs
- LayoutEditorPart.cs
- LineSegment.cs
- Matrix3DConverter.cs
- InvokeFunc.cs
- WpfPayload.cs
- WorkItem.cs
- PostBackTrigger.cs
- QuaternionAnimation.cs
- DataGridViewControlCollection.cs
- ZipIOExtraFieldZip64Element.cs
- FontWeights.cs
- DataServiceStreamResponse.cs
- HttpCachePolicyElement.cs