/// <summary> /// /// </summary> private void ResetCurrentLocation() { if ((PluginBase.MainForm as Form).InvokeRequired) { (PluginBase.MainForm as Form).BeginInvoke((MethodInvoker) delegate() { ResetCurrentLocation(); }); return; } ScintillaControl sci; String localPath = CurrentFullFilePath; if (localPath != null) { sci = ScintillaHelper.GetScintillaControl(localPath); if (sci != null) { Int32 i = ScintillaHelper.GetScintillaControlIndex(sci); if (i != -1) { int line = (int)CurrentLocation.line; sci.MarkerDelete(line, ScintillaHelper.markerCurrentLine); } } } }
/// <summary> /// /// </summary> private void GotoCurrentLocation(bool bSetMarker) { if ((PluginBase.MainForm as Form).InvokeRequired) { (PluginBase.MainForm as Form).BeginInvoke((MethodInvoker) delegate() { GotoCurrentLocation(bSetMarker); }); return; } ScintillaControl sci; String localPath = CurrentFullFilePath; if (localPath != null) { sci = ScintillaHelper.GetScintillaControl(localPath); if (sci == null) { PluginBase.MainForm.OpenEditableDocument(localPath); sci = ScintillaHelper.GetScintillaControl(localPath); } if (sci != null) { Int32 i = ScintillaHelper.GetScintillaControlIndex(sci); if (i != -1) { PluginBase.MainForm.Documents[i].Activate(); int line = (int)CurrentLocation.line; sci.GotoLine(line); if (bSetMarker) { sci.MarkerAdd(line, ScintillaHelper.markerCurrentLine); } } } } }