Пример #1
0
 // Called whenever the user selects a node in the tree.  If the
 // node contains any useful information, we display it in the
 // Info Pane.
 private void _on_tree_node_select(Object sender, TreeViewEventArgs e)
 {
     if (e.Node is DisplayableNode)
     {
         DisplayableNode dn = (DisplayableNode)e.Node;
         Control         c  = dn.Display();
         _set_infopanel(c);
     }
 }
Пример #2
0
        // Update the display with information retrieved from ``dn''.
        public void Display(DisplayableNode dn)
        {
            if (!(dn is AssemblyNode))
            {
                throw new Exception("internal error: expected AssemblyNode");
            }
            AssemblyNode an = (AssemblyNode)dn;

            m_modules.Items.Clear();

            try
            {
                an.Assembly.AppDomain.Stop(5000);

                foreach (NameValueInfo nv in s_values)
                {
                    nv.Value.Text = nv.Update(an);

                    // make text left-aligned in the textbox.
                    if (nv.Value is TextBoxBase)
                    {
                        ((TextBoxBase)nv.Value).SelectionLength = 0;
                    }
                }

                foreach (DebuggedModule dm in an.Assembly.Modules)
                {
                    m_modules.Items.Add(new ListViewItem(dm.Name));
                }

                an.Assembly.AppDomain.Continue(false);
            }
            catch
            {
                m_modules.Items.Add(new ListViewItem("error viewing module"));
                if (!an.Assembly.AppDomain.IsRunning())
                {
                    an.Assembly.AppDomain.Continue(false);
                }
            }

            m_modules.Columns[0].Width = m_modules.ClientSize.Width;
        }
Пример #3
0
        // Update the display with information retrieved from ``dn''.
        public void Display(DisplayableNode dn)
        {
            if (!(dn is AppDomainNode))
            {
                throw new Exception("internal error: expected AppDomainNode");
            }
            AppDomainNode an = (AppDomainNode)dn;

            try
            {
                // process needs to be synchronized in order to view modules
                an.AppDomain.Stop(5000);

                foreach (NameValueInfo nv in s_values)
                {
                    nv.Value.Text = nv.Update(an);

                    // make text left-aligned in the textbox.
                    if (nv.Value is TextBoxBase)
                    {
                        ((TextBoxBase)nv.Value).SelectionLength = 0;
                    }
                }

                _update_assemblies(an.AppDomain);
                _update_breakpoints(an.AppDomain);
                _update_steppers(an.AppDomain);

                an.AppDomain.Continue(false);
            }
            catch
            {
                if (!an.AppDomain.IsRunning())
                {
                    an.AppDomain.Continue(false);
                }
            }
        }
Пример #4
0
        // Update the display with information retrieved from ``dn''.
        public void Display(DisplayableNode dn)
        {
            if (!(dn is ProcessNode))
            {
                throw new Exception("internal error: expected ProcessNode");
            }
            ProcessNode pn = (ProcessNode)dn;

            try
            {
                // process needs to be synchronized in order to view modules
                pn.Process.Stop(5000);
                foreach (NameValueInfo nv in s_values)
                {
                    nv.Value.Text = nv.Update(dn);

                    // make text left-aligned in the textbox.
                    if (nv.Value is TextBoxBase)
                    {
                        ((TextBoxBase)nv.Value).SelectionLength = 0;
                    }
                }

                _update_appdomains(pn.Process);
                _update_objects(pn.Process);

                pn.Process.Continue(false);
            }
            catch
            {
                if (!pn.Process.IsRunning())
                {
                    pn.Process.Continue(false);
                }
            }
        }