Esempio n. 1
0
        public static void fAppOutput(LaunchTool _oThis, string _sOut)
        {
            //       lock(Data.oLockOutPut) {

            if (_oThis.dOut != null)
            {
                _oThis.dOut(_oThis, _sOut);
            }
            else
            {
                /*
                 * if(_sOut.Length > 3 && _sOut[3] == '%') {
                 * Console.Write( "\r\r" + _sOut.Substring(4,_sOut.Length-4) );
                 * }else { */
                lock (Debug.oLockOutPut) {                                       //???
                    Debug.fTrace(_sOut);
                }
                // }
            }

            // }
        }
Esempio n. 2
0
        public void ReadStdOut()
        {
            string _sLine;

            if (oTool.dOut != null)
            {
                try {
                    while (!proc.HasExited)
                    {
                        _sLine = proc.StandardOutput.ReadLine();

                        if (_sLine != "")
                        {
                            oTool.dOut(oTool, _sLine);
                        }
                        else
                        {
                            Thread.Sleep(1);
                        }
                    }
                } catch (Exception e) { Output.TraceError("Error: " + e.Message); }
            }
        }