Ejemplo n.º 1
0
        private void ShowCapturedElement()
        {
            if (capturedElement == null)
            {
                return;
            }

            UIControlBase control = null;

            if (radioButtonWeb.Checked)
            {
                control = Desktop.Web.GetControlFromCursor();
            }
            else
            {
                control = UIAControl.GetControlByType(capturedElement);
            }
            if (control != null)
            {
                textBox.Text   = control.CodePath;
                coordinate     = new System.Windows.Point((int)(Cursor.Position.X - control.Layout.X), (int)(Cursor.Position.Y - control.Layout.Y));
                textBoxXY.Text = coordinate.ToString();

                _controlPropertyGrid.SelectedObject = null;

                _hierarchyList.BeginUpdate();
                _hierarchyList.Items.Clear();

                UIControlBase pass = control;

                while (pass != null)
                {
                    _hierarchyList.Items.Add(new ListViewItem()
                    {
                        Text = pass.VisibleName,
                        Tag  = pass
                    });

                    pass = pass.Parent;
                }

                _hierarchyList.EndUpdate();
                _hierarchyList.Items[0].Selected = true;
            }
        }
Ejemplo n.º 2
0
 /// <summary>Return the markup token representing this path segment.</summary>
 /// <returns>The markup token representing this path segment.<see cref="System.String"/></returns>
 public override string MarkupToken()
 {
     return("L2 " + _start.ToString(System.Globalization.CultureInfo.InvariantCulture) +
            " " + _end.ToString(System.Globalization.CultureInfo.InvariantCulture));
 }
Ejemplo n.º 3
0
 /// <summary>Return the markup token representing this path segment.</summary>
 /// <returns>The markup token representing this path segment.<see cref="System.String"/></returns>
 public override string MarkupToken()
 {
     return("C " + _control1.ToString(System.Globalization.CultureInfo.InvariantCulture) +
            " " + _control2.ToString(System.Globalization.CultureInfo.InvariantCulture) +
            " " + _end.ToString(System.Globalization.CultureInfo.InvariantCulture));
 }
Ejemplo n.º 4
0
 /// <summary>Return the markup token representing this path segment.</summary>
 /// <returns>The markup token representing this path segment.<see cref="System.String"/></returns>
 public override string MarkupToken()
 {
     return("M " + _point.ToString(System.Globalization.CultureInfo.InvariantCulture));
 }