/// <summary> /// /// </summary> private void GotoCurrentLocation(bool bSetMarker) { if ((PluginBase.MainForm as Form).InvokeRequired) { (PluginBase.MainForm as Form).BeginInvoke(new Action <bool>(GotoCurrentLocation), bSetMarker); return; } if (CurrentLocation != null && CurrentLocation.getFile() != null) { String localPath = GetLocalPath(CurrentLocation.getFile()); if (localPath != null) { int line = CurrentLocation.getLine() - 1; ScintillaControl sci = ScintillaHelper.ActivateDocument(localPath, line, false); if (sci == null) { return; } if (bSetMarker) { sci.MarkerAdd(line, ScintillaHelper.markerCurrentLine); } } } }
void dgv_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } if (dgv.Rows[e.RowIndex].Cells["Line"].ColumnIndex == e.ColumnIndex) { string filename = (string)dgv.Rows[e.RowIndex].Cells["FilePath"].Value; int line = int.Parse((string)dgv.Rows[e.RowIndex].Cells["Line"].Value); ScintillaHelper.ActivateDocument(filename, line - 1, true); } }
private void GotoSourceClick(Object sender, EventArgs e) { var frame = ((ListItemData)lv.SelectedItems[0].Tag).Frame; if (frame == null) { return; } string file = PluginMain.debugManager.GetLocalPath(frame.getLocation().getFile()); if (file == null) { return; } ScintillaHelper.ActivateDocument(file, frame.getLocation().getLine() - 1, false); }