Update to 0.2.0.0 and add selecting the save directory.

This commit is contained in:
Captain ALM 2022-07-06 21:28:02 +01:00
parent 9c357525ca
commit 8508bcd3af
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1
4 changed files with 68 additions and 23 deletions

View File

@ -36,6 +36,9 @@
this.buttonInstall = new System.Windows.Forms.Button(); this.buttonInstall = new System.Windows.Forms.Button();
this.buttonExit = new System.Windows.Forms.Button(); this.buttonExit = new System.Windows.Forms.Button();
this.backgroundWorkerMain = new System.ComponentModel.BackgroundWorker(); this.backgroundWorkerMain = new System.ComponentModel.BackgroundWorker();
this.textBoxSaveDir = new System.Windows.Forms.TextBox();
this.buttonSaveTo = new System.Windows.Forms.Button();
this.folderBrowserDialogMain = new System.Windows.Forms.FolderBrowserDialog();
this.tableLayoutPanelMain.SuspendLayout(); this.tableLayoutPanelMain.SuspendLayout();
this.tableLayoutPanelEntry.SuspendLayout(); this.tableLayoutPanelEntry.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@ -46,17 +49,18 @@
this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelMain.Controls.Add(this.tableLayoutPanelEntry, 0, 0); this.tableLayoutPanelMain.Controls.Add(this.tableLayoutPanelEntry, 0, 0);
this.tableLayoutPanelMain.Controls.Add(this.textBoxOutput, 0, 2); this.tableLayoutPanelMain.Controls.Add(this.textBoxOutput, 0, 3);
this.tableLayoutPanelMain.Controls.Add(this.buttonInstall, 0, 1); this.tableLayoutPanelMain.Controls.Add(this.buttonInstall, 0, 2);
this.tableLayoutPanelMain.Controls.Add(this.buttonExit, 1, 1); this.tableLayoutPanelMain.Controls.Add(this.buttonExit, 1, 2);
this.tableLayoutPanelMain.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanelMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelMain.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanelMain.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelMain.Margin = new System.Windows.Forms.Padding(1); this.tableLayoutPanelMain.Margin = new System.Windows.Forms.Padding(1);
this.tableLayoutPanelMain.Name = "tableLayoutPanelMain"; this.tableLayoutPanelMain.Name = "tableLayoutPanelMain";
this.tableLayoutPanelMain.RowCount = 3; this.tableLayoutPanelMain.RowCount = 4;
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F)); this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F));
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F)); this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F));
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F)); this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 15F));
this.tableLayoutPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 55F));
this.tableLayoutPanelMain.Size = new System.Drawing.Size(284, 161); this.tableLayoutPanelMain.Size = new System.Drawing.Size(284, 161);
this.tableLayoutPanelMain.TabIndex = 0; this.tableLayoutPanelMain.TabIndex = 0;
// //
@ -64,18 +68,21 @@
// //
this.tableLayoutPanelEntry.ColumnCount = 2; this.tableLayoutPanelEntry.ColumnCount = 2;
this.tableLayoutPanelMain.SetColumnSpan(this.tableLayoutPanelEntry, 2); this.tableLayoutPanelMain.SetColumnSpan(this.tableLayoutPanelEntry, 2);
this.tableLayoutPanelEntry.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 80F)); this.tableLayoutPanelEntry.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 75F));
this.tableLayoutPanelEntry.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); this.tableLayoutPanelEntry.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F));
this.tableLayoutPanelEntry.Controls.Add(this.buttonSaveTo, 1, 1);
this.tableLayoutPanelEntry.Controls.Add(this.textBoxSaveDir, 0, 1);
this.tableLayoutPanelEntry.Controls.Add(this.textBoxEntry, 0, 0); this.tableLayoutPanelEntry.Controls.Add(this.textBoxEntry, 0, 0);
this.tableLayoutPanelEntry.Controls.Add(this.buttonGo, 1, 0); this.tableLayoutPanelEntry.Controls.Add(this.buttonGo, 1, 0);
this.tableLayoutPanelEntry.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanelEntry.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelEntry.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanelEntry.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanelEntry.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanelEntry.Margin = new System.Windows.Forms.Padding(0);
this.tableLayoutPanelEntry.Name = "tableLayoutPanelEntry"; this.tableLayoutPanelEntry.Name = "tableLayoutPanelEntry";
this.tableLayoutPanelEntry.RowCount = 1; this.tableLayoutPanelEntry.RowCount = 2;
this.tableLayoutPanelEntry.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanelMain.SetRowSpan(this.tableLayoutPanelEntry, 2);
this.tableLayoutPanelEntry.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24F)); this.tableLayoutPanelEntry.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelEntry.Size = new System.Drawing.Size(284, 24); this.tableLayoutPanelEntry.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanelEntry.Size = new System.Drawing.Size(284, 48);
this.tableLayoutPanelEntry.TabIndex = 0; this.tableLayoutPanelEntry.TabIndex = 0;
// //
// textBoxEntry // textBoxEntry
@ -84,16 +91,16 @@
this.textBoxEntry.Location = new System.Drawing.Point(0, 2); this.textBoxEntry.Location = new System.Drawing.Point(0, 2);
this.textBoxEntry.Margin = new System.Windows.Forms.Padding(0); this.textBoxEntry.Margin = new System.Windows.Forms.Padding(0);
this.textBoxEntry.Name = "textBoxEntry"; this.textBoxEntry.Name = "textBoxEntry";
this.textBoxEntry.Size = new System.Drawing.Size(227, 20); this.textBoxEntry.Size = new System.Drawing.Size(213, 20);
this.textBoxEntry.TabIndex = 0; this.textBoxEntry.TabIndex = 0;
// //
// buttonGo // buttonGo
// //
this.buttonGo.Dock = System.Windows.Forms.DockStyle.Fill; this.buttonGo.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonGo.Location = new System.Drawing.Point(227, 0); this.buttonGo.Location = new System.Drawing.Point(213, 0);
this.buttonGo.Margin = new System.Windows.Forms.Padding(0); this.buttonGo.Margin = new System.Windows.Forms.Padding(0);
this.buttonGo.Name = "buttonGo"; this.buttonGo.Name = "buttonGo";
this.buttonGo.Size = new System.Drawing.Size(57, 24); this.buttonGo.Size = new System.Drawing.Size(71, 24);
this.buttonGo.TabIndex = 1; this.buttonGo.TabIndex = 1;
this.buttonGo.Text = "Go!"; this.buttonGo.Text = "Go!";
this.buttonGo.UseVisualStyleBackColor = true; this.buttonGo.UseVisualStyleBackColor = true;
@ -103,24 +110,24 @@
// //
this.tableLayoutPanelMain.SetColumnSpan(this.textBoxOutput, 2); this.tableLayoutPanelMain.SetColumnSpan(this.textBoxOutput, 2);
this.textBoxOutput.Dock = System.Windows.Forms.DockStyle.Fill; this.textBoxOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxOutput.Location = new System.Drawing.Point(1, 49); this.textBoxOutput.Location = new System.Drawing.Point(1, 73);
this.textBoxOutput.Margin = new System.Windows.Forms.Padding(1); this.textBoxOutput.Margin = new System.Windows.Forms.Padding(1);
this.textBoxOutput.Multiline = true; this.textBoxOutput.Multiline = true;
this.textBoxOutput.Name = "textBoxOutput"; this.textBoxOutput.Name = "textBoxOutput";
this.textBoxOutput.ReadOnly = true; this.textBoxOutput.ReadOnly = true;
this.textBoxOutput.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBoxOutput.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxOutput.Size = new System.Drawing.Size(282, 111); this.textBoxOutput.Size = new System.Drawing.Size(282, 87);
this.textBoxOutput.TabIndex = 3; this.textBoxOutput.TabIndex = 4;
this.textBoxOutput.WordWrap = false; this.textBoxOutput.WordWrap = false;
// //
// buttonInstall // buttonInstall
// //
this.buttonInstall.Dock = System.Windows.Forms.DockStyle.Fill; this.buttonInstall.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonInstall.Location = new System.Drawing.Point(0, 24); this.buttonInstall.Location = new System.Drawing.Point(0, 48);
this.buttonInstall.Margin = new System.Windows.Forms.Padding(0); this.buttonInstall.Margin = new System.Windows.Forms.Padding(0);
this.buttonInstall.Name = "buttonInstall"; this.buttonInstall.Name = "buttonInstall";
this.buttonInstall.Size = new System.Drawing.Size(142, 24); this.buttonInstall.Size = new System.Drawing.Size(142, 24);
this.buttonInstall.TabIndex = 1; this.buttonInstall.TabIndex = 2;
this.buttonInstall.Text = "Install"; this.buttonInstall.Text = "Install";
this.buttonInstall.UseVisualStyleBackColor = true; this.buttonInstall.UseVisualStyleBackColor = true;
this.buttonInstall.Click += new System.EventHandler(this.buttonInstall_Click); this.buttonInstall.Click += new System.EventHandler(this.buttonInstall_Click);
@ -128,11 +135,11 @@
// buttonExit // buttonExit
// //
this.buttonExit.Dock = System.Windows.Forms.DockStyle.Fill; this.buttonExit.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonExit.Location = new System.Drawing.Point(142, 24); this.buttonExit.Location = new System.Drawing.Point(142, 48);
this.buttonExit.Margin = new System.Windows.Forms.Padding(0); this.buttonExit.Margin = new System.Windows.Forms.Padding(0);
this.buttonExit.Name = "buttonExit"; this.buttonExit.Name = "buttonExit";
this.buttonExit.Size = new System.Drawing.Size(142, 24); this.buttonExit.Size = new System.Drawing.Size(142, 24);
this.buttonExit.TabIndex = 2; this.buttonExit.TabIndex = 3;
this.buttonExit.Text = "Exit"; this.buttonExit.Text = "Exit";
this.buttonExit.UseVisualStyleBackColor = true; this.buttonExit.UseVisualStyleBackColor = true;
this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click); this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);
@ -141,6 +148,27 @@
// //
this.backgroundWorkerMain.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerMain_DoWork); this.backgroundWorkerMain.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerMain_DoWork);
// //
// textBoxSaveDir
//
this.textBoxSaveDir.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.textBoxSaveDir.Location = new System.Drawing.Point(0, 26);
this.textBoxSaveDir.Margin = new System.Windows.Forms.Padding(0);
this.textBoxSaveDir.Name = "textBoxSaveDir";
this.textBoxSaveDir.Size = new System.Drawing.Size(213, 20);
this.textBoxSaveDir.TabIndex = 2;
//
// buttonSaveTo
//
this.buttonSaveTo.Dock = System.Windows.Forms.DockStyle.Fill;
this.buttonSaveTo.Location = new System.Drawing.Point(213, 24);
this.buttonSaveTo.Margin = new System.Windows.Forms.Padding(0);
this.buttonSaveTo.Name = "buttonSaveTo";
this.buttonSaveTo.Size = new System.Drawing.Size(71, 24);
this.buttonSaveTo.TabIndex = 3;
this.buttonSaveTo.Text = "Save To...";
this.buttonSaveTo.UseVisualStyleBackColor = true;
this.buttonSaveTo.Click += new System.EventHandler(this.buttonSaveTo_Click);
//
// Main // Main
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -171,6 +199,9 @@
private System.Windows.Forms.Button buttonInstall; private System.Windows.Forms.Button buttonInstall;
private System.Windows.Forms.Button buttonExit; private System.Windows.Forms.Button buttonExit;
private System.ComponentModel.BackgroundWorker backgroundWorkerMain; private System.ComponentModel.BackgroundWorker backgroundWorkerMain;
private System.Windows.Forms.TextBox textBoxSaveDir;
private System.Windows.Forms.Button buttonSaveTo;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialogMain;
} }
} }

