Esempio n. 1
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);
        }
Esempio n. 2
0
 public void ReportMessage(RichText message)
 {
     messageView.AppendLine(message);
 }
Esempio n. 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);
 }