Пример #1
0
 void PopulateTreeView(MemBlockTree.Node tree, TreeNodeCollection nodes)
 {
     foreach (MemBlockTree.Node node in tree.Children)
     {
         nodes.Add(node.GetText());
         nodes[nodes.Count - 1].Tag = node;
         PopulateTreeView(node, nodes[nodes.Count - 1].Nodes);
     }
 }
Пример #2
0
        private void DoubleClickNode(object sender, System.EventArgs e)
        {
            TreeView tree = sender as TreeView;

            if (tree != null && tree.SelectedNode != null)
            {
                MemBlockTree.Node memNode = tree.SelectedNode.Tag as MemBlockTree.Node;
                OpenSourceFile(memNode);
            }
        }
Пример #3
0
 private void subtreeDetailsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     MemBlockTree.Node node = treeView1.SelectedNode.Tag as MemBlockTree.Node;
     if (node != null)
     {
         SubtreeDetails dlg = new SubtreeDetails(node.m_callAddress);
         dlg.BuildTree(m_snapshot);
         dlg.ShowDialog();
     }
 }
Пример #4
0
        private void OpenSourceFile(MemBlockTree.Node node)
        {
            if (node.Symbol.fileName == null)
            {
                label1.Text = "";
                return;
            }

            try
            {
                this.richTextBox1.LoadFile(node.Symbol.fileName, RichTextBoxStreamType.PlainText);
                ScrollToLine(node.Symbol.line);
                label1.Text = node.Symbol.fileName + "@" + node.Symbol.line;
            }
            catch (System.IO.IOException)
            {
                label1.Text = "";
            }
        }