View File

@ -32,6 +32,7 @@ namespace com.captainalm.YTDLNetFrontEnd
buttonInstall.Text = "Update"; buttonInstall.Text = "Update";
} }
Environment.CurrentDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos); Environment.CurrentDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos);
textBoxSaveDir.Text = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos);
} }
private void buttonGo_Click(object sender, EventArgs e) private void buttonGo_Click(object sender, EventArgs e)
@ -45,6 +46,16 @@ namespace com.captainalm.YTDLNetFrontEnd
if (!backgroundWorkerMain.IsBusy) backgroundWorkerMain.RunWorkerAsync(BWArg.Install); if (!backgroundWorkerMain.IsBusy) backgroundWorkerMain.RunWorkerAsync(BWArg.Install);
} }
private void buttonSaveTo_Click(object sender, EventArgs e)
{
folderBrowserDialogMain.SelectedPath = Environment.CurrentDirectory;
if (folderBrowserDialogMain.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
{
Environment.CurrentDirectory = folderBrowserDialogMain.SelectedPath;
textBoxSaveDir.Text = folderBrowserDialogMain.SelectedPath;
}
}
private void buttonExit_Click(object sender, EventArgs e) private void buttonExit_Click(object sender, EventArgs e)
{ {
this.Close(); this.Close();

View File

@ -120,4 +120,7 @@
<metadata name="backgroundWorkerMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="backgroundWorkerMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="folderBrowserDialogMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>201, 17</value>
</metadata>
</root> </root>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyVersion("0.2.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")] [assembly: AssemblyFileVersion("0.2.0.0")]