Exemple #1
0
 public static ConsoleWindow GetConsole(ExecutionEnvironment enviroment)
 {
     if (!enviroment.HasValue("#$Console$#"))
     {
         Application.Current.Dispatcher.Invoke(() =>
         {
             consoleWindow       = new ConsoleWindow();
             consoleWindow.Owner = Application.Current.MainWindow;
             consoleWindow.Show();
         });
         enviroment.GetBaseEnvironment().RegisterValue("#$Console$#", consoleWindow);
     }
     else
     {
         consoleWindow = enviroment.GetValue("#$Console$#") as ConsoleWindow;
     }
     return(consoleWindow);
 }
Exemple #2
0
        public static ConsoleWindow GetConsole(ExecutionEnvironment enviroment)
        {
            ConsoleWindow wnd = null;

            if (!enviroment.HasValue("#$Console$#"))
            {
                Application.Current.Dispatcher.Invoke(() =>
                {
                    wnd       = new ConsoleWindow();
                    wnd.Owner = Application.Current.MainWindow;
                    wnd.Show();
                });
                enviroment.GetBaseEnvironment().RegisterValue("#$Console$#", wnd);
                ConsoleBaseStatement.consoleWindow = wnd;
            }
            else
            {
                wnd = enviroment.GetValue("#$Console$#") as ConsoleWindow;
            }
            return(wnd);
        }