release/1.2.0 #4

Merged
Ray merged 3 commits from release/1.2.0 into master 2026-07-05 19:17:09 +00:00
13 changed files with 384 additions and 251 deletions
Showing only changes of commit 28cae43860 - Show all commits

View File

@ -19,7 +19,7 @@ namespace RandomFileRunner {
// 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.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class AppResource {
@ -96,6 +96,26 @@ namespace RandomFileRunner {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap folder_minus {
get {
object obj = ResourceManager.GetObject("folder_minus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap help_circle {
get {
object obj = ResourceManager.GetObject("help_circle", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -105,5 +125,25 @@ namespace RandomFileRunner {
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap save {
get {
object obj = ResourceManager.GetObject("save", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap settings {
get {
object obj = ResourceManager.GetObject("settings", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -130,7 +130,19 @@
<value>https://www.hiimray.co.uk/software-random-file-runner</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="folder_minus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\folder-minus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="help_circle" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\help-circle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icon_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\icon-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="settings" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

304
MainForm.Designer.cs generated
View File

@ -33,7 +33,7 @@ namespace RandomFileRunner
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
pictureBox1 = new System.Windows.Forms.PictureBox();
toolTip1 = new System.Windows.Forms.ToolTip(components);
button2 = new RyzStudio.Windows.ThemedForms.ThButton();
button2 = new RyzStudio.Windows.ThemedForms.T3Button();
label9 = new System.Windows.Forms.Label();
menuStrip1 = new System.Windows.Forms.MenuStrip();
fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -42,6 +42,8 @@ namespace RandomFileRunner
toolStripMenuItem13 = new System.Windows.Forms.ToolStripSeparator();
saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolStripMenuItem15 = new System.Windows.Forms.ToolStripSeparator();
toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
exitToolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -50,31 +52,34 @@ namespace RandomFileRunner
toolStripMenuItem16 = new System.Windows.Forms.ToolStripSeparator();
aboutToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
label1 = new System.Windows.Forms.Label();
textBox1 = new RyzStudio.Windows.ThemedForms.ButtonTextBox.ThClearableTextBox();
textBox1 = new RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox();
tHorizontalSeparator1 = new RyzStudio.Windows.Forms.THorizontalSeparator();
button5 = new RyzStudio.Windows.ThemedForms.ThButton();
button5 = new RyzStudio.Windows.ThemedForms.T3Button();
openFileDialog2 = new System.Windows.Forms.OpenFileDialog();
saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
progressBar2 = new RyzStudio.Windows.ThemedForms.ThProgressBar();
progressBar1 = new RyzStudio.Windows.ThemedForms.ThProgressBar();
progressBar2 = new RyzStudio.Windows.Forms.TProgressBar();
progressBar1 = new RyzStudio.Windows.Forms.TProgressBar();
label3 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
tHorizontalSeparator3 = new RyzStudio.Windows.Forms.THorizontalSeparator();
label2 = new System.Windows.Forms.Label();
textBox2 = new RyzStudio.Windows.ThemedForms.ThHiButtonTextBox();
button4 = new RyzStudio.Windows.ThemedForms.ThButton();
textBox2 = new RyzStudio.Windows.ThemedForms.T4TextBox();
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
t3UserControl1 = new RyzStudio.Windows.ThemedForms.T3UserControl();
t3UserControl2 = new RyzStudio.Windows.ThemedForms.T3UserControl();
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
menuStrip1.SuspendLayout();
t3UserControl1.SuspendLayout();
t3UserControl2.SuspendLayout();
SuspendLayout();
//
// pictureBox1
//
pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
pictureBox1.ErrorImage = null;
pictureBox1.InitialImage = null;
pictureBox1.Location = new System.Drawing.Point(289, 121);
pictureBox1.Location = new System.Drawing.Point(270, 121);
pictureBox1.Name = "pictureBox1";
pictureBox1.Size = new System.Drawing.Size(33, 33);
pictureBox1.Size = new System.Drawing.Size(37, 37);
pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
pictureBox1.TabIndex = 15;
pictureBox1.TabStop = false;
@ -82,24 +87,43 @@ namespace RandomFileRunner
// button2
//
button2.ActiveImage = null;
button2.Align = RyzStudio.Enums.ContentAlignment.None;
button2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
button2.BackColor = System.Drawing.Color.Transparent;
button2.EnableMenuOnClick = false;
button2.EnableReactiveVisual = true;
button2.EnableMovable = false;
button2.EnableStepWidth = true;
button2.HoverImage = null;
button2.IdleImage = null;
//
//
//
button2.Label.BackColor = System.Drawing.Color.White;
button2.Label.Dock = System.Windows.Forms.DockStyle.Fill;
button2.Label.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
button2.Label.ForeColor = System.Drawing.Color.FromArgb(126, 54, 244);
button2.Label.Location = new System.Drawing.Point(4, 4);
button2.Label.Margin = new System.Windows.Forms.Padding(0);
button2.Label.Name = "label1";
button2.Label.Size = new System.Drawing.Size(133, 30);
button2.Label.TabIndex = 0;
button2.Label.Text = "&Search";
button2.Label.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
button2.LabelText = "&Search";
button2.Location = new System.Drawing.Point(127, 121);
button2.Location = new System.Drawing.Point(314, 121);
button2.Name = "button2";
button2.Size = new System.Drawing.Size(149, 33);
button2.Size = new System.Drawing.Size(140, 37);
button2.TabIndex = 1;
button2.TabStop = false;
button2.MouseClick += button2_MouseClick;
//
// label9
//
label9.Location = new System.Drawing.Point(13, 78);
label9.AutoSize = true;
label9.Location = new System.Drawing.Point(10, 78);
label9.Name = "label9";
label9.Size = new System.Drawing.Size(101, 33);
label9.Padding = new System.Windows.Forms.Padding(0, 8, 0, 0);
label9.Size = new System.Drawing.Size(83, 23);
label9.TabIndex = 27;
label9.Text = "Search Pattern";
label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -111,10 +135,11 @@ namespace RandomFileRunner
menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new System.Drawing.Size(464, 24);
menuStrip1.TabIndex = 32;
menuStrip1.MenuActivate += menuStrip1_MenuActivate;
//
// fileToolStripMenuItem
//
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, openToolStripMenuItem, toolStripMenuItem13, saveAsToolStripMenuItem, toolStripMenuItem15, exitToolStripMenuItem2 });
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { newToolStripMenuItem, openToolStripMenuItem, toolStripMenuItem13, saveAsToolStripMenuItem, toolStripMenuItem15, toolStripMenuItem2, toolStripSeparator2, exitToolStripMenuItem2 });
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
fileToolStripMenuItem.Text = "&File";
@ -123,39 +148,53 @@ namespace RandomFileRunner
//
newToolStripMenuItem.Name = "newToolStripMenuItem";
newToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N;
newToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
newToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
newToolStripMenuItem.Text = "&New";
newToolStripMenuItem.Click += newToolStripMenuItem_Click;
//
// openToolStripMenuItem
//
openToolStripMenuItem.Image = AppResource.folder_minus;
openToolStripMenuItem.Name = "openToolStripMenuItem";
openToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O;
openToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
openToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
openToolStripMenuItem.Text = "&Open";
openToolStripMenuItem.Click += openToolStripMenuItem_Click;
//
// toolStripMenuItem13
//
toolStripMenuItem13.Name = "toolStripMenuItem13";
toolStripMenuItem13.Size = new System.Drawing.Size(143, 6);
toolStripMenuItem13.Size = new System.Drawing.Size(177, 6);
//
// saveAsToolStripMenuItem
//
saveAsToolStripMenuItem.Image = AppResource.save;
saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
saveAsToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
saveAsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
saveAsToolStripMenuItem.Text = "Save &As...";
saveAsToolStripMenuItem.Click += saveAsToolStripMenuItem_Click;
//
// toolStripMenuItem15
//
toolStripMenuItem15.Name = "toolStripMenuItem15";
toolStripMenuItem15.Size = new System.Drawing.Size(143, 6);
toolStripMenuItem15.Size = new System.Drawing.Size(177, 6);
//
// toolStripMenuItem2
//
toolStripMenuItem2.Name = "toolStripMenuItem2";
toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
toolStripMenuItem2.Text = "&Export File List...";
toolStripMenuItem2.Click += toolStripMenuItem2_Click;
//
// toolStripSeparator2
//
toolStripSeparator2.Name = "toolStripSeparator2";
toolStripSeparator2.Size = new System.Drawing.Size(177, 6);
//
// exitToolStripMenuItem2
//
exitToolStripMenuItem2.Name = "exitToolStripMenuItem2";
exitToolStripMenuItem2.Size = new System.Drawing.Size(146, 22);
exitToolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
exitToolStripMenuItem2.Text = "E&xit";
exitToolStripMenuItem2.Click += exitToolStripMenuItem2_Click;
//
@ -168,10 +207,11 @@ namespace RandomFileRunner
//
// optionsToolStripMenuItem
//
optionsToolStripMenuItem.Image = AppResource.settings;
optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
optionsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F12;
optionsToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
optionsToolStripMenuItem.Text = "&Options";
optionsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
optionsToolStripMenuItem.Text = "&Options...";
optionsToolStripMenuItem.Click += optionsToolStripMenuItem_Click;
//
// helpToolStripMenuItem1
@ -183,45 +223,49 @@ namespace RandomFileRunner
//
// viewHelpToolStripMenuItem1
//
viewHelpToolStripMenuItem1.Image = AppResource.help_circle;
viewHelpToolStripMenuItem1.Name = "viewHelpToolStripMenuItem1";
viewHelpToolStripMenuItem1.ShortcutKeys = System.Windows.Forms.Keys.F1;
viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
viewHelpToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
viewHelpToolStripMenuItem1.Text = "&View Help";
viewHelpToolStripMenuItem1.Click += viewHelpToolStripMenuItem1_Click;
//
// toolStripMenuItem16
//
toolStripMenuItem16.Name = "toolStripMenuItem16";
toolStripMenuItem16.Size = new System.Drawing.Size(143, 6);
toolStripMenuItem16.Size = new System.Drawing.Size(177, 6);
//
// aboutToolStripMenuItem1
//
aboutToolStripMenuItem1.Name = "aboutToolStripMenuItem1";
aboutToolStripMenuItem1.Size = new System.Drawing.Size(146, 22);
aboutToolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
aboutToolStripMenuItem1.Text = "&About";
aboutToolStripMenuItem1.Click += aboutToolStripMenuItem1_Click;
//
// label1
//
label1.Location = new System.Drawing.Point(13, 36);
label1.AutoSize = true;
label1.Location = new System.Drawing.Point(10, 36);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(101, 33);
label1.Padding = new System.Windows.Forms.Padding(0, 8, 0, 0);
label1.Size = new System.Drawing.Size(69, 23);
label1.TabIndex = 40;
label1.Text = "Search Path";
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// textBox1
//
textBox1.Align = RyzStudio.Enums.ContentAlignment.Right;
textBox1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
textBox1.BackColor = System.Drawing.Color.Transparent;
textBox1.ClearedValue = "";
textBox1.EnableReactiveVisual = true;
textBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
textBox1.EnableMovable = false;
textBox1.EnableStepWidth = true;
textBox1.Icon = "O";
textBox1.IconSize = 13F;
textBox1.Location = new System.Drawing.Point(127, 78);
textBox1.Location = new System.Drawing.Point(154, 78);
textBox1.Name = "textBox1";
textBox1.Size = new System.Drawing.Size(318, 32);
textBox1.Size = new System.Drawing.Size(300, 32);
textBox1.TabIndex = 0;
textBox1.TabStop = false;
textBox1.UseSystemPasswordChar = false;
@ -229,32 +273,41 @@ namespace RandomFileRunner
// tHorizontalSeparator1
//
tHorizontalSeparator1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
tHorizontalSeparator1.AutoScrollMargin = new System.Drawing.Size(0, 0);
tHorizontalSeparator1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
tHorizontalSeparator1.BackColor = System.Drawing.Color.Transparent;
tHorizontalSeparator1.Location = new System.Drawing.Point(8, 164);
tHorizontalSeparator1.Margin = new System.Windows.Forms.Padding(0, 10, 0, 0);
tHorizontalSeparator1.MaximumSize = new System.Drawing.Size(5760, 22);
tHorizontalSeparator1.MinimumSize = new System.Drawing.Size(0, 22);
tHorizontalSeparator1.AutoPosition = true;
tHorizontalSeparator1.Location = new System.Drawing.Point(5, 166);
tHorizontalSeparator1.Name = "tHorizontalSeparator1";
tHorizontalSeparator1.Size = new System.Drawing.Size(448, 22);
tHorizontalSeparator1.TabIndex = 45;
tHorizontalSeparator1.TabStop = false;
tHorizontalSeparator1.Size = new System.Drawing.Size(454, 10);
//
// button5
//
button5.ActiveImage = null;
button5.Align = RyzStudio.Enums.ContentAlignment.None;
button5.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
button5.BackColor = System.Drawing.Color.Transparent;
button5.EnableMenuOnClick = false;
button5.EnableReactiveVisual = true;
button5.EnableMovable = false;
button5.EnableStepWidth = true;
button5.HoverImage = null;
button5.IdleImage = null;
//
//
//
button5.Label.BackColor = System.Drawing.Color.White;
button5.Label.Dock = System.Windows.Forms.DockStyle.Fill;
button5.Label.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
button5.Label.ForeColor = System.Drawing.Color.FromArgb(126, 54, 244);
button5.Label.Location = new System.Drawing.Point(4, 4);
button5.Label.Margin = new System.Windows.Forms.Padding(0);
button5.Label.Name = "label1";
button5.Label.Size = new System.Drawing.Size(133, 30);
button5.Label.TabIndex = 0;
button5.Label.Text = "&Run Next";
button5.Label.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
button5.LabelText = "&Run Next";
button5.Location = new System.Drawing.Point(127, 309);
button5.Location = new System.Drawing.Point(314, 299);
button5.Name = "button5";
button5.Size = new System.Drawing.Size(149, 33);
button5.Size = new System.Drawing.Size(140, 37);
button5.TabIndex = 5;
button5.TabStop = false;
button5.MouseClick += button5_MouseClick;
//
// openFileDialog2
@ -269,38 +322,38 @@ namespace RandomFileRunner
//
// progressBar2
//
progressBar2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
progressBar2.Align = RyzStudio.Enums.ContentAlignment.None;
progressBar2.BackColor = System.Drawing.Color.Transparent;
progressBar2.BarColour = System.Drawing.Color.FromArgb(79, 193, 203);
progressBar2.BarTextColour = System.Drawing.Color.Black;
progressBar2.EnableReactiveVisual = false;
progressBar2.Font = new System.Drawing.Font("Segoe UI", 9F);
progressBar2.Location = new System.Drawing.Point(127, 215);
progressBar2.Dock = System.Windows.Forms.DockStyle.Fill;
progressBar2.EnableMovable = false;
progressBar2.EnableStepWidth = false;
progressBar2.Location = new System.Drawing.Point(3, 3);
progressBar2.Maximum = 100;
progressBar2.Minimum = 0;
progressBar2.Name = "progressBar2";
progressBar2.ProgressText = "50/100";
progressBar2.ShowProgressText = true;
progressBar2.Size = new System.Drawing.Size(318, 20);
progressBar2.OnProgressChanged = null;
progressBar2.ShowText = true;
progressBar2.Size = new System.Drawing.Size(438, 14);
progressBar2.TabIndex = 46;
progressBar2.TabStop = false;
progressBar2.Value = 50;
//
// progressBar1
//
progressBar1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
progressBar1.Align = RyzStudio.Enums.ContentAlignment.None;
progressBar1.BackColor = System.Drawing.Color.Transparent;
progressBar1.BarColour = System.Drawing.Color.FromArgb(79, 202, 130);
progressBar1.BarTextColour = System.Drawing.Color.Black;
progressBar1.EnableReactiveVisual = false;
progressBar1.Font = new System.Drawing.Font("Segoe UI", 9F);
progressBar1.Location = new System.Drawing.Point(127, 192);
progressBar1.Dock = System.Windows.Forms.DockStyle.Fill;
progressBar1.EnableMovable = false;
progressBar1.EnableStepWidth = false;
progressBar1.Location = new System.Drawing.Point(3, 3);
progressBar1.Maximum = 100;
progressBar1.Minimum = 0;
progressBar1.Name = "progressBar1";
progressBar1.ProgressText = "50/100";
progressBar1.ShowProgressText = true;
progressBar1.Size = new System.Drawing.Size(318, 20);
progressBar1.OnProgressChanged = null;
progressBar1.ShowText = true;
progressBar1.Size = new System.Drawing.Size(438, 14);
progressBar1.TabIndex = 47;
progressBar1.TabStop = false;
progressBar1.Value = 50;
@ -309,88 +362,93 @@ namespace RandomFileRunner
//
label3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
label3.AutoEllipsis = true;
label3.Location = new System.Drawing.Point(127, 256);
label3.Location = new System.Drawing.Point(10, 261);
label3.Margin = new System.Windows.Forms.Padding(0);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(318, 15);
label3.Size = new System.Drawing.Size(446, 15);
label3.TabIndex = 49;
label3.Text = "label3";
//
// label4
//
label4.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
label4.Location = new System.Drawing.Point(127, 241);
label4.Location = new System.Drawing.Point(10, 246);
label4.Margin = new System.Windows.Forms.Padding(0);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(318, 15);
label4.Size = new System.Drawing.Size(446, 15);
label4.TabIndex = 48;
label4.Text = "label4";
//
// tHorizontalSeparator3
//
tHorizontalSeparator3.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
tHorizontalSeparator3.AutoScrollMargin = new System.Drawing.Size(0, 0);
tHorizontalSeparator3.AutoScrollMinSize = new System.Drawing.Size(0, 0);
tHorizontalSeparator3.BackColor = System.Drawing.Color.Transparent;
tHorizontalSeparator3.Location = new System.Drawing.Point(8, 281);
tHorizontalSeparator3.Margin = new System.Windows.Forms.Padding(0, 10, 0, 0);
tHorizontalSeparator3.MaximumSize = new System.Drawing.Size(5760, 22);
tHorizontalSeparator3.MinimumSize = new System.Drawing.Size(0, 22);
tHorizontalSeparator3.AutoPosition = true;
tHorizontalSeparator3.Location = new System.Drawing.Point(5, 281);
tHorizontalSeparator3.Name = "tHorizontalSeparator3";
tHorizontalSeparator3.Size = new System.Drawing.Size(448, 22);
tHorizontalSeparator3.TabIndex = 50;
tHorizontalSeparator3.TabStop = false;
//
// label2
//
label2.Location = new System.Drawing.Point(13, 192);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(101, 33);
label2.TabIndex = 51;
label2.Text = "Search Engine";
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
tHorizontalSeparator3.Size = new System.Drawing.Size(454, 10);
//
// textBox2
//
textBox2.Align = RyzStudio.Enums.ContentAlignment.Right;
textBox2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
textBox2.BackColor = System.Drawing.Color.Transparent;
textBox2.EnableReactiveVisual = true;
textBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
textBox2.EnableMovable = false;
textBox2.EnableStepWidth = true;
textBox2.Icon = "M";
textBox2.IconSize = 13F;
textBox2.Location = new System.Drawing.Point(127, 36);
textBox2.Location = new System.Drawing.Point(134, 36);
textBox2.Name = "textBox2";
textBox2.Size = new System.Drawing.Size(318, 32);
textBox2.Size = new System.Drawing.Size(320, 32);
textBox2.TabIndex = 52;
textBox2.TabStop = false;
textBox2.UseSystemPasswordChar = false;
textBox2.OnButtonClick += textBox2_OnButtonClick;
//
// button4
//
button4.ActiveImage = null;
button4.BackColor = System.Drawing.Color.Transparent;
button4.EnableMenuOnClick = false;
button4.EnableReactiveVisual = true;
button4.HoverImage = null;
button4.IdleImage = null;
button4.LabelText = "Save File &List";
button4.Location = new System.Drawing.Point(296, 309);
button4.Name = "button4";
button4.Size = new System.Drawing.Size(149, 33);
button4.TabIndex = 53;
button4.TabStop = false;
button4.MouseClick += button4_MouseClick;
//
// dialogFooter1
//
dialogFooter1.Align = RyzStudio.Enums.ContentAlignment.None;
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
dialogFooter1.Button1Text = "&Close";
dialogFooter1.Dialog = this;
dialogFooter1.Button1Result = System.Windows.Forms.DialogResult.OK;
dialogFooter1.Button1Text = "";
dialogFooter1.Button1Visible = false;
dialogFooter1.Button2Result = System.Windows.Forms.DialogResult.Cancel;
dialogFooter1.Button2Text = "&Close";
dialogFooter1.Button2Visible = true;
dialogFooter1.Dock = System.Windows.Forms.DockStyle.Bottom;
dialogFooter1.Location = new System.Drawing.Point(0, 517);
dialogFooter1.EnableMovable = false;
dialogFooter1.EnableStepWidth = false;
dialogFooter1.Location = new System.Drawing.Point(0, 531);
dialogFooter1.Name = "dialogFooter1";
dialogFooter1.Size = new System.Drawing.Size(464, 84);
dialogFooter1.Size = new System.Drawing.Size(464, 70);
dialogFooter1.TabIndex = 0;
dialogFooter1.TabStop = false;
dialogFooter1.OnButton2Click += dialogFooter1_OnButton2Click;
//
// t3UserControl1
//
t3UserControl1.Align = RyzStudio.Enums.ContentAlignment.None;
t3UserControl1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
t3UserControl1.BackColor = System.Drawing.Color.Transparent;
t3UserControl1.Controls.Add(progressBar1);
t3UserControl1.EnableMovable = false;
t3UserControl1.EnableStepWidth = false;
t3UserControl1.Location = new System.Drawing.Point(10, 186);
t3UserControl1.Name = "t3UserControl1";
t3UserControl1.Size = new System.Drawing.Size(444, 20);
t3UserControl1.TabIndex = 56;
//
// t3UserControl2
//
t3UserControl2.Align = RyzStudio.Enums.ContentAlignment.None;
t3UserControl2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
t3UserControl2.BackColor = System.Drawing.Color.Transparent;
t3UserControl2.Controls.Add(progressBar2);
t3UserControl2.EnableMovable = false;
t3UserControl2.EnableStepWidth = false;
t3UserControl2.Location = new System.Drawing.Point(10, 211);
t3UserControl2.Name = "t3UserControl2";
t3UserControl2.Size = new System.Drawing.Size(444, 20);
t3UserControl2.TabIndex = 57;
//
// MainForm
//
@ -399,15 +457,13 @@ namespace RandomFileRunner
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
BackColor = System.Drawing.Color.FromArgb(250, 250, 250);
ClientSize = new System.Drawing.Size(464, 601);
Controls.Add(t3UserControl2);
Controls.Add(t3UserControl1);
Controls.Add(dialogFooter1);
Controls.Add(button4);
Controls.Add(textBox2);
Controls.Add(label2);
Controls.Add(tHorizontalSeparator3);
Controls.Add(label3);
Controls.Add(label4);
Controls.Add(progressBar2);
Controls.Add(progressBar1);
Controls.Add(button5);
Controls.Add(tHorizontalSeparator1);
Controls.Add(textBox1);
@ -423,13 +479,15 @@ namespace RandomFileRunner
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout();
t3UserControl1.ResumeLayout(false);
t3UserControl2.ResumeLayout(false);
ResumeLayout(false);
PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private RyzStudio.Windows.ThemedForms.ThButton button2;
private RyzStudio.Windows.ThemedForms.T3Button button2;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.MenuStrip menuStrip1;
@ -448,19 +506,21 @@ namespace RandomFileRunner
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem1;
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator1;
private System.Windows.Forms.Label label1;
private RyzStudio.Windows.ThemedForms.ButtonTextBox.ThClearableTextBox textBox1;
private RyzStudio.Windows.ThemedForms.ThButton button5;
private RyzStudio.Windows.FontForms.TextBox.T4ClearTextBox textBox1;
private RyzStudio.Windows.ThemedForms.T3Button button5;
private System.Windows.Forms.OpenFileDialog openFileDialog2;
private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private RyzStudio.Windows.ThemedForms.ThProgressBar progressBar2;
private RyzStudio.Windows.ThemedForms.ThProgressBar progressBar1;
private RyzStudio.Windows.Forms.TProgressBar progressBar2;
private RyzStudio.Windows.Forms.TProgressBar progressBar1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator3;
private System.Windows.Forms.Label label2;
private RyzStudio.Windows.ThemedForms.ThHiButtonTextBox textBox2;
private RyzStudio.Windows.ThemedForms.ThButton button4;
private RyzStudio.Windows.ThemedForms.T4TextBox textBox2;
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
private RyzStudio.Windows.ThemedForms.T3UserControl t3UserControl1;
private RyzStudio.Windows.ThemedForms.T3UserControl t3UserControl2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
}
}

View File

@ -1,29 +1,21 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using RyzStudio.IO;
using RyzStudio.Runtime.InteropServices;
using RyzStudio.Windows.Forms;
using RyzStudio.Windows.ThemedForms;
namespace RandomFileRunner
{
public partial class MainForm : Form
{
private readonly Random _randy;
private readonly FileSearcher _fileSearcher;
private CancellationTokenSource _cancellationToken = new CancellationTokenSource();
private bool _isBusy = false;
private List<string> _searchPaths = new List<string>();
private List<string> _foundFiles = new List<string>();
private Process _currentProcess = null;
@ -34,7 +26,6 @@ namespace RandomFileRunner
textBox2.TextBox.ReadOnly = true;
_randy = new Random();
_fileSearcher = new FileSearcher();
_fileSearcher.OnDirectoryFound += fileSearcher_OnDirectoryFound;
_fileSearcher.OnFileFound += fileSearcher_OnFileFound;
@ -52,15 +43,24 @@ namespace RandomFileRunner
{
base.OnShown(e);
var args = RyzStudio.Windows.Forms.WinApplication.GetCommandLine();
var args = this.GetCommandLine();
string jsonfigFilename = null;
if (!args.TryGetValue("o", out jsonfigFilename))
{
if (!args.TryGetValue("open", out jsonfigFilename))
{
jsonfigFilename = null;
}
}
string jsonfigFilename = args.Where(x => (x.Key.Equals("o") || x.Key.Equals("open"))).Select(x => x.Value).FirstOrDefault();
if (string.IsNullOrWhiteSpace(jsonfigFilename))
{
jsonfigFilename = Path.ChangeExtension(Application.ExecutablePath, "jsonfig");
}
if (!string.IsNullOrWhiteSpace(jsonfigFilename) && System.IO.File.Exists(jsonfigFilename))
if (System.IO.File.Exists(jsonfigFilename))
{
await LoadSessionFile(jsonfigFilename);
}
@ -68,9 +68,9 @@ namespace RandomFileRunner
textBox2.Focus();
}
protected override void OnClosing(CancelEventArgs e)
protected override void OnFormClosing(FormClosingEventArgs e)
{
base.OnClosing(e);
base.OnFormClosing(e);
if (this.IsBusy)
{
@ -121,33 +121,53 @@ namespace RandomFileRunner
public bool IsBusy
{
get => _isBusy;
set
get => field;
private set
{
_isBusy = value;
field = value;
UIControl.SetValue(pictureBox1, (_isBusy ? RyzStudio.Windows.ThemedForms.Resource2.loading_block : null));
UIControl.SetEnable(textBox1, !_isBusy);
button2.LabelText = (_isBusy ? "&Cancel" : "&Search");
UIControl.SetEnable(button5, !_isBusy);
UIControl.SetEnable(button4, !_isBusy);
UIControl.Invoke(pictureBox1, (x) => pictureBox1.Image = (value ? RyzStudio.Resources.T3Resource.loading_block : null));
UIControl.Invoke(textBox1, (x) => textBox1.Enabled = !value);
UIControl.Invoke(button2, (x) => button2.LabelText = (value ? "&Cancel" : "&Search"));
UIControl.Invoke(button5, (x) => button5.Enabled = !value);
}
}
public AppSession CurrentSession { get; set; } = new AppSession();
public AppSession CurrentSession
{
get
{
if (field == null) field = new AppSession();
return field;
}
private set => field = value;
} = new AppSession();
public List<string> SearchPaths
{
get => _searchPaths;
set
get
{
_searchPaths = value;
if (field == null) field = new List<string>();
textBox2.Text = string.Join(", ", _searchPaths.ToArray());
return field;
}
private set
{
field = value;
textBox2.Text = string.Join(", ", field.ToArray());
}
}
private void menuStrip1_MenuActivate(object sender, EventArgs e)
{
saveAsToolStripMenuItem.Enabled = (!this.IsBusy && (SearchPaths.Count > 0));
toolStripMenuItem2.Enabled = (!this.IsBusy && (_foundFiles.Count > 0));
}
#region Main Menu
/// <summary>
@ -213,6 +233,40 @@ namespace RandomFileRunner
}
}
/// <summary>
/// Export file list
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void toolStripMenuItem2_Click(object sender, EventArgs e)
{
if (this.IsBusy)
{
return;
}
if (_foundFiles.Count <= 0)
{
return;
}
saveFileDialog1.Title = "Save File List";
saveFileDialog1.Filter = "Text files (*.txt)|*.txt";
saveFileDialog1.DefaultExt = "txt";
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
await System.IO.File.WriteAllTextAsync(saveFileDialog1.FileName, string.Join(Environment.NewLine, _foundFiles.ToArray()));
}
catch (Exception exc)
{
RyzStudio.Forms.T3MessageBox.Show(this, exc.Message, "Save File List", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
/// <summary>
/// Close
/// </summary>
@ -223,6 +277,16 @@ namespace RandomFileRunner
this.Close();
}
/// <summary>
/// Export file list
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void toolStripMenuItem1_Click(object sender, EventArgs e)
{
}
/// <summary>
/// Options
/// </summary>
@ -244,6 +308,7 @@ namespace RandomFileRunner
}
}
/// <summary>
/// Help
/// </summary>
@ -261,7 +326,7 @@ namespace RandomFileRunner
/// <param name="e"></param>
private void aboutToolStripMenuItem1_Click(object sender, EventArgs e)
{
var form = new RyzStudio.Windows.ThemedForms.AboutForm();
var form = new RyzStudio.Forms.T3AboutForm();
form.ProductURL = AppResource.AppProductURL;
form.AuthorURL = AppResource.AppAuthorURL;
form.CompanyURL = AppResource.AppCompanyURL;
@ -281,7 +346,7 @@ namespace RandomFileRunner
{
_foundFiles.Add(fileName);
UIControl.SetText(label3, Path.GetFileName(fileName));
UIControl.Invoke(label3, (x) => label3.Text = Path.GetFileName(fileName));
progressBar2.Maximum = (sender.FileCount + sender.NoAccessFileCount);
progressBar2.Value = sender.FileCount;
@ -292,7 +357,7 @@ namespace RandomFileRunner
{
await Task.Run(() =>
{
UIControl.SetText(label4, Path.GetFileName(directoryName));
UIControl.Invoke(label4, (x) => label4.Text = Path.GetFileName(directoryName));
progressBar1.Maximum = sender.DirectoryCount;
progressBar1.Value = sender.BufferLevel;
@ -303,8 +368,8 @@ namespace RandomFileRunner
{
await Task.Run(() =>
{
UIControl.SetText(label4, $"Done in {Math.Floor(elapsedTime.TotalMinutes)}m {elapsedTime.Seconds}s");
UIControl.SetText(label3, ((_foundFiles.Count <= 0) ? "0" : _foundFiles.Count.ToString("#,#", System.Globalization.CultureInfo.CurrentCulture)) + " File" + ((_foundFiles.Count == 1) ? "" : "s") + " Found");
UIControl.Invoke(label4, (x) => label4.Text = $"Done in {Math.Floor(elapsedTime.TotalMinutes)}m {elapsedTime.Seconds}s");
UIControl.Invoke(label3, (x) => label3.Text = ((_foundFiles.Count <= 0) ? "0" : _foundFiles.Count.ToString("#,#", System.Globalization.CultureInfo.CurrentCulture)) + " File" + ((_foundFiles.Count == 1) ? "" : "s") + " Found");
progressBar1.Value = sender.BufferLevel;
progressBar2.Value = sender.FileCount;
@ -345,8 +410,8 @@ namespace RandomFileRunner
this.IsBusy = true;
progressBar1.ShowProgressText = true;
progressBar2.ShowProgressText = true;
progressBar1.ShowText = true;
progressBar2.ShowText = true;
_foundFiles = new List<string>();
_cancellationToken = new CancellationTokenSource();
@ -379,7 +444,7 @@ namespace RandomFileRunner
}
}
UIControl.SetText(label3, ((_foundFiles.Count <= 0) ? "0" : _foundFiles.Count.ToString("#,#", System.Globalization.CultureInfo.CurrentCulture)) + " File" + ((_foundFiles.Count == 1) ? "" : "s") + " Found");
UIControl.Invoke(label3, (x) => label3.Text = ((_foundFiles.Count <= 0) ? "0" : _foundFiles.Count.ToString("#,#", System.Globalization.CultureInfo.CurrentCulture)) + " File" + ((_foundFiles.Count == 1) ? "" : "s") + " Found");
});
if (_fileSearcher.SearchPath.Count > 0)
@ -411,12 +476,7 @@ namespace RandomFileRunner
await Task.Run(() =>
{
//this.IsBusy = true;
if (this.CurrentSession == null)
{
this.CurrentSession = new AppSession();
}
this.IsBusy = true;
if (this.CurrentSession.ClosePrevOnNext)
{
@ -428,7 +488,7 @@ namespace RandomFileRunner
// retry 8 times
for (int i = 0; i < this.CurrentSession.RetryOnError; i++)
{
filename = _foundFiles[_randy.Next(0, (_foundFiles.Count - 1))];
filename = _foundFiles[Random.Shared.Next(0, (_foundFiles.Count - 1))];
if (System.IO.File.Exists(filename))
{
continue;
@ -442,44 +502,10 @@ namespace RandomFileRunner
_currentProcess = RyzStudio.Diagnostics.Process.Execute(filename);
}
//this.IsBusy = false;
this.IsBusy = false;
});
}
/// <summary>
/// Save File List
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void button4_MouseClick(object sender, MouseEventArgs e)
{
if (this.IsBusy)
{
return;
}
if (_foundFiles.Count <= 0)
{
return;
}
saveFileDialog1.Title = "Save File List";
saveFileDialog1.Filter = "Text files (*.txt)|*.txt";
saveFileDialog1.DefaultExt = "txt";
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
try
{
await System.IO.File.WriteAllTextAsync(saveFileDialog1.FileName, string.Join(Environment.NewLine, _foundFiles.ToArray()));
}
catch (Exception exc)
{
ThMessageBox.Show(this, exc.Message, "Save File List", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
/// <summary>
/// Close
/// </summary>
@ -538,18 +564,18 @@ namespace RandomFileRunner
textBox1.Text = "*.*";
progressBar1.Clear(0, 0, 0);
progressBar2.Clear(0, 0, 0);
progressBar1.Clear(0);
progressBar2.Clear(0);
UIControl.SetText(label4, "");
UIControl.SetText(label3, "");
UIControl.Invoke(label4, (x) => label4.Text = "");
UIControl.Invoke(label3, (x) => label3.Text = "");
}
protected async Task LoadSessionFile(string filename)
{
await Task.Run(() =>
await Task.Run(async () =>
{
this.CurrentSession = RyzStudio.Text.Json.JsonSerialiser.DeserialiseFile<AppSession>(filename) ?? new AppSession();
this.CurrentSession = await RyzStudio.Text.Json.JsonSerialiser.DeserialiseFile<AppSession>(filename);
ClearSession();
@ -590,16 +616,21 @@ namespace RandomFileRunner
}
var result = RyzStudio.Text.Json.JsonSerialiser.SerialiseFile(filename, this.CurrentSession);
if (result.IsSuccess)
if (result.Success)
{
ThMessageBox.Show(this, "Session saved!", "Save session");
RyzStudio.Forms.T3MessageBox.Show(this, "Session saved!", "Save session");
}
else
{
ThMessageBox.Show(this, result.Message, "Save session", MessageBoxButtons.OK, MessageBoxIcon.Error);
RyzStudio.Forms.T3MessageBox.Show(this, result.Message, "Save session", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
});
}
private void dialogFooter1_OnButton2Click(object sender, MouseEventArgs e)
{
this.Close();
}
}
}

View File

@ -118,19 +118,19 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>127, 15</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>716, 17</value>
<value>14, 15</value>
</metadata>
<metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1155, 17</value>
<value>224, 15</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1295, 17</value>
<value>363, 15</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>52</value>
<value>92</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using RyzStudio.Windows.Forms;
using RyzStudio.Windows.ThemedForms;
@ -8,9 +9,9 @@ namespace RandomFileRunner
{
public class MemoBoxForm : Form
{
private ThMemoBox memoBox1;
private ThButton button3;
private ThButton button4;
private RyzStudio.Windows.ThemedForms.T3MemoBox memoBox1;
private RyzStudio.Windows.ThemedForms.T3Button button3;
private RyzStudio.Windows.ThemedForms.T3Button button4;
private ContextMenuStrip contextMenuStrip1;
private System.ComponentModel.IContainer components;
private ToolStripMenuItem addDirectoryToolStripMenuItem;
@ -24,7 +25,7 @@ namespace RandomFileRunner
{
InitializeComponent();
UISetup.Dialog(this);
this.SetupDialog();
if (lines != null)
{
@ -37,12 +38,12 @@ namespace RandomFileRunner
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
memoBox1 = new ThMemoBox();
button3 = new ThButton();
memoBox1 = new T3MemoBox();
button3 = new T3Button();
contextMenuStrip1 = new ContextMenuStrip(components);
addDirectoryToolStripMenuItem = new ToolStripMenuItem();
addFileToolStripMenuItem = new ToolStripMenuItem();
button4 = new ThButton();
button4 = new T3Button();
folderBrowserDialog1 = new FolderBrowserDialog();
openFileDialog1 = new OpenFileDialog();
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
@ -54,7 +55,6 @@ namespace RandomFileRunner
memoBox1.AllowDrop = true;
memoBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
memoBox1.BackColor = System.Drawing.Color.Transparent;
memoBox1.EnableReactiveVisual = true;
memoBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
memoBox1.Location = new System.Drawing.Point(10, 70);
memoBox1.Name = "memoBox1";
@ -72,7 +72,6 @@ namespace RandomFileRunner
button3.BackColor = System.Drawing.Color.Transparent;
button3.ContextMenuStrip = contextMenuStrip1;
button3.EnableMenuOnClick = true;
button3.EnableReactiveVisual = true;
button3.HoverImage = null;
button3.IdleImage = null;
button3.LabelText = "&Add";
@ -108,7 +107,6 @@ namespace RandomFileRunner
button4.Anchor = AnchorStyles.Top | AnchorStyles.Right;
button4.BackColor = System.Drawing.Color.Transparent;
button4.EnableMenuOnClick = false;
button4.EnableReactiveVisual = true;
button4.HoverImage = null;
button4.IdleImage = null;
button4.LabelText = "&Clear";
@ -131,7 +129,6 @@ namespace RandomFileRunner
//
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
dialogFooter1.Button1Text = "&OK";
dialogFooter1.Dialog = this;
dialogFooter1.Dock = DockStyle.Bottom;
dialogFooter1.Location = new System.Drawing.Point(0, 437);
dialogFooter1.Name = "dialogFooter1";
@ -166,7 +163,7 @@ namespace RandomFileRunner
public List<string> Result
{
get => memoBox1.Lines;
get => memoBox1.Lines?.ToList() ?? new List<string>();
}

View File

@ -1,19 +1,17 @@
using System;
using System.Windows.Forms;
using RyzStudio.Windows.Forms;
using RyzStudio.Windows.ThemedForms.ButtonTextBox;
using RyzStudio.Windows.ThemedForms.PickerBox;
namespace RandomFileRunner
{
public class OptionsForm : Form
{
private ThYesNoPickerBox pickerBox1;
private RyzStudio.Windows.ThemedForms.T3YnPickerBox pickerBox1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label8;
private ThNumericPickerBox pickerBox2;
private ThKeyCodeTextBox textBox1;
private ThYesNoPickerBox pickerBox3;
private RyzStudio.Windows.ThemedForms.T4NumericBox pickerBox2;
private RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox textBox1;
private RyzStudio.Windows.ThemedForms.T3YnPickerBox pickerBox3;
private Label label1;
private RyzStudio.Windows.Forms.THorizontalSeparator tHorizontalSeparator3;
private Label label2;
@ -28,7 +26,7 @@ namespace RandomFileRunner
{
InitializeComponent();
UISetup.Dialog(this);
this.SetupDialog();
_session = session;
@ -47,14 +45,14 @@ namespace RandomFileRunner
private void InitializeComponent()
{
ThKeyCodeTextBox.Results results1 = new ThKeyCodeTextBox.Results();
pickerBox1 = new ThYesNoPickerBox();
RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results results1 = new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox.Results();
pickerBox1 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
label6 = new Label();
label8 = new Label();
tHorizontalSeparator2 = new THorizontalSeparator();
pickerBox2 = new ThNumericPickerBox();
textBox1 = new ThKeyCodeTextBox();
pickerBox3 = new ThYesNoPickerBox();
pickerBox2 = new RyzStudio.Windows.ThemedForms.T4NumericBox();
textBox1 = new RyzStudio.Windows.FontForms.TextBox.T4KeyTextBox();
pickerBox3 = new RyzStudio.Windows.ThemedForms.T3YnPickerBox();
label1 = new Label();
tHorizontalSeparator3 = new THorizontalSeparator();
label2 = new Label();
@ -65,7 +63,6 @@ namespace RandomFileRunner
//
pickerBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pickerBox1.BackColor = System.Drawing.Color.Transparent;
pickerBox1.EnableReactiveVisual = true;
pickerBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
pickerBox1.Location = new System.Drawing.Point(285, 20);
pickerBox1.Name = "pickerBox1";
@ -122,14 +119,11 @@ namespace RandomFileRunner
//
pickerBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pickerBox2.BackColor = System.Drawing.Color.Transparent;
pickerBox2.EnableReactiveVisual = true;
pickerBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
pickerBox2.Location = new System.Drawing.Point(285, 95);
pickerBox2.MaxDropDownItems = 10;
pickerBox2.Maximum = 50;
pickerBox2.Minimum = 0;
pickerBox2.Name = "pickerBox2";
pickerBox2.SelectedIndex = 0;
pickerBox2.Size = new System.Drawing.Size(84, 35);
pickerBox2.TabIndex = 1;
pickerBox2.TabStop = false;
@ -139,7 +133,6 @@ namespace RandomFileRunner
//
textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
textBox1.BackColor = System.Drawing.Color.Transparent;
textBox1.EnableReactiveVisual = true;
textBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
textBox1.Icon = "O";
textBox1.IconSize = 13F;
@ -159,7 +152,6 @@ namespace RandomFileRunner
//
pickerBox3.Anchor = AnchorStyles.Top | AnchorStyles.Right;
pickerBox3.BackColor = System.Drawing.Color.Transparent;
pickerBox3.EnableReactiveVisual = true;
pickerBox3.Font = new System.Drawing.Font("Segoe UI", 9F);
pickerBox3.Location = new System.Drawing.Point(285, 140);
pickerBox3.Name = "pickerBox3";
@ -216,7 +208,6 @@ namespace RandomFileRunner
//
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
dialogFooter1.Button1Text = "&Save";
dialogFooter1.Dialog = this;
dialogFooter1.Dock = DockStyle.Bottom;
dialogFooter1.Location = new System.Drawing.Point(0, 437);
dialogFooter1.Name = "dialogFooter1";

View File

@ -12,9 +12,10 @@ namespace RandomFileRunner
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows8.0</TargetFramework>
<TargetFramework>net10.0-windows8.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AssemblyName>randomfilerunner</AssemblyName>
<Authors>Ray Lam</Authors>
@ -40,8 +40,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="RyzStudio" Version="8.1.2.249" />
<PackageReference Include="RyzStudio.Windows.Forms" Version="8.1.3.614" />
<PackageReference Include="RyzStudio" Version="10.1.1.261" />
<PackageReference Include="RyzStudio.Windows.Forms" Version="10.3.0.77" />
<PackageReference Include="RyzStudio.Windows.Forms.Themed" Version="10.3.0.57" />
</ItemGroup>
<ItemGroup>

BIN
Resources/folder-minus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

BIN
Resources/help-circle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

BIN
Resources/save.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 424 B

BIN
Resources/settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB