private FileWindow ShowFileWindow(string fileName) { FileWindow window; if (fileWindows.ContainsKey(fileName)) { window = fileWindows[fileName]; window.Present(); return(window); } window = new FileWindow(fileName); window.TransientFor = this; fileWindows[fileName] = window; window.ShowAll(); return(window); }
private void OnRuntimeError(Exception exception) { if (exception is ParseException) { Application.Invoke(delegate { ParseException parseException = (ParseException)exception; statusLabel.Text = parseException.Message; showingErrorInStatus = true; Source source = parseException.CodeSource; FileWindow window = ShowFileWindow(source.FileName); window.FileView.Highlight(source, true); }); } else { Console.Error.WriteLine(exception); } }
private void OnSourceSelected(Source source, bool highlightUpTo) { FileWindow window = ShowFileWindow(source.FileName); window.FileView.Highlight(source, highlightUpTo); }
private FileWindow ShowFileWindow(string fileName) { FileWindow window; if (fileWindows.ContainsKey(fileName)) { window = fileWindows[fileName]; window.Present(); return window; } window = new FileWindow(fileName); window.TransientFor = this; fileWindows[fileName] = window; window.ShowAll(); return window; }