Ejemplo n.º 1
0
        /// <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;
        }
Ejemplo n.º 2
0
        public static string GetControlNameNew(MappedControl control)
        {
            //WARNING - Not localization safe
            if (control == MappedControl.Deprecated_CHANT_EDITOR)
            {
                return("Toggle Walk Mode");
            }

            return(GetControlNameOrig(control));
        }
Ejemplo n.º 3
0
        public static string GetControlNameNew(MappedControl control)
        {
            //WARNING - Not localization safe
            if(control == MappedControl.Deprecated_CHANT_EDITOR)
            {
                return "Toggle Walk Mode";
            }

            return GetControlNameOrig(control);
        }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
        /// <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);
        }
Ejemplo n.º 6
0
 public static string GetControlNameOrig(MappedControl control)
 {
     throw new DeadEndException("Duplicate Body, shouldn't be able to get here");
 }
Ejemplo n.º 7
0
 public static string GetControlNameOrig(MappedControl control)
 {
     throw new DeadEndException("Duplicate Body, shouldn't be able to get here");
 }