Added "Close App" option to completion actions

This commit is contained in:
n00mkrad
2021-08-02 12:39:44 +02:00
parent 21942e8d48
commit e2cdb791fd
2 changed files with 53 additions and 49 deletions

95
Code/Form1.Designer.cs generated
View File

@@ -91,6 +91,9 @@
this.label15 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.interpOptsTab = new System.Windows.Forms.TabPage();
this.completionActionPanel = new System.Windows.Forms.Panel();
this.completionAction = new System.Windows.Forms.ComboBox();
this.label25 = new System.Windows.Forms.Label();
this.encodingSettingsBtn = new HTAlt.WinForms.HTButton();
this.scnDetectTestBtn = new HTAlt.WinForms.HTButton();
this.inputInfo = new System.Windows.Forms.Label();
@@ -134,9 +137,6 @@
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.pauseBtn = new System.Windows.Forms.Button();
this.cancelBtn = new System.Windows.Forms.Button();
this.completionAction = new System.Windows.Forms.ComboBox();
this.label25 = new System.Windows.Forms.Label();
this.completionActionPanel = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
@@ -148,6 +148,7 @@
this.panel8.SuspendLayout();
this.panel6.SuspendLayout();
this.interpOptsTab.SuspendLayout();
this.completionActionPanel.SuspendLayout();
this.quickSettingsTab.SuspendLayout();
this.mpDedupePanel.SuspendLayout();
this.magickDedupePanel.SuspendLayout();
@@ -159,7 +160,6 @@
this.abtTab.SuspendLayout();
this.busyControlsPanel.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.completionActionPanel.SuspendLayout();
this.SuspendLayout();
//
// titleLabel
@@ -961,6 +961,48 @@
this.interpOptsTab.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.interpOptsTab.DragEnter += new System.Windows.Forms.DragEventHandler(this.Form1_DragEnter);
//
// completionActionPanel
//
this.completionActionPanel.Controls.Add(this.completionAction);
this.completionActionPanel.Controls.Add(this.label25);
this.completionActionPanel.Location = new System.Drawing.Point(681, 218);
this.completionActionPanel.Margin = new System.Windows.Forms.Padding(0);
this.completionActionPanel.Name = "completionActionPanel";
this.completionActionPanel.Size = new System.Drawing.Size(220, 40);
this.completionActionPanel.TabIndex = 42;
//
// completionAction
//
this.completionAction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.completionAction.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.completionAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.completionAction.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.completionAction.ForeColor = System.Drawing.Color.White;
this.completionAction.FormattingEnabled = true;
this.completionAction.Items.AddRange(new object[] {
"Do Nothing",
"Close App",
"Sleep",
"Hibernate",
"Shutdown"});
this.completionAction.Location = new System.Drawing.Point(84, 11);
this.completionAction.Name = "completionAction";
this.completionAction.Size = new System.Drawing.Size(130, 23);
this.completionAction.TabIndex = 40;
//
// label25
//
this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.label25.AutoSize = true;
this.label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label25.ForeColor = System.Drawing.Color.Silver;
this.label25.Location = new System.Drawing.Point(10, 15);
this.label25.Margin = new System.Windows.Forms.Padding(8, 0, 3, 0);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(68, 13);
this.label25.TabIndex = 41;
this.label25.Text = "When Done:";
//
// encodingSettingsBtn
//
this.encodingSettingsBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
@@ -1590,47 +1632,6 @@
this.cancelBtn.UseVisualStyleBackColor = true;
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
//
// completionAction
//
this.completionAction.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.completionAction.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.completionAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.completionAction.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.completionAction.ForeColor = System.Drawing.Color.White;
this.completionAction.FormattingEnabled = true;
this.completionAction.Items.AddRange(new object[] {
"Do Nothing",
"Sleep",
"Hibernate",
"Shutdown"});
this.completionAction.Location = new System.Drawing.Point(84, 11);
this.completionAction.Name = "completionAction";
this.completionAction.Size = new System.Drawing.Size(130, 23);
this.completionAction.TabIndex = 40;
//
// label25
//
this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.label25.AutoSize = true;
this.label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label25.ForeColor = System.Drawing.Color.Silver;
this.label25.Location = new System.Drawing.Point(10, 15);
this.label25.Margin = new System.Windows.Forms.Padding(8, 0, 3, 0);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(68, 13);
this.label25.TabIndex = 41;
this.label25.Text = "When Done:";
//
// completionActionPanel
//
this.completionActionPanel.Controls.Add(this.completionAction);
this.completionActionPanel.Controls.Add(this.label25);
this.completionActionPanel.Location = new System.Drawing.Point(681, 218);
this.completionActionPanel.Margin = new System.Windows.Forms.Padding(0);
this.completionActionPanel.Name = "completionActionPanel";
this.completionActionPanel.Size = new System.Drawing.Size(220, 40);
this.completionActionPanel.TabIndex = 42;
//
// Form1
//
this.AllowDrop = true;
@@ -1683,6 +1684,8 @@
this.panel6.PerformLayout();
this.interpOptsTab.ResumeLayout(false);
this.interpOptsTab.PerformLayout();
this.completionActionPanel.ResumeLayout(false);
this.completionActionPanel.PerformLayout();
this.quickSettingsTab.ResumeLayout(false);
this.quickSettingsTab.PerformLayout();
this.mpDedupePanel.ResumeLayout(false);
@@ -1697,8 +1700,6 @@
this.abtTab.ResumeLayout(false);
this.busyControlsPanel.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.completionActionPanel.ResumeLayout(false);
this.completionActionPanel.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();

View File

@@ -224,12 +224,15 @@ namespace Flowframes
public void CompletionAction ()
{
if (completionAction.SelectedIndex == 1)
new TimeoutForm(completionAction.Text, OSUtils.Sleep).ShowDialog();
new TimeoutForm(completionAction.Text, Application.Exit).ShowDialog();
if (completionAction.SelectedIndex == 2)
new TimeoutForm(completionAction.Text, OSUtils.Hibernate).ShowDialog();
new TimeoutForm(completionAction.Text, OSUtils.Sleep).ShowDialog();
if (completionAction.SelectedIndex == 3)
new TimeoutForm(completionAction.Text, OSUtils.Hibernate).ShowDialog();
if (completionAction.SelectedIndex == 4)
new TimeoutForm(completionAction.Text, OSUtils.Shutdown).ShowDialog();
}