diff --git a/BatchMerge.plugin/BatchMerge.plugin.csproj b/BatchMerge.plugin/BatchMerge.plugin.csproj
index 4309b33..42cc83c 100644
--- a/BatchMerge.plugin/BatchMerge.plugin.csproj
+++ b/BatchMerge.plugin/BatchMerge.plugin.csproj
@@ -59,6 +59,11 @@
PluginForm.cs
+
+ True
+ True
+ Resources.resx
+
@@ -69,6 +74,10 @@
PluginForm.cs
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
diff --git a/BatchMerge.plugin/BatchMergeItemForm.Designer.cs b/BatchMerge.plugin/BatchMergeItemForm.Designer.cs
index dd30b09..ea25206 100644
--- a/BatchMerge.plugin/BatchMergeItemForm.Designer.cs
+++ b/BatchMerge.plugin/BatchMergeItemForm.Designer.cs
@@ -36,10 +36,10 @@ private void InitializeComponent()
this.buttonDown = new System.Windows.Forms.Button();
this.buttonUp = new System.Windows.Forms.Button();
this.panelOutputSettings = new System.Windows.Forms.Panel();
- this.buttonBrowse = new System.Windows.Forms.Button();
- this.labelOutputName = new System.Windows.Forms.Label();
this.panelOutputFileName = new System.Windows.Forms.Panel();
this.textBoxOutput = new System.Windows.Forms.TextBox();
+ this.buttonBrowse = new System.Windows.Forms.Button();
+ this.labelOutputName = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panelOutputSettings.SuspendLayout();
@@ -54,7 +54,7 @@ private void InitializeComponent()
this.Files.Location = new System.Drawing.Point(8, 8);
this.Files.Name = "Files";
this.Files.ScrollAlwaysVisible = true;
- this.Files.Size = new System.Drawing.Size(357, 198);
+ this.Files.Size = new System.Drawing.Size(355, 193);
this.Files.TabIndex = 2;
this.Files.SelectedIndexChanged += new System.EventHandler(this.Files_SelectedIndexChanged);
//
@@ -66,7 +66,7 @@ private void InitializeComponent()
this.panel1.Location = new System.Drawing.Point(0, 52);
this.panel1.Name = "panel1";
this.panel1.Padding = new System.Windows.Forms.Padding(8, 8, 0, 8);
- this.panel1.Size = new System.Drawing.Size(365, 214);
+ this.panel1.Size = new System.Drawing.Size(363, 209);
this.panel1.TabIndex = 7;
//
// panel2
@@ -76,10 +76,10 @@ private void InitializeComponent()
this.panel2.Controls.Add(this.buttonDown);
this.panel2.Controls.Add(this.buttonUp);
this.panel2.Dock = System.Windows.Forms.DockStyle.Right;
- this.panel2.Location = new System.Drawing.Point(365, 52);
+ this.panel2.Location = new System.Drawing.Point(363, 52);
this.panel2.Name = "panel2";
this.panel2.Padding = new System.Windows.Forms.Padding(3, 8, 8, 8);
- this.panel2.Size = new System.Drawing.Size(111, 214);
+ this.panel2.Size = new System.Drawing.Size(111, 209);
this.panel2.TabIndex = 8;
//
// buttonDelete
@@ -137,16 +137,35 @@ private void InitializeComponent()
this.panelOutputSettings.Location = new System.Drawing.Point(0, 0);
this.panelOutputSettings.Name = "panelOutputSettings";
this.panelOutputSettings.Padding = new System.Windows.Forms.Padding(8);
- this.panelOutputSettings.Size = new System.Drawing.Size(476, 52);
+ this.panelOutputSettings.Size = new System.Drawing.Size(474, 52);
this.panelOutputSettings.TabIndex = 9;
//
+ // panelOutputFileName
+ //
+ this.panelOutputFileName.Controls.Add(this.textBoxOutput);
+ this.panelOutputFileName.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelOutputFileName.Location = new System.Drawing.Point(8, 21);
+ this.panelOutputFileName.Name = "panelOutputFileName";
+ this.panelOutputFileName.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0);
+ this.panelOutputFileName.Size = new System.Drawing.Size(358, 23);
+ this.panelOutputFileName.TabIndex = 13;
+ //
+ // textBoxOutput
+ //
+ this.textBoxOutput.Dock = System.Windows.Forms.DockStyle.Top;
+ this.textBoxOutput.Location = new System.Drawing.Point(0, 0);
+ this.textBoxOutput.Name = "textBoxOutput";
+ this.textBoxOutput.Size = new System.Drawing.Size(355, 22);
+ this.textBoxOutput.TabIndex = 12;
+ this.textBoxOutput.TextChanged += new System.EventHandler(this.textBoxOutput_TextChanged);
+ //
// buttonBrowse
//
this.buttonBrowse.BackColor = System.Drawing.Color.White;
this.buttonBrowse.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonBrowse.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.buttonBrowse.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.buttonBrowse.Location = new System.Drawing.Point(368, 21);
+ this.buttonBrowse.Location = new System.Drawing.Point(366, 21);
this.buttonBrowse.Name = "buttonBrowse";
this.buttonBrowse.Size = new System.Drawing.Size(100, 23);
this.buttonBrowse.TabIndex = 12;
@@ -165,30 +184,11 @@ private void InitializeComponent()
this.labelOutputName.TabIndex = 10;
this.labelOutputName.Text = "Output file name";
//
- // panelOutputFileName
- //
- this.panelOutputFileName.Controls.Add(this.textBoxOutput);
- this.panelOutputFileName.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panelOutputFileName.Location = new System.Drawing.Point(8, 21);
- this.panelOutputFileName.Name = "panelOutputFileName";
- this.panelOutputFileName.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0);
- this.panelOutputFileName.Size = new System.Drawing.Size(360, 23);
- this.panelOutputFileName.TabIndex = 13;
- //
- // textBoxOutput
- //
- this.textBoxOutput.Dock = System.Windows.Forms.DockStyle.Top;
- this.textBoxOutput.Location = new System.Drawing.Point(0, 0);
- this.textBoxOutput.Name = "textBoxOutput";
- this.textBoxOutput.Size = new System.Drawing.Size(357, 22);
- this.textBoxOutput.TabIndex = 12;
- this.textBoxOutput.TextChanged += new System.EventHandler(this.textBoxOutput_TextChanged);
- //
// BatchMergeItemForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(476, 266);
+ this.ClientSize = new System.Drawing.Size(474, 261);
this.Controls.Add(this.panel1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panelOutputSettings);
@@ -196,6 +196,7 @@ private void InitializeComponent()
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
+ this.MinimumSize = new System.Drawing.Size(490, 300);
this.Name = "BatchMergeItemForm";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
diff --git a/BatchMerge.plugin/BatchMergeJobItem.cs b/BatchMerge.plugin/BatchMergeJobItem.cs
index dd9620c..c4e5b03 100644
--- a/BatchMerge.plugin/BatchMergeJobItem.cs
+++ b/BatchMerge.plugin/BatchMergeJobItem.cs
@@ -6,7 +6,7 @@ public class BatchMergeJobItem
{
public enum JobStatus
{
- Success, Error, Queued
+ Success, Error, Queued, Started
}
public string OutputName { get; set; }
@@ -19,7 +19,7 @@ public string DisplayName
{
get
{
- string displayName = $"({Status}) Merge {Items.Count} items: ";
+ string displayName = $"Merge {Items.Count} items: ";
foreach (BatchMergeFileItem item in Items)
{
displayName += $"{item.DisplayName} ,";
diff --git a/BatchMerge.plugin/PluginForm.Designer.cs b/BatchMerge.plugin/PluginForm.Designer.cs
index 60f4678..351b8cb 100644
--- a/BatchMerge.plugin/PluginForm.Designer.cs
+++ b/BatchMerge.plugin/PluginForm.Designer.cs
@@ -29,87 +29,104 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PluginForm));
- this.buttonAddJob = new System.Windows.Forms.Button();
this.panelControls = new System.Windows.Forms.Panel();
+ this.panelOptions = new System.Windows.Forms.Panel();
+ this.buttonSetDeleteList = new System.Windows.Forms.Button();
+ this.panelActions = new System.Windows.Forms.Panel();
this.panelProgress = new System.Windows.Forms.Panel();
this.progressBar = new System.Windows.Forms.ProgressBar();
- this.buttonRemoveJob = new System.Windows.Forms.Button();
this.buttonMergeSelected = new System.Windows.Forms.Button();
this.buttonMergeAll = new System.Windows.Forms.Button();
+ this.buttonRemoveJob = new System.Windows.Forms.Button();
+ this.buttonAddJob = new System.Windows.Forms.Button();
this.labelHeading = new System.Windows.Forms.Label();
this.panelList = new System.Windows.Forms.Panel();
this.listBox = new System.Windows.Forms.ListBox();
+ this.panelCheckBox = new System.Windows.Forms.Panel();
+ this.checkBoxSaveDeleteList = new System.Windows.Forms.CheckBox();
this.panelControls.SuspendLayout();
+ this.panelOptions.SuspendLayout();
+ this.panelActions.SuspendLayout();
this.panelProgress.SuspendLayout();
this.panelList.SuspendLayout();
+ this.panelCheckBox.SuspendLayout();
this.SuspendLayout();
//
- // buttonAddJob
- //
- this.buttonAddJob.Dock = System.Windows.Forms.DockStyle.Left;
- this.buttonAddJob.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonAddJob.Location = new System.Drawing.Point(8, 0);
- this.buttonAddJob.Name = "buttonAddJob";
- this.buttonAddJob.Size = new System.Drawing.Size(90, 24);
- this.buttonAddJob.TabIndex = 2;
- this.buttonAddJob.Text = "Add new job";
- this.buttonAddJob.UseVisualStyleBackColor = true;
- this.buttonAddJob.Click += new System.EventHandler(this.buttonAddJob_Click);
- //
// panelControls
//
- this.panelControls.Controls.Add(this.panelProgress);
- this.panelControls.Controls.Add(this.buttonRemoveJob);
- this.panelControls.Controls.Add(this.buttonAddJob);
- this.panelControls.Controls.Add(this.buttonMergeSelected);
- this.panelControls.Controls.Add(this.buttonMergeAll);
+ this.panelControls.Controls.Add(this.panelOptions);
+ this.panelControls.Controls.Add(this.panelActions);
this.panelControls.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panelControls.Location = new System.Drawing.Point(4, 412);
+ this.panelControls.Location = new System.Drawing.Point(4, 495);
this.panelControls.Name = "panelControls";
this.panelControls.Padding = new System.Windows.Forms.Padding(8, 0, 8, 4);
- this.panelControls.Size = new System.Drawing.Size(792, 28);
+ this.panelControls.Size = new System.Drawing.Size(976, 62);
this.panelControls.TabIndex = 3;
//
+ // panelOptions
+ //
+ this.panelOptions.Controls.Add(this.panelCheckBox);
+ this.panelOptions.Controls.Add(this.buttonSetDeleteList);
+ this.panelOptions.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.panelOptions.Location = new System.Drawing.Point(8, 0);
+ this.panelOptions.Name = "panelOptions";
+ this.panelOptions.Padding = new System.Windows.Forms.Padding(0, 3, 3, 3);
+ this.panelOptions.Size = new System.Drawing.Size(960, 30);
+ this.panelOptions.TabIndex = 5;
+ //
+ // buttonSetDeleteList
+ //
+ this.buttonSetDeleteList.Dock = System.Windows.Forms.DockStyle.Left;
+ this.buttonSetDeleteList.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonSetDeleteList.Location = new System.Drawing.Point(0, 3);
+ this.buttonSetDeleteList.Name = "buttonSetDeleteList";
+ this.buttonSetDeleteList.Size = new System.Drawing.Size(157, 24);
+ this.buttonSetDeleteList.TabIndex = 2;
+ this.buttonSetDeleteList.Text = "Set delete list output path";
+ this.buttonSetDeleteList.UseVisualStyleBackColor = true;
+ this.buttonSetDeleteList.Click += new System.EventHandler(this.buttonSetDeleteList_Click);
+ //
+ // panelActions
+ //
+ this.panelActions.Controls.Add(this.panelProgress);
+ this.panelActions.Controls.Add(this.buttonMergeSelected);
+ this.panelActions.Controls.Add(this.buttonMergeAll);
+ this.panelActions.Controls.Add(this.buttonRemoveJob);
+ this.panelActions.Controls.Add(this.buttonAddJob);
+ this.panelActions.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.panelActions.Location = new System.Drawing.Point(8, 30);
+ this.panelActions.Name = "panelActions";
+ this.panelActions.Size = new System.Drawing.Size(960, 28);
+ this.panelActions.TabIndex = 6;
+ //
// panelProgress
//
this.panelProgress.Controls.Add(this.progressBar);
this.panelProgress.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panelProgress.Location = new System.Drawing.Point(178, 0);
+ this.panelProgress.Location = new System.Drawing.Point(170, 0);
this.panelProgress.Name = "panelProgress";
this.panelProgress.Padding = new System.Windows.Forms.Padding(3);
- this.panelProgress.Size = new System.Drawing.Size(420, 24);
- this.panelProgress.TabIndex = 4;
+ this.panelProgress.Size = new System.Drawing.Size(604, 28);
+ this.panelProgress.TabIndex = 5;
//
// progressBar
//
this.progressBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.progressBar.Location = new System.Drawing.Point(3, 3);
this.progressBar.Name = "progressBar";
- this.progressBar.Size = new System.Drawing.Size(414, 18);
- this.progressBar.TabIndex = 5;
- //
- // buttonRemoveJob
- //
- this.buttonRemoveJob.Dock = System.Windows.Forms.DockStyle.Left;
- this.buttonRemoveJob.Enabled = false;
- this.buttonRemoveJob.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonRemoveJob.Location = new System.Drawing.Point(98, 0);
- this.buttonRemoveJob.Name = "buttonRemoveJob";
- this.buttonRemoveJob.Size = new System.Drawing.Size(80, 24);
- this.buttonRemoveJob.TabIndex = 3;
- this.buttonRemoveJob.Text = "Remove job";
- this.buttonRemoveJob.UseVisualStyleBackColor = true;
- this.buttonRemoveJob.Click += new System.EventHandler(this.buttonRemoveJob_Click);
+ this.progressBar.Size = new System.Drawing.Size(598, 22);
+ this.progressBar.TabIndex = 6;
+ this.progressBar.Visible = false;
//
// buttonMergeSelected
//
this.buttonMergeSelected.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonMergeSelected.Enabled = false;
this.buttonMergeSelected.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonMergeSelected.Location = new System.Drawing.Point(598, 0);
+ this.buttonMergeSelected.Location = new System.Drawing.Point(774, 0);
this.buttonMergeSelected.Name = "buttonMergeSelected";
- this.buttonMergeSelected.Size = new System.Drawing.Size(96, 24);
- this.buttonMergeSelected.TabIndex = 1;
+ this.buttonMergeSelected.Size = new System.Drawing.Size(96, 28);
+ this.buttonMergeSelected.TabIndex = 9;
this.buttonMergeSelected.Text = "Merge selected";
this.buttonMergeSelected.UseVisualStyleBackColor = true;
this.buttonMergeSelected.Click += new System.EventHandler(this.buttonMergeSelected_Click);
@@ -119,14 +136,39 @@ private void InitializeComponent()
this.buttonMergeAll.Dock = System.Windows.Forms.DockStyle.Right;
this.buttonMergeAll.Enabled = false;
this.buttonMergeAll.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.buttonMergeAll.Location = new System.Drawing.Point(694, 0);
+ this.buttonMergeAll.Location = new System.Drawing.Point(870, 0);
this.buttonMergeAll.Name = "buttonMergeAll";
- this.buttonMergeAll.Size = new System.Drawing.Size(90, 24);
- this.buttonMergeAll.TabIndex = 0;
+ this.buttonMergeAll.Size = new System.Drawing.Size(90, 28);
+ this.buttonMergeAll.TabIndex = 8;
this.buttonMergeAll.Text = "Merge all";
this.buttonMergeAll.UseVisualStyleBackColor = true;
this.buttonMergeAll.Click += new System.EventHandler(this.buttonMergeAll_Click);
//
+ // buttonRemoveJob
+ //
+ this.buttonRemoveJob.Dock = System.Windows.Forms.DockStyle.Left;
+ this.buttonRemoveJob.Enabled = false;
+ this.buttonRemoveJob.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonRemoveJob.Location = new System.Drawing.Point(90, 0);
+ this.buttonRemoveJob.Name = "buttonRemoveJob";
+ this.buttonRemoveJob.Size = new System.Drawing.Size(80, 28);
+ this.buttonRemoveJob.TabIndex = 7;
+ this.buttonRemoveJob.Text = "Remove job";
+ this.buttonRemoveJob.UseVisualStyleBackColor = true;
+ this.buttonRemoveJob.Click += new System.EventHandler(this.buttonRemoveJob_Click);
+ //
+ // buttonAddJob
+ //
+ this.buttonAddJob.Dock = System.Windows.Forms.DockStyle.Left;
+ this.buttonAddJob.FlatStyle = System.Windows.Forms.FlatStyle.System;
+ this.buttonAddJob.Location = new System.Drawing.Point(0, 0);
+ this.buttonAddJob.Name = "buttonAddJob";
+ this.buttonAddJob.Size = new System.Drawing.Size(90, 28);
+ this.buttonAddJob.TabIndex = 6;
+ this.buttonAddJob.Text = "Add new job";
+ this.buttonAddJob.UseVisualStyleBackColor = true;
+ this.buttonAddJob.Click += new System.EventHandler(this.buttonAddJob_Click);
+ //
// labelHeading
//
this.labelHeading.AutoSize = true;
@@ -146,59 +188,94 @@ private void InitializeComponent()
this.panelList.Location = new System.Drawing.Point(4, 35);
this.panelList.Name = "panelList";
this.panelList.Padding = new System.Windows.Forms.Padding(8, 8, 8, 4);
- this.panelList.Size = new System.Drawing.Size(792, 377);
+ this.panelList.Size = new System.Drawing.Size(976, 460);
this.panelList.TabIndex = 5;
//
// listBox
//
this.listBox.AllowDrop = true;
this.listBox.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.listBox.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.listBox.FormattingEnabled = true;
+ this.listBox.ItemHeight = 24;
this.listBox.Location = new System.Drawing.Point(8, 8);
this.listBox.Name = "listBox";
this.listBox.ScrollAlwaysVisible = true;
- this.listBox.Size = new System.Drawing.Size(776, 365);
+ this.listBox.Size = new System.Drawing.Size(960, 448);
this.listBox.TabIndex = 0;
+ this.listBox.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listBox_DrawItem);
this.listBox.SelectedIndexChanged += new System.EventHandler(this.listBox_SelectedIndexChanged);
this.listBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.listBox_DragDrop);
this.listBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.listBox_DragEnter);
this.listBox.DoubleClick += new System.EventHandler(this.listBox_DoubleClick);
//
+ // panelCheckBox
+ //
+ this.panelCheckBox.Controls.Add(this.checkBoxSaveDeleteList);
+ this.panelCheckBox.Dock = System.Windows.Forms.DockStyle.Left;
+ this.panelCheckBox.Location = new System.Drawing.Point(157, 3);
+ this.panelCheckBox.Name = "panelCheckBox";
+ this.panelCheckBox.Padding = new System.Windows.Forms.Padding(6, 0, 0, 0);
+ this.panelCheckBox.Size = new System.Drawing.Size(466, 24);
+ this.panelCheckBox.TabIndex = 3;
+ //
+ // checkBoxSaveDeleteList
+ //
+ this.checkBoxSaveDeleteList.AutoSize = true;
+ this.checkBoxSaveDeleteList.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.checkBoxSaveDeleteList.Location = new System.Drawing.Point(6, 0);
+ this.checkBoxSaveDeleteList.Name = "checkBoxSaveDeleteList";
+ this.checkBoxSaveDeleteList.Size = new System.Drawing.Size(460, 24);
+ this.checkBoxSaveDeleteList.TabIndex = 2;
+ this.checkBoxSaveDeleteList.Text = "Save a list of source files upon completion (for deleting manually)";
+ this.checkBoxSaveDeleteList.UseVisualStyleBackColor = true;
+ this.checkBoxSaveDeleteList.CheckedChanged += new System.EventHandler(this.checkBoxSaveDeleteList_CheckedChanged);
+ //
// PluginForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
- this.ClientSize = new System.Drawing.Size(800, 444);
+ this.ClientSize = new System.Drawing.Size(984, 561);
this.Controls.Add(this.panelList);
this.Controls.Add(this.labelHeading);
this.Controls.Add(this.panelControls);
+ this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+ this.MinimumSize = new System.Drawing.Size(1000, 600);
this.Name = "PluginForm";
this.Padding = new System.Windows.Forms.Padding(4);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Batch Merge plugin";
this.Load += new System.EventHandler(this.PluginForm_Load);
this.panelControls.ResumeLayout(false);
+ this.panelOptions.ResumeLayout(false);
+ this.panelActions.ResumeLayout(false);
this.panelProgress.ResumeLayout(false);
this.panelList.ResumeLayout(false);
+ this.panelCheckBox.ResumeLayout(false);
+ this.panelCheckBox.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
-
- private System.Windows.Forms.Button buttonAddJob;
private System.Windows.Forms.Panel panelControls;
- private System.Windows.Forms.Button buttonRemoveJob;
- private System.Windows.Forms.Button buttonMergeSelected;
- private System.Windows.Forms.Button buttonMergeAll;
private System.Windows.Forms.Label labelHeading;
private System.Windows.Forms.Panel panelList;
- private System.Windows.Forms.ListBox listBox;
+ private System.Windows.Forms.Panel panelActions;
+ private System.Windows.Forms.Button buttonMergeSelected;
+ private System.Windows.Forms.Button buttonMergeAll;
+ private System.Windows.Forms.Button buttonRemoveJob;
+ private System.Windows.Forms.Button buttonAddJob;
private System.Windows.Forms.Panel panelProgress;
private System.Windows.Forms.ProgressBar progressBar;
+ private System.Windows.Forms.Panel panelOptions;
+ private System.Windows.Forms.Button buttonSetDeleteList;
+ private System.Windows.Forms.ListBox listBox;
+ private System.Windows.Forms.Panel panelCheckBox;
+ private System.Windows.Forms.CheckBox checkBoxSaveDeleteList;
}
}
\ No newline at end of file
diff --git a/BatchMerge.plugin/PluginForm.cs b/BatchMerge.plugin/PluginForm.cs
index 972637a..f0e4535 100644
--- a/BatchMerge.plugin/PluginForm.cs
+++ b/BatchMerge.plugin/PluginForm.cs
@@ -1,9 +1,9 @@
using SharpCutCommon;
-using SharpCutCommon.Properties;
using SharpCutCommon.Video;
using System;
using System.Collections.Generic;
using System.Data;
+using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
@@ -15,15 +15,20 @@ public partial class PluginForm : Form
{
private FFMPEG fFMPEG = new FFMPEG();
+ private string deleteListPath = null;
+
+ private Font defaultFont = new Font("Segoe UI", 9.5f);
+
public PluginForm()
{
InitializeComponent();
}
+ #region Private methods
+
private void UpdateList()
{
- listBox.DrawMode = DrawMode.OwnerDrawFixed;
- listBox.DrawMode = DrawMode.Normal;
+ listBox.Invalidate();
}
private void AddSource(List fileNames)
@@ -36,8 +41,8 @@ private void AddSource(List fileNames)
if (!IsMediaSupported(fileName))
{
MessageBox.Show(
- Resources.ErrorFormatNotSupported,
- Resources.GenericErrorTitle,
+ SharpCutCommon.Properties.Resources.ErrorFormatNotSupported,
+ SharpCutCommon.Properties.Resources.GenericErrorTitle,
MessageBoxButtons.OK,
MessageBoxIcon.Error
);
@@ -71,11 +76,31 @@ private void RemoveJob(int index)
}
}
+ private void EditJob(int index)
+ {
+ if (index == -1) return;
+
+ using (BatchMergeItemForm batchMergeItemForm = new BatchMergeItemForm())
+ {
+ BatchMergeJobItem batchMergeJobItem = listBox.SelectedItem as BatchMergeJobItem;
+ batchMergeItemForm.Files.Items.AddRange(batchMergeJobItem.Items.ToArray());
+ batchMergeItemForm.OutputName = batchMergeJobItem.OutputName;
+
+ if (batchMergeItemForm.ShowDialog() == DialogResult.OK)
+ {
+ batchMergeJobItem.OutputName = batchMergeItemForm.OutputName;
+ batchMergeJobItem.Items.Clear();
+ batchMergeJobItem.Items.AddRange(batchMergeItemForm.Files.Items.Cast().ToArray());
+ UpdateList();
+ }
+ }
+ }
+
private void MergeItem(BatchMergeJobItem batchMergeJobItem)
{
using (ProgressDialog progressDialog = new ProgressDialog())
{
- progressDialog.ProgressTitle = Resources.MergingFiles;
+ progressDialog.ProgressTitle = SharpCutCommon.Properties.Resources.MergingFiles;
fFMPEG.Progress += (object _sender, ProgressEventArgs _e) =>
{
try
@@ -106,11 +131,69 @@ private void MergeItem(BatchMergeJobItem batchMergeJobItem)
UpdateList();
};
+ batchMergeJobItem.Status = BatchMergeJobItem.JobStatus.Started;
+ UpdateList();
+
fFMPEG.Merge(batchMergeJobItem.Items.Select(item => item.FileName).ToList(), batchMergeJobItem.OutputName);
progressDialog.ShowDialog();
}
}
+ private void MergeAll()
+ {
+ progressBar.Value = 0;
+ progressBar.Maximum = listBox.Items.Count;
+ progressBar.Show();
+
+ StreamWriter streamWriter = !string.IsNullOrEmpty(deleteListPath) && checkBoxSaveDeleteList.Checked ? new StreamWriter(deleteListPath, true, System.Text.Encoding.UTF8) : null;
+
+ List jobs = listBox.Items.Cast().ToList();
+ foreach (BatchMergeJobItem batchMergeJobItem in jobs)
+ {
+ MergeItem(batchMergeJobItem);
+
+ if (streamWriter != null)
+ {
+ foreach (BatchMergeFileItem batchMergeFileItem in batchMergeJobItem.Items)
+ {
+ streamWriter.WriteLine(Path.GetFileName(batchMergeFileItem.FileName));
+ }
+ }
+
+ progressBar.Value++;
+ Invalidate();
+ }
+
+ streamWriter?.Dispose();
+
+ progressBar.Hide();
+
+ MessageBox.Show(
+ "All merge jobs have been completed.",
+ "Jobs completed",
+ MessageBoxButtons.OK,
+ MessageBoxIcon.Information
+ );
+ }
+
+ private void SetDeleteListPath()
+ {
+ using (SaveFileDialog saveFileDialog = new SaveFileDialog())
+ {
+ saveFileDialog.Filter = "Text files (*.txt)|*.txt";
+ saveFileDialog.DefaultExt = ".txt";
+
+ if (saveFileDialog.ShowDialog() == DialogResult.OK)
+ {
+ deleteListPath = saveFileDialog.FileName;
+ }
+ }
+ }
+
+ #endregion
+
+ #region Events
+
private void PluginForm_Load(object sender, EventArgs e)
{
listBox.DisplayMember = "DisplayName";
@@ -138,26 +221,12 @@ private void listBox_SelectedIndexChanged(object sender, EventArgs e)
{
buttonMergeSelected.Enabled = listBox.SelectedIndex > -1;
buttonRemoveJob.Enabled = listBox.SelectedIndex > -1;
+ UpdateList();
}
private void listBox_DoubleClick(object sender, EventArgs e)
{
- if (listBox.SelectedIndex == -1) return;
-
- using (BatchMergeItemForm batchMergeItemForm = new BatchMergeItemForm())
- {
- BatchMergeJobItem batchMergeJobItem = listBox.SelectedItem as BatchMergeJobItem;
- batchMergeItemForm.Files.Items.AddRange(batchMergeJobItem.Items.ToArray());
- batchMergeItemForm.OutputName = batchMergeJobItem.OutputName;
-
- if (batchMergeItemForm.ShowDialog() == DialogResult.OK)
- {
- batchMergeJobItem.OutputName = batchMergeItemForm.OutputName;
- batchMergeJobItem.Items.Clear();
- batchMergeJobItem.Items.AddRange(batchMergeItemForm.Files.Items.Cast().ToArray());
- UpdateList();
- }
- }
+ EditJob(listBox.SelectedIndex);
}
private void buttonMergeSelected_Click(object sender, EventArgs e)
@@ -167,17 +236,7 @@ private void buttonMergeSelected_Click(object sender, EventArgs e)
private void buttonMergeAll_Click(object sender, EventArgs e)
{
- progressBar.Value = 0;
- progressBar.Maximum = listBox.Items.Count;
-
- List jobs = listBox.Items.Cast().ToList();
- foreach (BatchMergeJobItem batchMergeJobItem in jobs)
- {
- MergeItem(batchMergeJobItem);
-
- progressBar.Value++;
- Invalidate();
- }
+ MergeAll();
}
private void listBox_DragEnter(object sender, DragEventArgs e)
@@ -195,9 +254,54 @@ private void listBox_DragDrop(object sender, DragEventArgs e)
if (files.Length > 1)
{
AddSource(files.ToList());
-
return;
}
}
+
+ private void checkBoxSaveDeleteList_CheckedChanged(object sender, EventArgs e)
+ {
+ if (checkBoxSaveDeleteList.Checked && string.IsNullOrEmpty(deleteListPath))
+ {
+ SetDeleteListPath();
+ }
+ }
+
+ private void buttonSetDeleteList_Click(object sender, EventArgs e)
+ {
+ SetDeleteListPath();
+ }
+
+ #endregion
+
+ private void listBox_DrawItem(object sender, DrawItemEventArgs e)
+ {
+ if (e.Index == -1) return;
+
+ Graphics g = e.Graphics;
+ g.FillRectangle(e.Index == listBox.SelectedIndex ? SystemBrushes.Highlight : Brushes.White, e.Bounds);
+
+ BatchMergeJobItem batchMergeJobItem = listBox.Items[e.Index] as BatchMergeJobItem;
+
+ Image statusImage = Resources.ImageQueued;
+ switch (batchMergeJobItem.Status)
+ {
+ case BatchMergeJobItem.JobStatus.Success:
+ statusImage = Resources.ImageSuccess;
+ break;
+ case BatchMergeJobItem.JobStatus.Started:
+ statusImage = Resources.ImageStarted;
+ break;
+ case BatchMergeJobItem.JobStatus.Error:
+ statusImage = Resources.ImageFailed;
+ break;
+ }
+
+ g.DrawImage(statusImage, new Rectangle(e.Bounds.Left + 4, e.Bounds.Top + 4, 16, 16));
+ g.DrawString(
+ batchMergeJobItem.DisplayName,
+ defaultFont, e.Index == listBox.SelectedIndex ? Brushes.White : Brushes.Black,
+ new Point(e.Bounds.Left + 24, e.Bounds.Top + 2)
+ );
+ }
}
}
diff --git a/BatchMerge.plugin/Properties/AssemblyInfo.cs b/BatchMerge.plugin/Properties/AssemblyInfo.cs
index 30f0d69..700fa73 100644
--- a/BatchMerge.plugin/Properties/AssemblyInfo.cs
+++ b/BatchMerge.plugin/Properties/AssemblyInfo.cs
@@ -29,5 +29,5 @@
// Build Number
// Revision
//
-[assembly: AssemblyVersion("1.4.10.0")]
-[assembly: AssemblyFileVersion("1.4.10.0")]
+[assembly: AssemblyVersion("1.4.11.0")]
+[assembly: AssemblyFileVersion("1.4.11.0")]
diff --git a/BatchMerge.plugin/Resources.Designer.cs b/BatchMerge.plugin/Resources.Designer.cs
new file mode 100644
index 0000000..378a4da
--- /dev/null
+++ b/BatchMerge.plugin/Resources.Designer.cs
@@ -0,0 +1,103 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace BatchMerge.plugin {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BatchMerge.plugin.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ImageFailed {
+ get {
+ object obj = ResourceManager.GetObject("ImageFailed", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ImageQueued {
+ get {
+ object obj = ResourceManager.GetObject("ImageQueued", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ImageStarted {
+ get {
+ object obj = ResourceManager.GetObject("ImageStarted", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap ImageSuccess {
+ get {
+ object obj = ResourceManager.GetObject("ImageSuccess", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/BatchMerge.plugin/BatchMergeItemc.resx b/BatchMerge.plugin/Resources.resx
similarity index 82%
rename from BatchMerge.plugin/BatchMergeItemc.resx
rename to BatchMerge.plugin/Resources.resx
index 29dcb1b..67101f0 100644
--- a/BatchMerge.plugin/BatchMergeItemc.resx
+++ b/BatchMerge.plugin/Resources.resx
@@ -117,4 +117,17 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Resources\cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Resources\queue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Resources\route.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+
+ Resources\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
\ No newline at end of file
diff --git a/BatchMerge.plugin/Resources/cancel.png b/BatchMerge.plugin/Resources/cancel.png
new file mode 100644
index 0000000..82ed8e1
Binary files /dev/null and b/BatchMerge.plugin/Resources/cancel.png differ
diff --git a/BatchMerge.plugin/Resources/check.png b/BatchMerge.plugin/Resources/check.png
new file mode 100644
index 0000000..1b10553
Binary files /dev/null and b/BatchMerge.plugin/Resources/check.png differ
diff --git a/BatchMerge.plugin/Resources/queue.png b/BatchMerge.plugin/Resources/queue.png
new file mode 100644
index 0000000..de994f2
Binary files /dev/null and b/BatchMerge.plugin/Resources/queue.png differ
diff --git a/BatchMerge.plugin/Resources/route.png b/BatchMerge.plugin/Resources/route.png
new file mode 100644
index 0000000..1f3d1d0
Binary files /dev/null and b/BatchMerge.plugin/Resources/route.png differ
diff --git a/BatchMerge.plugin/app.config b/BatchMerge.plugin/app.config
new file mode 100644
index 0000000..0b1bb36
--- /dev/null
+++ b/BatchMerge.plugin/app.config
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MediaHelper.plugin/Properties/AssemblyInfo.cs b/MediaHelper.plugin/Properties/AssemblyInfo.cs
index bd5af0f..c937a41 100644
--- a/MediaHelper.plugin/Properties/AssemblyInfo.cs
+++ b/MediaHelper.plugin/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.10.0")]
-[assembly: AssemblyFileVersion("1.4.10.0")]
+[assembly: AssemblyVersion("1.4.11.0")]
+[assembly: AssemblyFileVersion("1.4.11.0")]
diff --git a/SharpCut/MainForm.cs b/SharpCut/MainForm.cs
index b168381..02d306f 100644
--- a/SharpCut/MainForm.cs
+++ b/SharpCut/MainForm.cs
@@ -350,6 +350,12 @@ private ExportSettings ExportMedia(ExportSettings exportSettings = null)
///
private void MergeFiles(string originalFileName, List fileNamesToMerge)
{
+ if (Project.CurrentProject == null)
+ {
+ Project.CurrentProject = new Project();
+ InitProjectEvents();
+ }
+
Project.CurrentProject.Merge(originalFileName, fileNamesToMerge);
}
diff --git a/SharpCut/Properties/AssemblyInfo.cs b/SharpCut/Properties/AssemblyInfo.cs
index f7b24ff..5b5e598 100644
--- a/SharpCut/Properties/AssemblyInfo.cs
+++ b/SharpCut/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.10.0")]
-[assembly: AssemblyFileVersion("1.4.10.0")]
+[assembly: AssemblyVersion("1.4.11.0")]
+[assembly: AssemblyFileVersion("1.4.11.0")]
diff --git a/SharpCut/Resources/BuildDate.txt b/SharpCut/Resources/BuildDate.txt
index de6c48a..7caee15 100644
--- a/SharpCut/Resources/BuildDate.txt
+++ b/SharpCut/Resources/BuildDate.txt
@@ -1 +1 @@
-Fri 11/29/2024 2:13:41.74
+Tue 12/03/2024 2:24:42.07
diff --git a/SharpCutCommon/Properties/AssemblyInfo.cs b/SharpCutCommon/Properties/AssemblyInfo.cs
index 26430d1..87d13d9 100644
--- a/SharpCutCommon/Properties/AssemblyInfo.cs
+++ b/SharpCutCommon/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.10.0")]
-[assembly: AssemblyFileVersion("1.4.10.0")]
+[assembly: AssemblyVersion("1.4.11.0")]
+[assembly: AssemblyFileVersion("1.4.11.0")]
diff --git a/SharpCutCommon/Video/Project.cs b/SharpCutCommon/Video/Project.cs
index 1b0278d..71e8f58 100644
--- a/SharpCutCommon/Video/Project.cs
+++ b/SharpCutCommon/Video/Project.cs
@@ -437,6 +437,7 @@ public void Merge(string originalFileName, List toMerge, string containe
progressDialog = new ProgressDialog();
progressDialog.ProgressTitle = Resources.MergingFiles;
+ progressDialog.ShowDialog();
}
///