Esempio n. 1
0
        private void menuItem_ToggleBreakpoint(object sender, System.EventArgs e)
        {
            ToolStripDropDownItem tsdi = (sender as ToolStripDropDownItem);

            CodeViewTab.ListLine lst = ItemFromPoint(tsdi.Owner.Location);

            if (lst != null)
            {
                _JM.Breakpoints.Toggle(lst.Address);
                this.Invalidate();
            }
        }
Esempio n. 2
0
        ////toggle the breakpoint setting at the specified line
        //private void doubleClick(CodeViewTab.lstLine lst)
        //{
        //    //if in error mode, do nothing
        //    if (_parent.Errors) return;

        //    //and if a valid code line, toggle the breakpoint flag
        //    if (lst.Valid)
        //    {
        //        //lst.BreakPoint = !lst.BreakPoint;
        //        _parent.JM.ToggleBreakpoint(lst.Address);
        //        this.Invalidate();
        //    }//if
        //}

        //toggle the breakpoint setting at the specified line
        private void doubleClick(int line)
        {
            //if in error mode, do nothing
            if (_parent.Errors)
            {
                return;
            }

            //get the data item at the line
            CodeViewTab.ListLine lst = this.Items[line] as CodeViewTab.ListLine;

            //and if a valid code line, toggle the breakpoint flag
            if (lst.Valid)
            {
                _parent.JM.Breakpoints.Toggle(lst.Address);
                this.Invalidate();
            }//if
        }
Esempio n. 3
0
        private void contextMenuStrip1_Opening(object sender, CancelEventArgs e)
        {
            ContextMenuStrip cms = (ContextMenuStrip)sender;

            cms.Items.Clear();

            ToolStripMenuItem toggleItem = new ToolStripMenuItem("&Toggle Breakpoint", null, this.menuItem_ToggleBreakpoint);

            toggleItem.Enabled = false;

            CodeViewTab.ListLine lst = ItemFromPoint(Control.MousePosition);
            if (lst != null && lst.Valid)
            {
                toggleItem.Enabled = true;
            }

            cms.Items.Add(toggleItem);
            _graphicElements.Popup(cms, true);
        }