当前位置: 首页>>代码示例>>C#>>正文


C# AutomationElement.FindChildByControlTypeAndAutomationId方法代码示例

本文整理汇总了C#中System.Windows.Automation.AutomationElement.FindChildByControlTypeAndAutomationId方法的典型用法代码示例。如果您正苦于以下问题:C# AutomationElement.FindChildByControlTypeAndAutomationId方法的具体用法?C# AutomationElement.FindChildByControlTypeAndAutomationId怎么用?C# AutomationElement.FindChildByControlTypeAndAutomationId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Automation.AutomationElement的用法示例。


在下文中一共展示了AutomationElement.FindChildByControlTypeAndAutomationId方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetTextBox

 public static GuiTextBox GetTextBox(AutomationElement window, string automationId)
 {
     if (_cachedtb == null || _cachedtb.AutomationId != automationId) {
         var tb = window.FindChildByControlTypeAndAutomationId(ControlType.Edit, automationId);
         _cachedtb = new GuiTextBox(tb);
     }
     return _cachedtb;
 }
开发者ID:ThetaDev,项目名称:clicktest,代码行数:8,代码来源:GuiTextBox.cs

示例2: GetUserControl

 public static GuiUserControl GetUserControl(AutomationElement window, string name)
 {
     _automationId = name;
     _currentParentWindow = window;
     AutomationElement ele;
     ele = window.FindChildByControlTypeAndAutomationId(ControlType.Custom, name);
     return new GuiUserControl(ele);
 }
开发者ID:gouzhiyuan,项目名称:clicktest,代码行数:8,代码来源:GuiUserControl.cs

示例3: GetTabByAutomationId

 public static GuiTabItem GetTabByAutomationId(AutomationElement parentWindow, string automationId)
 {
     if (_cachedTab == null || _cachedTab.AutomationId != automationId) {
         var res = parentWindow.FindChildByControlTypeAndAutomationId(ControlType.TabItem, automationId);
         _cachedTab = new GuiTabItem(res, automationId);
         _currentParentWindow = parentWindow;
     }
     return _cachedTab;
 }
开发者ID:ThetaDev,项目名称:clicktest,代码行数:9,代码来源:GuiTabItem.cs

示例4: Find

 public static GuiComboBox Find(AutomationElement window, string automationId)
 {
     var res = window.FindChildByControlTypeAndAutomationId(ControlType.ComboBox, automationId);
     return new GuiComboBox(res);
 }
开发者ID:gouzhiyuan,项目名称:clicktest,代码行数:5,代码来源:GuiComboBox.cs

示例5: GetButtonByAutomationId

 public static GuiButton GetButtonByAutomationId(AutomationElement window, string automationId)
 {
     var res = window.FindChildByControlTypeAndAutomationId(ControlType.Button, automationId);
     return new GuiButton(res, automationId);
 }
开发者ID:gouzhiyuan,项目名称:clicktest,代码行数:5,代码来源:GuiButton.cs

示例6: GetExpanderByAutomationId

 public static GuiExpander GetExpanderByAutomationId(AutomationElement window, string automationId)
 {
     var res = window.FindChildByControlTypeAndAutomationId(ControlType.Group, automationId);
     return new GuiExpander(res, automationId);
 }
开发者ID:gouzhiyuan,项目名称:clicktest,代码行数:5,代码来源:GuiExpander.cs

示例7: GetRadioButtonByAutomationId

 public static GuiRadioButton GetRadioButtonByAutomationId(AutomationElement window, string automationId)
 {
     AutomationElement res = window.FindChildByControlTypeAndAutomationId(ControlType.RadioButton, automationId);
     return new GuiRadioButton(res);
 }
开发者ID:ThetaDev,项目名称:clicktest,代码行数:5,代码来源:GuiRadioButton.cs

示例8: GetLabel

 public static GuiLabel GetLabel(AutomationElement window, string automationId)
 {
     var res = window.FindChildByControlTypeAndAutomationId(ControlType.Text, automationId);
     return new GuiLabel(res);
 }
开发者ID:gouzhiyuan,项目名称:clicktest,代码行数:5,代码来源:GuiLabel.cs


注:本文中的System.Windows.Automation.AutomationElement.FindChildByControlTypeAndAutomationId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。