private void OpenSourceFile(string FileName) { SourceView theSourceView; if (File.Exists(FileName)) { if (mSourceFiles.TryGetValue(FileName, out theSourceView)) { Rehighlight(theSourceView); } else { theSourceView = new SourceView(Path.GetFileName(FileName)); mSourceFiles[FileName] = theSourceView; theSourceView.SourceFile = FileName; Rehighlight(theSourceView); theSourceView.Show(dockPanel); } } }
void Rehighlight(SourceView vw) { vw.ClearHighlight(); vw.AddHighlight(mCurrentLine, Color.SteelBlue, Color.White); vw.ScrollTo(mCurrentLine); }
private void OpenSourceFile(string FileName) { SourceView theSourceView; if (File.Exists(FileName)) { if (mSourceFiles.TryGetValue(FileName, out theSourceView)) Rehighlight(theSourceView); else { theSourceView = new SourceView(Path.GetFileName(FileName)); mSourceFiles[FileName] = theSourceView; theSourceView.SourceFile = FileName; Rehighlight(theSourceView); theSourceView.Show(dockPanel); } } }