public static void fShowResult(OutToken _oOut) { string _sOut = _oOut.sOut; CppCmd _oCmd = _oOut.oFrom; if (Data.bNowBuilding) { if (fManageMessages(_oCmd, _sOut)) { return; } if (_oOut.eType == OutType.Undefined) { Output.TraceUndefined(_sOut); return; } if (_oOut.eType == OutType.Warning) { Output.TraceWarningLite(_sOut); return; } if (_oOut.eType == OutType.Error) { Output.TraceErrorLite(_sOut); return; } //Add color manually if (_sOut.Length > 8) { if (_sOut[7] == ':') //no color by default { bool bFound = false; string _sCmd = _sOut.Substring(0, 7).ToLower(); switch (_sCmd) { case "warning": bFound = true; Output.TraceWarning(_sOut); break; } } } string _sResult = Output.Trace(_sOut, true); /* * if( Data.oMainForm != null) { * Data.oMainForm.fAddItem(_sResult); * }*/ } }
public static void fCompilerError(string _sResult, string _sArg, uint _nMyTicket, bool _bStdError = false, CppCmd _oCmd = null) { //Direct show if current lock (oLockTicket) { _oCmd.sLaunchCmdResult += _sResult + "\n"; if (_oCmd.sCloseWhen != "") { if (_sResult.IndexOf(_oCmd.sCloseWhen) != -1) { if (_oCmd.oCurrProcess != null && !_oCmd.oCurrProcess.HasExited) { _oCmd.oCurrProcess.Kill(); } } } if (_oCmd != null && _oCmd.oToInputProcess != null) { _oCmd.oToInputProcess.StandardInput.WriteLine(_sResult); // _oCmd.oToInputProcess.StandardInput.Write(_sResult + "\n"); _oCmd.oToInputProcess.Refresh(); Console.WriteLine("R:" + _sResult); return; } sProcOutputRetrun += " " + _sResult; if (!(Base.bAlive && Data.bNowBuilding)) { return; } if (nCurrentTicket == _nMyTicket) //Direct show to not wait ending compilation { fShowProcOutput(_oCmd); } if (_bStdError) { if (fFindValidKeyWord(_sResult, "error") != -1) //Generiquer error check!? { nError++; if (_nMyTicket < nErrorTicket || nErrorTicket == -1) { nErrorTicket = (int)_nMyTicket; } } } if (aOutput != null) { OutToken _oOut = new OutToken(); _oOut.oFrom = _oCmd; _oOut.sOut = _sResult; if (_sResult.IndexOf("undefined reference to") != -1) { _oOut.eType = OutType.Undefined; } if (fFindValidKeyWord(_sResult, "error") != -1) { _oOut.eType = OutType.Error; } if (fFindValidKeyWord(_sResult, "warning") != -1) { _oOut.eType = OutType.Warning; } aOutput.Add(_oOut); } if (nCurrentTicket == _nMyTicket) //Direct show to not wait ending compilation { fShowProcOutput(_oCmd); } } }
public static void fShowProcOutputString(OutToken _oOut) { fShowSendedCmd(_oOut.oFrom); fShowResult(_oOut); }