public async Task <int> RunInOutputPadAsync(IOutputCategory outputCategory, string program, params string[] arguments)
        {
            RedirectStandardOutputAndErrorToSingleStream = true;
            Start(program, arguments);
            StringBuilder printedCommandLine = new StringBuilder();

            if (WorkingDirectory != null)
            {
                printedCommandLine.Append(WorkingDirectory);
                printedCommandLine.Append("> ");
            }
            printedCommandLine.Append(CommandLine);
            outputCategory.AppendLine(printedCommandLine.ToString());

            using (TextReader reader = OpenStandardOutputReader()) {
                await reader.CopyToAsync(new MessageViewCategoryTextWriter(outputCategory));
            }
            await WaitForExitAsync();

            outputCategory.AppendLine(StringParser.Parse("${res:XML.MainMenu.ToolMenu.ExternalTools.ExitedWithCode} " + this.ExitCode));
            return(this.ExitCode);
        }
Example #2
0
 public void ReportMessage(RichText message)
 {
     messageView.AppendLine(message);
 }
Example #3
0
		public async Task<int> RunInOutputPadAsync(IOutputCategory outputCategory, string program, params string[] arguments)
		{
			RedirectStandardOutputAndErrorToSingleStream = true;
			Start(program, arguments);
			StringBuilder printedCommandLine = new StringBuilder();
			if (WorkingDirectory != null) {
				printedCommandLine.Append(WorkingDirectory);
				printedCommandLine.Append("> ");
			}
			printedCommandLine.Append(CommandLine);
			outputCategory.AppendLine(printedCommandLine.ToString());
			
			using (TextReader reader = OpenStandardOutputReader()) {
				await reader.CopyToAsync(new MessageViewCategoryTextWriter(outputCategory));
			}
			await WaitForExitAsync();
			outputCategory.AppendLine(StringParser.Parse("${res:XML.MainMenu.ToolMenu.ExternalTools.ExitedWithCode} " + this.ExitCode));
			return this.ExitCode;
		}
 public virtual void WriteToOutputPad(IOutputCategory category)
 {
     category.AppendLine(this.Message);
 }
 public virtual void WriteToOutputPad(IOutputCategory category)
 {
     category.AppendLine(this.Message);
 }