Exemple #1
0
        private void TsbRemoveSelected_Click(object sender, EventArgs e)
        {
            if (dgv.SelectedCells.Count == 0)
            {
                return;
            }
            this.breakPointManager.ChangeBreakPointEvent -= breakPointManager_ChangeBreakPointEvent;
            var processedRows = new HashSet <DataGridViewRow>();

            foreach (DataGridViewCell selectedCell in dgv.SelectedCells)
            {
                var selected = selectedCell.OwningRow;
                if (processedRows.Contains(selected))
                {
                    continue;
                }
                processedRows.Add(selected);
                string          filefullpath = (string)selected.Cells["FilePath"].Value;
                int             line         = int.Parse((string)selected.Cells["Line"].Value) - 1;
                ITabbedDocument doc          = ScintillaHelper.GetDocument(filefullpath);
                if (doc != null)
                {
                    Boolean m = ScintillaHelper.IsMarkerSet(doc.SciControl, ScintillaHelper.markerBPDisabled, line);
                    doc.SciControl.MarkerDelete(line, m ? ScintillaHelper.markerBPDisabled : ScintillaHelper.markerBPEnabled);
                }
                else
                {
                    breakPointManager.SetBreakPointInfo(filefullpath, line, true, false);
                }
                dgv.Rows.Remove(selected);
            }
            this.breakPointManager.ChangeBreakPointEvent += breakPointManager_ChangeBreakPointEvent;
            breakPointManager.Save();
        }
Exemple #2
0
 /// <summary>
 /// Disposes the plugin
 /// </summary>
 public void Dispose()
 {
     SaveSettings();
     breakPointManager.Save();
     watchManager.Save();
     debugManager.Cleanup();
 }