示例#1
0
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right)
            {
                return;
            }

            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }

            var row = dataGridView1.Rows[e.RowIndex].DataBoundItem as BreakPointEntry;

            breakPointEntry = row;

            var relativeMousePosition = dataGridView1.PointToClient(Cursor.Position);

            MenuItem menu = new MenuItem(row.Name);

            menu.Enabled = false;
            ContextMenu m = new ContextMenu();

            m.MenuItems.Add(menu);
            m.MenuItems.Add(new MenuItem("Copy to &Clipboard", new EventHandler(MenuItem3_Click)));
            m.MenuItems.Add(new MenuItem("&Delete breakpoint", new EventHandler(MenuItem1_Click)));
            m.Show(dataGridView1, relativeMousePosition);
        }
示例#2
0
        public void AddBreakPoint(string name, ulong address)
        {
            var breakpoint = new BreakPointEntry(name, address, true);

            breakpoints.Add(breakpoint);

            SimCPU.Monitor.AddBreakPoint(address);
        }
示例#3
0
        public void AddBreakPoint(string name, ulong address)
        {
            var breakpoint = new BreakPointEntry(name, address, true);

            breakpoints.Add(breakpoint);

            SimCPU.Monitor.AddBreakPoint(address);
        }
示例#4
0
        private void dataGridView1_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right)
                return;

            if (e.RowIndex < 0 || e.ColumnIndex < 0)
                return;

            var row = dataGridView1.Rows[e.RowIndex].DataBoundItem as BreakPointEntry;

            breakPointEntry = row;

            var relativeMousePosition = dataGridView1.PointToClient(Cursor.Position);

            MenuItem menu = new MenuItem(row.Name);
            menu.Enabled = false;
            ContextMenu m = new ContextMenu();
            m.MenuItems.Add(menu);
            m.MenuItems.Add(new MenuItem("Copy to &Clipboard", new EventHandler(MenuItem3_Click)));
            m.MenuItems.Add(new MenuItem("&Delete breakpoint", new EventHandler(MenuItem1_Click)));
            m.Show(dataGridView1, relativeMousePosition);
        }