/// <summary> /// Initializes a new instance of the <see cref="FunctionBuilder"/> class. /// </summary> /// <param name="parentWindowHandle">The parent window handle.</param> /// <param name="focusedControl">The focused control.</param> public FunctionBuilder(IntPtr parentWindowHandle, MappedControl focusedControl) { /* get the handle of the parent window */ _parentWindowHandle = parentWindowHandle; /* The element under focus */ _focusedControl = focusedControl; }
public static string GetControlNameNew(MappedControl control) { //WARNING - Not localization safe if (control == MappedControl.Deprecated_CHANT_EDITOR) { return("Toggle Walk Mode"); } return(GetControlNameOrig(control)); }
public static string GetControlNameNew(MappedControl control) { //WARNING - Not localization safe if(control == MappedControl.Deprecated_CHANT_EDITOR) { return "Toggle Walk Mode"; } return GetControlNameOrig(control); }
private static void AddItems(MappedControl ctrl, ListViewItem lvi) { lvi.SubItems.Add(ctrl.AutomationId); lvi.SubItems.Add(ctrl.Name); lvi.SubItems.Add(ctrl.ControlType); lvi.SubItems.Add(ctrl.ClassName); lvi.SubItems.Add(ctrl.HelpText); lvi.SubItems.Add(ctrl.AcceleratorKey); lvi.SubItems.Add(ctrl.AccessKey); lvi.SubItems.Add(ctrl.LabeledBy); lvi.SubItems.Add(ctrl.ControlTreePosition.ToString(CultureInfo.CurrentCulture)); lvi.SubItems.Add(ctrl.ItemType); }
/// <summary> /// Gets control information for .Net controls /// </summary> /// <param name="focusedElement">The focused element.</param> private void ProcessTargetControl(AutomationElement focusedElement) { TsInteractions.DropDownItems.Clear(); foreach (MappedControl item in _thisWindow.AllFormsControls) { if (!Automation.Compare(item.AutoElement, focusedElement)) { continue; } PropControls.SelectedObject = item; _selectedControl = item; break; } Painter.PaintTarget(focusedElement, _focusedApplicationHandle); UpdateAutomationDisplay(focusedElement); }
public static string GetControlNameOrig(MappedControl control) { throw new DeadEndException("Duplicate Body, shouldn't be able to get here"); }