Пример #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);
 }