Example #1
0
        void treeViewAdv1_Expanding(object sender, TreeViewAdvEventArgs e)
        {
            if (_client.State != XdebugClientState.Break)
            {
                MessageBox.Show(
                    "This property is no longer available. Close the Property window and try running the script again.",
                    "Property invalidated",
                    MessageBoxButtons.OK
                    );

                return;
            }

            DebugNode node = e.Node.Tag as DebugNode;

            if (node != null && !node.Property.isComplete)
            {
                this.treeViewAdv1.BeginUpdate();
                Property p = _client.GetPropertyValue(node.Property.FullName);

                /* We don't want 'p' itself. It will be a copy of the node that
                 * was marked as inComplete. */
                foreach (Property child in p.ChildProperties)
                {
                    DebugNode newNode = this.BuildDebugNode(child, node);

                    node.Nodes.Add(newNode);
                }

                node.Property.isComplete = true;
                this.treeViewAdv1.EndUpdate();
            }
        }
Example #2
0
        void OnToolTipRequest(object sender, ToolTipRequestEventArgs e)
        {
            if (e.InDocument && !e.ToolTipShown && _xdebugClient.State == XdebugClientState.Break)
            {
                ICSharpCode.TextEditor.TextArea area_obj = (ICSharpCode.TextEditor.TextArea)sender;

                string s = ICSharpCode.TextEditor.Document.TextUtilities.GetWordAt(area_obj.Document, area_obj.Document.PositionToOffset(new Point(e.LogicalPosition.X, e.LogicalPosition.Y)));

                if (area_obj.Document.GetCharAt(MyFindWordStart(area_obj.Document, area_obj.Document.PositionToOffset(new Point(e.LogicalPosition.X, e.LogicalPosition.Y))) - 1).ToString() == "$")
                {
                    s = "$" + s;
                }

                if (s != "")
                {
                    Property p = _xdebugClient.GetPropertyValue(s, 0);

                    if (p != null)
                    {
                        e.ShowToolTip(p.Value);
                    }
                }
            }
        }