Ejemplo n.º 1
0
 private void btnEditBreak_Click(object sender, EventArgs e)
 {
     if (lstBreak.SelectedIndex != -1)
     {
         Breakpoint bp;
         bp.enabled   = true;
         bp.type      = 0;
         bp.smallAddr = 0;
         bp.largeAddr = 0;
         bp.listIndex = -1;
         int oldLoc = -1;
         for (int i = 0; i < breakpointsList.Count; i++)
         {
             if (breakpointsList[i].listIndex == lstBreak.SelectedIndex)
             {
                 oldLoc = i;
                 break;
             }
         }
         bp = breakpointsList[oldLoc];
         AddBreakpoint addBreak = new AddBreakpoint(bp.enabled, bp.type, bp.smallAddr, bp.largeAddr);
         if (addBreak.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             breakpointsList.RemoveAt(oldLoc);
             Breakpoint newBreak;
             newBreak.enabled   = addBreak.enabled;
             newBreak.type      = addBreak.type;
             newBreak.smallAddr = Math.Min(addBreak.break1, addBreak.break2);
             newBreak.largeAddr = Math.Max(addBreak.break1, addBreak.break2);
             newBreak.listIndex = -1;
             breakpointsList.Add(newBreak);
             UpdateBreakpoints();
         }
     }
 }
Ejemplo n.º 2
0
 private void btnAddBreak_Click(object sender, EventArgs e)
 {
     AddBreakpoint addBreak = new AddBreakpoint();
     if (addBreak.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         Breakpoint newBreak;
         newBreak.enabled = addBreak.enabled;
         newBreak.type = addBreak.type;
         newBreak.smallAddr = Math.Min(addBreak.break1, addBreak.break2);
         newBreak.largeAddr = Math.Max(addBreak.break1, addBreak.break2);
         newBreak.listIndex = -1;
         breakpointsList.Add(newBreak);
         UpdateBreakpoints();
     }
 }
Ejemplo n.º 3
0
        private void btnAddBreak_Click(object sender, EventArgs e)
        {
            AddBreakpoint addBreak = new AddBreakpoint();

            if (addBreak.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                Breakpoint newBreak;
                newBreak.enabled   = addBreak.enabled;
                newBreak.type      = addBreak.type;
                newBreak.smallAddr = Math.Min(addBreak.break1, addBreak.break2);
                newBreak.largeAddr = Math.Max(addBreak.break1, addBreak.break2);
                newBreak.listIndex = -1;
                breakpointsList.Add(newBreak);
                UpdateBreakpoints();
            }
        }
Ejemplo n.º 4
0
 private void btnEditBreak_Click(object sender, EventArgs e)
 {
     if (lstBreak.SelectedIndex != -1)
     {
         Breakpoint bp;
         bp.enabled = true;
         bp.type = 0;
         bp.smallAddr = 0;
         bp.largeAddr = 0;
         bp.listIndex = -1;
         int oldLoc = -1;
         for (int i = 0; i < breakpointsList.Count; i++)
         {
             if (breakpointsList[i].listIndex == lstBreak.SelectedIndex)
             {
                 oldLoc = i;
                 break;
             }
         }
         bp = breakpointsList[oldLoc];
         AddBreakpoint addBreak = new AddBreakpoint(bp.enabled, bp.type, bp.smallAddr, bp.largeAddr);
         if (addBreak.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             breakpointsList.RemoveAt(oldLoc);
             Breakpoint newBreak;
             newBreak.enabled = addBreak.enabled;
             newBreak.type = addBreak.type;
             newBreak.smallAddr = Math.Min(addBreak.break1, addBreak.break2);
             newBreak.largeAddr = Math.Max(addBreak.break1, addBreak.break2);
             newBreak.listIndex = -1;
             breakpointsList.Add(newBreak);
             UpdateBreakpoints();
         }
     }
 }