Exemplo n.º 1
0
        public void Run()
        {
            ResultsWindow.Open();

            var lineNumber = 1;
            var builder    = new StringBuilder();

            foreach (var line in _editor.Text.Split(new [] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                if (line.Trim().Length == 0)
                {
                    continue;
                }

                try
                {
                    builder.AppendLine(_parser.ProgrammaticallyParse(line).ToString(CultureInfo.InvariantCulture));
                }
                catch (Exception e)
                {
                    builder.AppendLine("ERROR (Line " + lineNumber + ") : " + e.Message);
                }

                lineNumber++;
            }

            ResultsWindow.Instance.Results.Text = builder.ToString();
        }
        public static void Open()
        {
            if (Instance != null)
            {
                return;
            }

            Instance = new ResultsWindow();
            Instance.Show();
        }
Exemplo n.º 3
0
 private void ResultsWindow_OnClick(object sender, RoutedEventArgs e)
 {
     ResultsWindow.Open();
 }
 private void ResultsWindow_OnClosed(object sender, EventArgs e)
 {
     Instance = null;
 }
Exemplo n.º 5
0
 private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
 {
     ResultsWindow.Open();
 }