/*private void ParentsLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         * {
         *  ContextMenu menu = new ContextMenu();
         *
         *  string indent = "";
         *  foreach (var parent in Current.Value.GetParents())
         *  {
         *      var copy = parent;
         *      menu.MenuItems.Add(new MenuItem(indent + copy.Name, (s, a) => NavigateTo(copy)));
         *      indent += "  ";
         *  }
         *
         *  menu.Show(this, this.PointToClient(Cursor.Position));
         * }
         *
         * private void ChildrenLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         * {
         *  ContextMenu menu = new ContextMenu();
         *
         *  foreach (var child in Current.Value.Nodes)
         *  {
         *      var copy = child;
         *      menu.MenuItems.Add(copy.Name, (s, a) => NavigateTo(copy));
         *  }
         *
         *  menu.Show(this, this.PointToClient(Cursor.Position));
         * }
         */

        private void CallersList_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (CalledByList.SelectedItems.Count == 0)
            {
                return;
            }

            CallItem item = CalledByList.SelectedItems[0] as CallItem;

            if (item != null)
            {
                Main.NavigatePanelTo(item.Node);
            }
        }
Exemple #2
0
        private void SubnodesView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (SubnodesView.SelectedItems.Count == 0)
            {
                return;
            }

            var selected = SubnodesView.SelectedItems[0] as SubnodeItem;

            Main.NavigatePanelTo(selected.Node);
        }