예제 #1
0
        private void OnStdOutRead(string text)
        {
            string[] putText = { text };
            try
            {
                Invoke(PutStdOutText, putText);
            }
            catch (ObjectDisposedException)
            {
                manager.StopMonitoringProcessOutput();
                txtConsole.Enabled = true;
            }
            catch (Exception ex)
            {
                ErrorResult err = new ErrorResult();
                err.Message = ex.Message;
                StdErrResults.Add(err);

                DisplayErrors();

                StdErrResults.Clear();
            }
        }
예제 #2
0
        private void OnPutStdErrText(string text)
        {
            var error = new ErrorResult();
            if (text.StartsWith("Error:"))
            {
                error.Message = text;
            }
            else if (text.IndexOf(":") > -1)
            {
                var msgPattern = @"\s:\s(.+)";
                if (Regex.IsMatch(text, msgPattern))
                {
                    error.File = text.Substring(0, text.IndexOf(":"));
                    var sub = text.Substring(0, text.IndexOf(" : "));
                    error.Line = text.Substring(text.IndexOf(":") + 1, text.IndexOf(" : ") - sub.IndexOf(':'));
                    error.Message = Regex.Matches(text, msgPattern)[0].Groups[1].Value;
                }
            }
            else
                error.Message = text;

            StdErrResults.Add(error);

            DisplayErrors();
        }
예제 #3
0
        private void OnStdErrRead(string text)
        {
            try
            {
                Invoke(PutStdErrText, text);
            }
            catch (ObjectDisposedException)
            {
                manager.StopMonitoringProcessOutput();

                DisplayErrors();
            }
            catch (Exception ex)
            {
                ErrorResult err = new ErrorResult();
                err.Message = ex.Message;
                StdErrResults.Add(err);

                DisplayErrors();

                StdErrResults.Clear();
            }
        }
예제 #4
0
 private void CheckBuildConfigPath(string path)
 {
     try
     {
         if (File.Exists(path + "\\build.tsc"))
         {
             config = Json.Decode<List<BuildConfig>>(File.ReadAllText(path + "\\build.tsc"));
         }
     }
     catch (Exception ex)
     {
         var err = new ErrorResult();
         err.Message = ex.Message;
         StdErrResults.Add(err);
         DisplayErrors();
     }
 }