public UserControlDebugger(LimnorDebugger debugger)
            : base()
        {
            _threadData = new Dictionary <int, ThreadDebug>();
            _debugger   = debugger;
            //
            miSetSelectedObject       = new fnOnObject(setSelectedObj);
            miShowBreakPointInMethod  = new fnShowBreakPointInMethod(showBreakPointInMethod);
            miClearBreakPointInMethod = new fnShowBreakPointInMethod(clearBreakPointInMethod);
            miShowActiveControl       = new fnOnControl(showActiveControl0);
            //
            InitializeComponent();
            //
            //
            _rootClassId = ClassPointer.CreateClassPointer(_debugger.Project, _debugger.RootXmlNode);
            _classId     = _rootClassId.ClassId;
            _rootClassId.LoadActions(_rootClassId);
            _methods  = _rootClassId.CustomMethods;
            _designer = new MethodDebugDesigner(_rootClassId, _debugger.Project);
            TreeNodeClassRoot r = treeView1.CreateClassRoot(true, _rootClassId, false);

            treeView1.Nodes.Add(r);
            treeView1.GotFocus += new EventHandler(treeView1_GotFocus);
            //
        }
        private void addNewTabPage(LimnorDebugger debugger)
        {
            UserControlDebugger c = new UserControlDebugger(debugger);
            TabPage             p = new TabPage();

            p.Text = debugger.ComponentName;
            p.Name = debugger.Key;
            c.Dock = DockStyle.Fill;
            p.Controls.Add(c);
            tabControl1.TabPages.Add(p);
        }
        public UserControlDebugger AddTab(LimnorDebugger debugger)
        {
            UserControlDebugger c = GetComponentDebugger(debugger);

            if (c == null)
            {
                this.Invoke(miAddNewTab, debugger);
                TabPage p = tabControl1.TabPages[debugger.Key];
                c = p.Controls[0] as UserControlDebugger;
            }
            return(c);
        }
 private UserControlDebugger GetComponentDebugger(LimnorDebugger debugger)
 {
     for (int i = 0; i < tabControl1.TabPages.Count; i++)
     {
         for (int j = 0; j < tabControl1.TabPages[i].Controls.Count; j++)
         {
             UserControlDebugger c = tabControl1.TabPages[i].Controls[j] as UserControlDebugger;
             if (c != null)
             {
                 if (c.ComponentFile == debugger.ComponentFile)
                 {
                     return(c);
                 }
             }
         }
     }
     return(null);
 }