Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        private void OnSourceSelected(Source source, bool highlightUpTo)
        {
            FileWindow window = ShowFileWindow(source.FileName);

            window.FileView.Highlight(source, highlightUpTo);
        }
Esempio n. 4
0
 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;
 }