Пример #1
0
 private void WriteError(string message)
 {
     if (WpfConsole != null)
     {
         WpfConsole.Write(message + Environment.NewLine);
     }
 }
Пример #2
0
            protected Tuple <bool, bool> Process(InputLine inputLine)
            {
                if (inputLine.Flags.HasFlag(InputLineFlag.Echo))
                {
                    WpfConsole.BeginInputLine();

                    if (inputLine.Flags.HasFlag(InputLineFlag.Execute))
                    {
                        WpfConsole.WriteLine(inputLine.Text);
                    }
                    else
                    {
                        WpfConsole.Write(inputLine.Text);
                    }
                }

                if (inputLine.Flags.HasFlag(InputLineFlag.Execute))
                {
                    string command    = inputLine.Text;
                    bool   isExecuted = WpfConsole.Host.Execute(WpfConsole, command);
                    WpfConsole.InputHistory.Add(command);
                    return(Tuple.Create(true, isExecuted));
                }
                return(Tuple.Create(false, false));
            }
Пример #3
0
 protected void PromptNewLine()
 {
     WpfConsole.Write(WpfConsole.Host.Prompt + (char)32); // 32 is the space
     WpfConsole.BeginInputLine();
 }