From 2be41dd08b7758ec74b7fc32c12788464dc2226e Mon Sep 17 00:00:00 2001 From: Brandon Pina Date: Sun, 27 Sep 2020 13:45:34 -0500 Subject: [PATCH] Remove rtbConsole --- vmaf-gui/Form1.Designer.cs | 23 +++-------------------- vmaf-gui/Form1.cs | 16 +++++----------- 2 files changed, 8 insertions(+), 31 deletions(-) diff --git a/vmaf-gui/Form1.Designer.cs b/vmaf-gui/Form1.Designer.cs index b5ce68e..3ea8a0c 100644 --- a/vmaf-gui/Form1.Designer.cs +++ b/vmaf-gui/Form1.Designer.cs @@ -46,7 +46,6 @@ private void InitializeComponent() this.lblProgress = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.cmbModel = new System.Windows.Forms.ComboBox(); - this.rtbConsole = new System.Windows.Forms.RichTextBox(); ((System.ComponentModel.ISupportInitialize)(this.vmafLogo)).BeginInit(); this.grpFiles.SuspendLayout(); this.SuspendLayout(); @@ -151,10 +150,6 @@ private void InitializeComponent() this.chkSSIM.TabIndex = 8; this.chkSSIM.Text = "Use SSIM"; this.chkSSIM.UseVisualStyleBackColor = true; - // - // backgroundWorker1 - // -// this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork); // // cmbResolution // @@ -211,23 +206,12 @@ private void InitializeComponent() this.cmbModel.Size = new System.Drawing.Size(177, 21); this.cmbModel.TabIndex = 13; // - // rtbConsole - // - this.rtbConsole.BackColor = System.Drawing.SystemColors.MenuText; - this.rtbConsole.ForeColor = System.Drawing.SystemColors.Window; - this.rtbConsole.Location = new System.Drawing.Point(291, 12); - this.rtbConsole.Name = "rtbConsole"; - this.rtbConsole.Size = new System.Drawing.Size(340, 387); - this.rtbConsole.TabIndex = 15; - this.rtbConsole.Text = ""; - // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSize = true; - this.ClientSize = new System.Drawing.Size(651, 420); - this.Controls.Add(this.rtbConsole); + this.ClientSize = new System.Drawing.Size(305, 420); this.Controls.Add(this.label2); this.Controls.Add(this.cmbModel); this.Controls.Add(this.lblProgress); @@ -239,8 +223,8 @@ private void InitializeComponent() this.Controls.Add(this.button1); this.Controls.Add(this.grpFiles); this.Controls.Add(this.vmafLogo); - this.MaximumSize = new System.Drawing.Size(667, 459); - this.MinimumSize = new System.Drawing.Size(667, 459); + this.MaximumSize = new System.Drawing.Size(321, 459); + this.MinimumSize = new System.Drawing.Size(321, 459); this.Name = "Form1"; this.Text = "VMAF-GUI"; this.Load += new System.EventHandler(this.Form1_Load); @@ -272,7 +256,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblProgress; private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox cmbModel; - private System.Windows.Forms.RichTextBox rtbConsole; } } diff --git a/vmaf-gui/Form1.cs b/vmaf-gui/Form1.cs index 31def5d..27123a8 100644 --- a/vmaf-gui/Form1.cs +++ b/vmaf-gui/Form1.cs @@ -29,7 +29,6 @@ string ChildProcess(string program_name, string args, bool show) var p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; - p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = !show; p.StartInfo.FileName = program_name; p.StartInfo.Arguments = args; @@ -40,7 +39,7 @@ string ChildProcess(string program_name, string args, bool show) // p.standardoutput is an input stream //string output = p.StandardOutput.ReadToEnd(); string output = ""; - + /* while ((line = p.StandardOutput.ReadLine()) != null) @@ -50,17 +49,12 @@ string ChildProcess(string program_name, string args, bool show) }*/ //rtbConsole.Text += output; - - while (!p.HasExited) - { - rtbConsole.Text += "\n\n" + program_name + " " + args + "\n"; - rtbConsole.Text += p.StandardOutput.ReadToEnd(); - prgProgress.PerformStep(); - System.Windows.Forms.Application.DoEvents(); - } - // p.WaitForExit(); + Console.WriteLine(program_name); + Console.WriteLine(args); + p.WaitForExit(); + prgProgress.PerformStep(); return output; }