diff --git a/ShareX.MediaLib/Forms/VideoConverterForm.Designer.cs b/ShareX.MediaLib/Forms/VideoConverterForm.Designer.cs index 713584464..8f2429408 100644 --- a/ShareX.MediaLib/Forms/VideoConverterForm.Designer.cs +++ b/ShareX.MediaLib/Forms/VideoConverterForm.Designer.cs @@ -44,6 +44,7 @@ private void InitializeComponent() this.lblCLI = new System.Windows.Forms.Label(); this.txtCLI = new System.Windows.Forms.TextBox(); this.lblVideoQualityUnit = new System.Windows.Forms.Label(); + this.pbProgress = new System.Windows.Forms.ProgressBar(); ((System.ComponentModel.ISupportInitialize)(this.nudVideoQuality)).BeginInit(); this.SuspendLayout(); // @@ -191,6 +192,15 @@ private void InitializeComponent() this.lblVideoQualityUnit.TabIndex = 15; this.lblVideoQualityUnit.Text = "CRF"; // + // pbProgress + // + this.pbProgress.Location = new System.Drawing.Point(16, 264); + this.pbProgress.MarqueeAnimationSpeed = 50; + this.pbProgress.Name = "pbProgress"; + this.pbProgress.Size = new System.Drawing.Size(424, 24); + this.pbProgress.Style = System.Windows.Forms.ProgressBarStyle.Marquee; + this.pbProgress.TabIndex = 16; + // // VideoConverterForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -213,6 +223,7 @@ private void InitializeComponent() this.Controls.Add(this.btnInputFilePathBrowse); this.Controls.Add(this.txtInputFilePath); this.Controls.Add(this.lblInputFilePath); + this.Controls.Add(this.pbProgress); this.Name = "VideoConverterForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "ShareX - Video converter"; @@ -240,5 +251,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblCLI; private System.Windows.Forms.TextBox txtCLI; private System.Windows.Forms.Label lblVideoQualityUnit; + private System.Windows.Forms.ProgressBar pbProgress; } } \ No newline at end of file diff --git a/ShareX.MediaLib/Forms/VideoConverterForm.cs b/ShareX.MediaLib/Forms/VideoConverterForm.cs index c879f8e08..90a2094bb 100644 --- a/ShareX.MediaLib/Forms/VideoConverterForm.cs +++ b/ShareX.MediaLib/Forms/VideoConverterForm.cs @@ -147,11 +147,15 @@ private void nudVideoQuality_ValueChanged(object sender, EventArgs e) private async void btnEncode_Click(object sender, EventArgs e) { - btnEncode.Enabled = false; + UpdateOptions(); + + pbProgress.Visible = true; + btnEncode.Visible = false; await StartEncodingAsync(); - btnEncode.Enabled = true; + btnEncode.Visible = true; + pbProgress.Visible = false; } } } \ No newline at end of file