Esempio n. 1
0
        private void InitialiseTerminal()
        {
            //console = new NativeConsole(false);
            terminal = new ConsoleApi.Terminal();
            terminal.Start(@"ping localhost", 126, 32);

            _ = Task.Run(CopyConsoleToWindow);
        }
Esempio n. 2
0
 static void Main(string[] args)
 {
     try
     {
         using (var terminal = new ConsoleApi.Terminal())
         {
             terminal.Start(@"ping localhost", 126, 32);
             _ = Task.Run(() => CopyPipeToOutput(terminal.Output));
             terminal.WaitToExit();
         }
     }
     catch (Exception e)
     {
         System.Console.Error.WriteLine(e.Message);
     }
 }