Esempio n. 1
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));
            }
Esempio n. 2
0
 public void PostInputLine(InputLine inputLine)
 {
     if (dispatcher != null)
     {
         dispatcher.PostInputLine(inputLine);
     }
 }
Esempio n. 3
0
 public override void PostInputLine(InputLine inputLine)
 {
     IsExecuting = true;
     try
     {
         if (Process(inputLine).Item1)
         {
             PromptNewLine();
         }
     } finally
     {
         IsExecuting = false;
     }
 }
Esempio n. 4
0
 public abstract void PostInputLine(InputLine inputLine);
Esempio n. 5
0
 public void PostInputLine(InputLine inputLine)
 {
     if (dispatcher != null)
       {
     dispatcher.PostInputLine(inputLine);
       }
 }
Esempio n. 6
0
 public override void PostInputLine(InputLine inputLine)
 {
     IsExecuting = true;
     try
     {
       if (Process(inputLine).Item1)
       {
     PromptNewLine();
       }
     } finally
     {
       IsExecuting = false;
     }
 }
Esempio n. 7
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);
            }
Esempio n. 8
0
 public abstract void PostInputLine(InputLine inputLine);