private void openValueInNewLocalsWatchesWindowToolStripControlTreeMenuItem_Click(object sender, EventArgs e)
 {
     if (tvControlTree.SelectedNode != null)
     {
         var          node = ((ControlTreeNode)tvControlTree.SelectedNode);
         object       c    = node.Object;
         LocalsWindow dlg  = new LocalsWindow(node.GetName(), c);
         dlg.FormClosed += (s, ev) => dlg.Dispose();
         dlg.Show();
     }
 }
        private void openValueInNewLocalsWatchesWindowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var n = tree.FocusedNode;

            if (n is MemberNode)
            {
                object val = ((MemberNode)n).Object;

                var member = ((MemberNode)n).Member;
                if (member != null)
                {
                    LocalsWindow dlg = new LocalsWindow(member.GetName(true), val);
                    dlg.FormClosed += (s, ev) => dlg.Dispose();
                    dlg.Show();
                }
            }
        }