Exemplo n.º 1
0
        private void _pftTreeView_NodeChecked
        (
            object sender,
            TreeViewEventArgs e
        )
        {
            TreeNode treeNode = e.Node;

            if (ReferenceEquals(treeNode, null))
            {
                return;
            }

            PftNodeInfo nodeInfo = treeNode.Tag as PftNodeInfo;

            if (ReferenceEquals(nodeInfo, null))
            {
                return;
            }

            PftNode node = nodeInfo.Node;

            if (ReferenceEquals(node, null))
            {
                return;
            }

            node.Breakpoint = treeNode.Checked;
        }
Exemplo n.º 2
0
 private void _Printer
 (
     PftContext context,
     PftNode node,
     PftNode[] arguments
 )
 {
     for (int i = 0; i < arguments.Length; i++)
     {
         string text = context.GetStringArgument(arguments, i);
         if (!string.IsNullOrEmpty(text))
         {
             context.Write(node, text);
         }
     }
 }
Exemplo n.º 3
0
        private void _pftTreeView_CurrentNodeChanged
        (
            object sender,
            TreeViewEventArgs e
        )
        {
            PftNodeInfo currentNode = _pftTreeView.CurrentNode;

            if (ReferenceEquals(currentNode, null))
            {
                return;
            }

            PftNode pftNode = currentNode.Node;

            if (ReferenceEquals(pftNode, null))
            {
                return;
            }

            string text   = pftNode.Text ?? string.Empty;
            int    line   = pftNode.LineNumber - 1;
            int    column = pftNode.Column - 1;

            if (line < 0 || column < 0)
            {
                return;
            }

            TextLocation    start  = new TextLocation(column, line);
            TextLocation    end    = new TextLocation(column + text.Length, line);
            TextAreaControl editor = _pftBox.ActiveTextAreaControl;

            editor.SelectionManager.SetSelection(start, end);
            editor.Caret.Position = start;
        }