示例#1
0
        public void AppendOutput(string text, bool newLine = false)
        {
            EventHandler <OutputAvailableEventArgs> handler = OnOutput;

            if (handler != null)
            {
                OutputAvailableEventArgs args = new OutputAvailableEventArgs(text +
                                                                             (newLine ? Environment.NewLine : string.Empty));
                handler(this, args);
            }
        }
示例#2
0
        public bool AppendData(string text, bool newLine = false)
        {
            EventHandler <OutputAvailableEventArgs> handler = OnData;

            if (handler != null)
            {
                OutputAvailableEventArgs args = new OutputAvailableEventArgs(text +
                                                                             (newLine ? Environment.NewLine : string.Empty));
                handler(this, args);
                return(true);
            }
            return(false);
        }
示例#3
0
 static void Print(object sender, OutputAvailableEventArgs e)
 {
     Console.Write(e.Output);
     s_PrintingCompleted = true;
 }
示例#4
0
 static void Print(object sender, OutputAvailableEventArgs e)
 {
     Console.Write(e.Output);
 }