/// <summary> /// Process a input line. /// </summary> /// <param name="inputLine"></param> protected Tuple <bool, bool> Process(InputLine inputLine) { SnapshotSpan inputSpan = inputLine.SnapshotSpan; if (inputLine.Flags.HasFlag(InputLineFlag.Echo)) { WpfConsole.BeginInputLine(); if (inputLine.Flags.HasFlag(InputLineFlag.Execute)) { WpfConsole.WriteLine(inputLine.Text); inputSpan = WpfConsole.EndInputLine(true).Value; } else { WpfConsole.Write(inputLine.Text); } } if (inputLine.Flags.HasFlag(InputLineFlag.Execute)) { string command = inputLine.Text; bool isExecuted = WpfConsole.Host.Execute(WpfConsole, command, null); WpfConsole.InputHistory.Add(command); ParentDispatcher.OnExecute(inputSpan, isExecuted); return(Tuple.Create(true, isExecuted)); } return(Tuple.Create(false, false)); }
public void AcceptKeyInput() { Debug.Assert(_dispatcher != null); if (_dispatcher != null && WpfConsole != null) { WpfConsole.BeginInputLine(); } }
protected void PromptNewLine() { WpfConsole.Write(WpfConsole.Host.Prompt + (char)32); // 32 is the space WpfConsole.BeginInputLine(); }