Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 public static void InvalidateCache()
 {
     _cachedtb = null;
 }
Esempio n. 3
0
 public static GuiTextBox GetTextBoxByName(AutomationElement window, string name)
 {
     if (_cachedtb == null || _cachedtb.Name != name) {
         var tb = window.FindChildByControlTypeAndName(ControlType.Edit, name);
         _cachedtb = new GuiTextBox(tb);
     }
     return _cachedtb;
 }