public ConsoleWindowBackendAnalyzer()
        {
            preferredTerminal = ConfigurationManager.Instance.Get("general", "terminal", TerminalTypes.Termsharp);
#if EMUL8_PLATFORM_WINDOWS
            if (preferredTerminal != TerminalTypes.Termsharp)
            {
                Logger.LogAs(this, LogLevel.Warning, "Only >>Termsharp<< terminal is available on Windows - forcing to use it.");
            }
#endif
            if (preferredTerminal == TerminalTypes.Termsharp)
            {
                ApplicationExtensions.InvokeInUIThreadAndWait(() =>
                {
                    terminalWidget = new TerminalWidget(() => window.HasFocus);
                });
                IO = terminalWidget.IO;
            }
#if !EMUL8_PLATFORM_WINDOWS
            else
            {
                ptyUnixStream = new PtyUnixStream();
                IO            = new IOProvider(new StreamIOSource(ptyUnixStream));
            }
#endif
        }
Beispiel #2
0
 // this constructor is needed by the monitor; do not remove it
 public UARTWindowBackendAnalyzer()
 {
     preferredTerminal = ConfigurationManager.Instance.Get("general", "terminal", TerminalTypes.XTerm);
     if (preferredTerminal == TerminalTypes.Termsharp)
     {
         terminalWidget = new TerminalWidget();
         IO             = terminalWidget.IO;
     }
     else
     {
         var stream = new PtyUnixStream();
         IO = new DetachableIO(new StreamIOSource(stream, stream.Name));
     }
 }