protected override void OnClosed(EventArgs e) {
            _breakPointsDock = null;

            DebugDataPool.LoadBreakPointsHandler -= setDataGrid;
            DebugDataPool.AddBreakPointHandler -= addBreakPoint;
            DebugDataPool.RemoveBreakPointHandler -= removeBreakPoint;

            base.OnClosed(e);
        }
        protected override void OnClosed(EventArgs e)
        {
            _breakPointsDock = null;

            DebugDataPool.LoadBreakPointsHandler  -= setDataGrid;
            DebugDataPool.AddBreakPointHandler    -= addBreakPoint;
            DebugDataPool.RemoveBreakPointHandler -= removeBreakPoint;

            base.OnClosed(e);
        }
        internal static void Inspect() {
            if (_breakPointsDock == null) {
                _breakPointsDock = new BreakPointsDock();
                _breakPointsDock.Show(MainWindow.Instance.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.DockBottom);

            } else {
                _breakPointsDock.Show();
            }

            _breakPointsDock.setDataGrid();
        }
        internal static void Inspect()
        {
            if (_breakPointsDock == null)
            {
                _breakPointsDock = new BreakPointsDock();
                _breakPointsDock.Show(MainWindow.Instance.DockPanel, WeifenLuo.WinFormsUI.Docking.DockState.DockBottom);
            }
            else
            {
                _breakPointsDock.Show();
            }

            _breakPointsDock.setDataGrid();
        }
        public BreakPointsDock() {
            _breakPointsDock = this;

            InitializeComponent();

            this.TabText = this.Text;

            initDataGrid();

            dataGridView.CurrentCellDirtyStateChanged += new EventHandler(dataGridView_CurrentCellDirtyStateChanged);
            dataGridView.CellValueChanged += new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
            dataGridView.CellMouseUp += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseUp);
            dataGridView.CellDoubleClick += new DataGridViewCellEventHandler(dataGridView_CellDoubleClick);

            DebugDataPool.LoadBreakPointsHandler += new DebugDataPool.LoadBreakPointsDelegate(setDataGrid);
            DebugDataPool.AddBreakPointHandler += new DebugDataPool.AddBreakPointDelegate(addBreakPoint);
            DebugDataPool.RemoveBreakPointHandler += new DebugDataPool.RemoveBreakPointDelegate(removeBreakPoint);
        }
        public BreakPointsDock()
        {
            _breakPointsDock = this;

            InitializeComponent();

            this.TabText = this.Text;

            initDataGrid();

            dataGridView.CurrentCellDirtyStateChanged += new EventHandler(dataGridView_CurrentCellDirtyStateChanged);
            dataGridView.CellValueChanged             += new DataGridViewCellEventHandler(dataGridView_CellValueChanged);
            dataGridView.CellMouseUp     += new DataGridViewCellMouseEventHandler(dataGridView_CellMouseUp);
            dataGridView.CellDoubleClick += new DataGridViewCellEventHandler(dataGridView_CellDoubleClick);

            DebugDataPool.LoadBreakPointsHandler  += new DebugDataPool.LoadBreakPointsDelegate(setDataGrid);
            DebugDataPool.AddBreakPointHandler    += new DebugDataPool.AddBreakPointDelegate(addBreakPoint);
            DebugDataPool.RemoveBreakPointHandler += new DebugDataPool.RemoveBreakPointDelegate(removeBreakPoint);
        }