Пример #1
0
        void Debugger_OnInstructionChanged(object sender, Instruction instruction)
        {
            GridOpCode.CurrentCell = GridOpCode.Rows[instruction == null ? 0 : (int)instruction.Location.Index].Cells[3];
            Jumps.RefreshDynJumps(Debugger);

            GridOpCode.Refresh();
            GridAltStack.Refresh();
            GridStack.Refresh();
            Registers.Refresh();
        }
Пример #2
0
        void GridOpCode_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Right)
            {
                DataGridView.HitTestInfo hti = GridOpCode.HitTest(e.X, e.Y);
                GridOpCode.ClearSelection();
                if (hti.RowIndex < 0)
                {
                    return;
                }

                GridOpCode.Rows[hti.RowIndex].Selected = true;
            }
        }
Пример #3
0
        void UpdateDebugState()
        {
            int instruction = Debugger == null ? 0 : (int)Debugger.CurrentInstructionIndex;

            GridOpCode.Invalidate();
            Registers.Refresh();

            //GridOpCode.ClearSelection();
            //GridOpCode.Rows[(int)instructionIndex].Selected = true;
            GridOpCode.CurrentCell = GridOpCode.Rows[instruction].Cells[3];

            Jumps.RefreshDynJumps(Debugger);
            //Application.DoEvents();
        }
Пример #4
0
        /// <summary>
        /// Create breakpoint
        /// </summary>
        void GridOpCode_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Space)
            {
                e.Handled          = true;
                e.SuppressKeyPress = true;

                foreach (DataGridViewRow r in GridOpCode.SelectedRows)
                {
                    if (r.IsNewRow || r.DataBoundItem == null)
                    {
                        continue;
                    }

                    if (r.DataBoundItem is Instruction i)
                    {
                        i.BreakPoint = !i.BreakPoint;
                        GridOpCode.InvalidateRow(r.Index);
                    }
                }
            }
        }