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
- FindCriteriaApril2005.cs
- SimpleHandlerFactory.cs
- FormViewDeleteEventArgs.cs
- SocketSettings.cs
- ImageList.cs
- versioninfo.cs
- XmlILTrace.cs
- ApplicationInterop.cs
- DragEventArgs.cs
- ModelPerspective.cs
- AddIn.cs
- ErrorsHelper.cs
- PermissionListSet.cs
- PerformanceCounterPermissionAttribute.cs
- TextBox.cs
- SmtpMail.cs
- DescendantQuery.cs
- DataGridColumnEventArgs.cs
- InvalidWMPVersionException.cs
- Cursors.cs
- WebPartTransformerCollection.cs
- Vector3DAnimationUsingKeyFrames.cs
- XhtmlBasicPanelAdapter.cs
- Animatable.cs
- RegexCompiler.cs
- EventLogEntryCollection.cs
- cookiecollection.cs
- JavascriptCallbackResponseProperty.cs
- Grammar.cs
- FocusWithinProperty.cs
- Filter.cs
- CultureTable.cs
- SubstitutionList.cs
- AndCondition.cs
- WorkflowDesignerColors.cs
- SqlErrorCollection.cs
- ForceCopyBuildProvider.cs
- XslAstAnalyzer.cs
- DataGridViewRowStateChangedEventArgs.cs
- PopupRootAutomationPeer.cs
- mediaeventargs.cs
- TemplatePagerField.cs
- DisplayNameAttribute.cs
- GradientBrush.cs
- XslTransform.cs
- WebConfigurationHost.cs
- LineServicesCallbacks.cs
- Rotation3DAnimationBase.cs
- BamlTreeNode.cs
- TaskDesigner.cs
- DataGridViewCellFormattingEventArgs.cs
- BitmapEffectDrawingContextWalker.cs
- RtfToXamlReader.cs
- BuildProviderCollection.cs
- ThicknessConverter.cs
- BufferModesCollection.cs
- NamedPipeProcessProtocolHandler.cs
- _NativeSSPI.cs
- ComplexLine.cs
- HwndSourceParameters.cs
- DesignerView.cs
- SqlRecordBuffer.cs
- BackStopAuthenticationModule.cs
- SemanticResultValue.cs
- XmlLanguage.cs
- CollectionDataContractAttribute.cs
- ContentPropertyAttribute.cs
- GCHandleCookieTable.cs
- Literal.cs
- DataServiceHostFactory.cs
- ConnectionPoint.cs
- CatalogPart.cs
- SharedStatics.cs
- DebugInfoExpression.cs
- TagPrefixInfo.cs
- WebServiceResponseDesigner.cs
- Win32Exception.cs
- WaveHeader.cs
- CompressionTransform.cs
- RtfToXamlLexer.cs
- Stroke.cs
- MonthChangedEventArgs.cs
- PerformanceCounterManager.cs
- DataTableMappingCollection.cs
- CreateParams.cs
- XmlSchemaAppInfo.cs
- ByteKeyFrameCollection.cs
- TextControl.cs
- SqlClientPermission.cs
- UnknownBitmapDecoder.cs
- FileRecordSequenceCompletedAsyncResult.cs
- WriteTimeStream.cs
- PortCache.cs
- BooleanExpr.cs
- DataKey.cs
- XmlValidatingReaderImpl.cs
- Int16Animation.cs
- FunctionNode.cs
- OperatingSystem.cs
- Size3D.cs