From bdd995d08b5a4e7a72063ac58b8c47d629f2a070 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 31 Aug 2007 12:23:42 +0000 Subject: WinGui: - Cleaned up the Options window a bit. - Added On Encode Complete Options (in options) - A few small UI tweaks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@908 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Properties/Settings.Designer.cs | 12 +++ win/C#/Properties/Settings.settings | 3 + win/C#/app.config | 3 + win/C#/frmMain.cs | 32 +++++++- win/C#/frmOptions.Designer.cs | 143 ++++++++++++++++++--------------- win/C#/frmOptions.cs | 8 ++ win/C#/frmQueue.Designer.cs | 13 +-- win/C#/frmQueue.cs | 31 +++++++ 8 files changed, 172 insertions(+), 73 deletions(-) (limited to 'win') diff --git a/win/C#/Properties/Settings.Designer.cs b/win/C#/Properties/Settings.Designer.cs index db4342b49..6bfea184a 100644 --- a/win/C#/Properties/Settings.Designer.cs +++ b/win/C#/Properties/Settings.Designer.cs @@ -574,5 +574,17 @@ namespace Handbrake.Properties { this["tooltipEnable"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Do Nothing")] + public string CompletionOption { + get { + return ((string)(this["CompletionOption"])); + } + set { + this["CompletionOption"] = value; + } + } } } diff --git a/win/C#/Properties/Settings.settings b/win/C#/Properties/Settings.settings index 0bf338f22..338ca669f 100644 --- a/win/C#/Properties/Settings.settings +++ b/win/C#/Properties/Settings.settings @@ -140,5 +140,8 @@ Checked + + Do Nothing + \ No newline at end of file diff --git a/win/C#/app.config b/win/C#/app.config index a5239f96c..19f12804a 100644 --- a/win/C#/app.config +++ b/win/C#/app.config @@ -142,6 +142,9 @@ Checked + + Do Nothing + \ No newline at end of file diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 27b7ac813..e6db91e31 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1052,7 +1052,13 @@ namespace Handbrake process.setNull(); lbl_encode.Text = "Encoding Canceled"; } - + + + [DllImport("user32.dll")] + public static extern void LockWorkStation(); + [DllImport("user32.dll")] + public static extern int ExitWindowsEx(int uFlags, int dwReason); + private void procMonitor(object state) { // Make sure we are not already encoding and if we are then display an error. @@ -1095,9 +1101,33 @@ namespace Handbrake setEncodeLabel(); hbProc = null; + + // Do something whent he encode ends. + switch (Properties.Settings.Default.CompletionOption) + { + case "Shutdown": + System.Diagnostics.Process.Start("Shutdown", "-s -t 60"); + break; + case "Log Off": + ExitWindowsEx(0, 0); + break; + case "Suspend": + Application.SetSuspendState(PowerState.Suspend, true, true); + break; + case "Hibernate": + Application.SetSuspendState(PowerState.Hibernate, true, true); + break; + case "Lock System": + LockWorkStation(); + break; + default: + break; + } } } + private delegate void UpdateUIHandler(); + private void setEncodeLabel() { if (this.InvokeRequired) diff --git a/win/C#/frmOptions.Designer.cs b/win/C#/frmOptions.Designer.cs index 189958bc9..13ab0965c 100644 --- a/win/C#/frmOptions.Designer.cs +++ b/win/C#/frmOptions.Designer.cs @@ -31,9 +31,8 @@ namespace Handbrake System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmOptions)); this.drp_Priority = new System.Windows.Forms.ComboBox(); this.GroupBox2 = new System.Windows.Forms.GroupBox(); - this.Label1 = new System.Windows.Forms.Label(); + this.check_tooltip = new System.Windows.Forms.CheckBox(); this.check_updateCheck = new System.Windows.Forms.CheckBox(); - this.Label2 = new System.Windows.Forms.Label(); this.check_userDefaultSettings = new System.Windows.Forms.CheckBox(); this.Label4 = new System.Windows.Forms.Label(); this.check_verbose = new System.Windows.Forms.CheckBox(); @@ -44,11 +43,13 @@ namespace Handbrake this.GroupBox1 = new System.Windows.Forms.GroupBox(); this.check_guiDebug = new System.Windows.Forms.CheckBox(); this.btn_close = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); - this.check_tooltip = new System.Windows.Forms.CheckBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.drp_completeOption = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); this.GroupBox2.SuspendLayout(); this.GroupBox3.SuspendLayout(); this.GroupBox1.SuspendLayout(); + this.groupBox4.SuspendLayout(); this.SuspendLayout(); // // drp_Priority @@ -63,7 +64,7 @@ namespace Handbrake "Normal", "Below Normal", "Low"}); - this.drp_Priority.Location = new System.Drawing.Point(15, 91); + this.drp_Priority.Location = new System.Drawing.Point(223, 58); this.drp_Priority.Name = "drp_Priority"; this.drp_Priority.Size = new System.Drawing.Size(111, 21); this.drp_Priority.TabIndex = 43; @@ -72,61 +73,50 @@ namespace Handbrake // GroupBox2 // this.GroupBox2.BackColor = System.Drawing.SystemColors.ControlLight; - this.GroupBox2.Controls.Add(this.label3); this.GroupBox2.Controls.Add(this.check_tooltip); - this.GroupBox2.Controls.Add(this.Label1); this.GroupBox2.Controls.Add(this.check_updateCheck); - this.GroupBox2.Controls.Add(this.Label2); this.GroupBox2.Controls.Add(this.check_userDefaultSettings); this.GroupBox2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.GroupBox2.Location = new System.Drawing.Point(12, 11); this.GroupBox2.Name = "GroupBox2"; - this.GroupBox2.Size = new System.Drawing.Size(386, 173); + this.GroupBox2.Size = new System.Drawing.Size(386, 103); this.GroupBox2.TabIndex = 55; this.GroupBox2.TabStop = false; this.GroupBox2.Text = "General Settings"; // - // Label1 + // check_tooltip // - this.Label1.AutoSize = true; - this.Label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label1.Location = new System.Drawing.Point(13, 22); - this.Label1.Name = "Label1"; - this.Label1.Size = new System.Drawing.Size(151, 13); - this.Label1.TabIndex = 0; - this.Label1.Text = "Update Check on Startup"; + this.check_tooltip.AutoSize = true; + this.check_tooltip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.check_tooltip.Location = new System.Drawing.Point(15, 71); + this.check_tooltip.Name = "check_tooltip"; + this.check_tooltip.Size = new System.Drawing.Size(135, 17); + this.check_tooltip.TabIndex = 49; + this.check_tooltip.Text = "Enable GUI tooltips"; + this.check_tooltip.UseVisualStyleBackColor = true; + this.check_tooltip.CheckedChanged += new System.EventHandler(this.check_tooltip_CheckedChanged); // // check_updateCheck // this.check_updateCheck.AutoSize = true; this.check_updateCheck.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_updateCheck.Location = new System.Drawing.Point(16, 43); + this.check_updateCheck.Location = new System.Drawing.Point(15, 25); this.check_updateCheck.Name = "check_updateCheck"; - this.check_updateCheck.Size = new System.Drawing.Size(71, 17); + this.check_updateCheck.Size = new System.Drawing.Size(170, 17); this.check_updateCheck.TabIndex = 1; - this.check_updateCheck.Text = "Enabled"; + this.check_updateCheck.Text = "Update Check on Startup"; this.check_updateCheck.UseVisualStyleBackColor = true; this.check_updateCheck.CheckedChanged += new System.EventHandler(this.check_updateCheck_CheckedChanged); // - // Label2 - // - this.Label2.AutoSize = true; - this.Label2.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label2.Location = new System.Drawing.Point(13, 67); - this.Label2.Name = "Label2"; - this.Label2.Size = new System.Drawing.Size(229, 13); - this.Label2.TabIndex = 46; - this.Label2.Text = "Load Users Default Settings on Startup"; - // // check_userDefaultSettings // this.check_userDefaultSettings.AutoSize = true; this.check_userDefaultSettings.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_userDefaultSettings.Location = new System.Drawing.Point(16, 88); + this.check_userDefaultSettings.Location = new System.Drawing.Point(15, 48); this.check_userDefaultSettings.Name = "check_userDefaultSettings"; - this.check_userDefaultSettings.Size = new System.Drawing.Size(71, 17); + this.check_userDefaultSettings.Size = new System.Drawing.Size(248, 17); this.check_userDefaultSettings.TabIndex = 47; - this.check_userDefaultSettings.Text = "Enabled"; + this.check_userDefaultSettings.Text = "Load Users Default Settings on Startup"; this.check_userDefaultSettings.UseVisualStyleBackColor = true; this.check_userDefaultSettings.CheckedChanged += new System.EventHandler(this.check_userDefaultSettings_CheckedChanged); // @@ -134,7 +124,7 @@ namespace Handbrake // this.Label4.AutoSize = true; this.Label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label4.Location = new System.Drawing.Point(12, 73); + this.Label4.Location = new System.Drawing.Point(13, 61); this.Label4.Name = "Label4"; this.Label4.Size = new System.Drawing.Size(132, 13); this.Label4.TabIndex = 42; @@ -167,7 +157,7 @@ namespace Handbrake "6", "7", "8"}); - this.drp_processors.Location = new System.Drawing.Point(15, 40); + this.drp_processors.Location = new System.Drawing.Point(223, 22); this.drp_processors.Name = "drp_processors"; this.drp_processors.Size = new System.Drawing.Size(111, 21); this.drp_processors.TabIndex = 41; @@ -182,7 +172,7 @@ namespace Handbrake // this.Label11.AutoSize = true; this.Label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label11.Location = new System.Drawing.Point(12, 22); + this.Label11.Location = new System.Drawing.Point(12, 25); this.Label11.Name = "Label11"; this.Label11.Size = new System.Drawing.Size(142, 13); this.Label11.TabIndex = 40; @@ -196,9 +186,9 @@ namespace Handbrake this.GroupBox3.Controls.Add(this.drp_processors); this.GroupBox3.Controls.Add(this.Label11); this.GroupBox3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.GroupBox3.Location = new System.Drawing.Point(13, 190); + this.GroupBox3.Location = new System.Drawing.Point(12, 191); this.GroupBox3.Name = "GroupBox3"; - this.GroupBox3.Size = new System.Drawing.Size(386, 128); + this.GroupBox3.Size = new System.Drawing.Size(386, 94); this.GroupBox3.TabIndex = 56; this.GroupBox3.TabStop = false; this.GroupBox3.Text = "Processor Detection"; @@ -209,7 +199,7 @@ namespace Handbrake this.GroupBox1.Controls.Add(this.check_guiDebug); this.GroupBox1.Controls.Add(this.check_verbose); this.GroupBox1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.GroupBox1.Location = new System.Drawing.Point(13, 324); + this.GroupBox1.Location = new System.Drawing.Point(12, 291); this.GroupBox1.Name = "GroupBox1"; this.GroupBox1.Size = new System.Drawing.Size(386, 70); this.GroupBox1.TabIndex = 54; @@ -220,7 +210,7 @@ namespace Handbrake // this.check_guiDebug.AutoSize = true; this.check_guiDebug.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_guiDebug.Location = new System.Drawing.Point(187, 31); + this.check_guiDebug.Location = new System.Drawing.Point(223, 31); this.check_guiDebug.Name = "check_guiDebug"; this.check_guiDebug.Size = new System.Drawing.Size(131, 17); this.check_guiDebug.TabIndex = 52; @@ -235,7 +225,7 @@ namespace Handbrake this.btn_close.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_close.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_close.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.btn_close.Location = new System.Drawing.Point(292, 410); + this.btn_close.Location = new System.Drawing.Point(291, 371); this.btn_close.Name = "btn_close"; this.btn_close.Size = new System.Drawing.Size(107, 22); this.btn_close.TabIndex = 53; @@ -243,32 +233,51 @@ namespace Handbrake this.btn_close.UseVisualStyleBackColor = false; this.btn_close.Click += new System.EventHandler(this.btn_close_Click); // - // label3 - // - this.label3.AutoSize = true; - this.label3.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label3.Location = new System.Drawing.Point(13, 117); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(116, 13); - this.label3.TabIndex = 48; - this.label3.Text = "Enable GUI tooltips"; - // - // check_tooltip - // - this.check_tooltip.AutoSize = true; - this.check_tooltip.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.check_tooltip.Location = new System.Drawing.Point(16, 138); - this.check_tooltip.Name = "check_tooltip"; - this.check_tooltip.Size = new System.Drawing.Size(71, 17); - this.check_tooltip.TabIndex = 49; - this.check_tooltip.Text = "Enabled"; - this.check_tooltip.UseVisualStyleBackColor = true; - this.check_tooltip.CheckedChanged += new System.EventHandler(this.check_tooltip_CheckedChanged); + // groupBox4 + // + this.groupBox4.Controls.Add(this.drp_completeOption); + this.groupBox4.Controls.Add(this.label5); + this.groupBox4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.groupBox4.Location = new System.Drawing.Point(12, 120); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(386, 65); + this.groupBox4.TabIndex = 57; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "On Completion Options"; + // + // drp_completeOption + // + this.drp_completeOption.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.drp_completeOption.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.drp_completeOption.FormattingEnabled = true; + this.drp_completeOption.Items.AddRange(new object[] { + "Do Nothing", + "Shutdown", + "Suspend", + "Hibernate", + "Lock System", + "Log Off"}); + this.drp_completeOption.Location = new System.Drawing.Point(223, 29); + this.drp_completeOption.Name = "drp_completeOption"; + this.drp_completeOption.Size = new System.Drawing.Size(111, 21); + this.drp_completeOption.TabIndex = 43; + this.drp_completeOption.SelectedIndexChanged += new System.EventHandler(this.drp_completeOption_SelectedIndexChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(13, 29); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(173, 13); + this.label5.TabIndex = 42; + this.label5.Text = "When the encode completes:"; // // frmOptions // this.BackColor = System.Drawing.SystemColors.ControlLight; - this.ClientSize = new System.Drawing.Size(411, 444); + this.ClientSize = new System.Drawing.Size(411, 405); + this.Controls.Add(this.groupBox4); this.Controls.Add(this.GroupBox2); this.Controls.Add(this.GroupBox3); this.Controls.Add(this.GroupBox1); @@ -286,6 +295,8 @@ namespace Handbrake this.GroupBox3.PerformLayout(); this.GroupBox1.ResumeLayout(false); this.GroupBox1.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.ResumeLayout(false); } @@ -294,9 +305,7 @@ namespace Handbrake internal System.Windows.Forms.ComboBox drp_Priority; internal System.Windows.Forms.GroupBox GroupBox2; - internal System.Windows.Forms.Label Label1; internal System.Windows.Forms.CheckBox check_updateCheck; - internal System.Windows.Forms.Label Label2; internal System.Windows.Forms.CheckBox check_userDefaultSettings; internal System.Windows.Forms.Label Label4; internal System.Windows.Forms.CheckBox check_verbose; @@ -307,7 +316,9 @@ namespace Handbrake internal System.Windows.Forms.GroupBox GroupBox1; internal System.Windows.Forms.Button btn_close; internal System.Windows.Forms.CheckBox check_guiDebug; - internal System.Windows.Forms.Label label3; internal System.Windows.Forms.CheckBox check_tooltip; + private System.Windows.Forms.GroupBox groupBox4; + internal System.Windows.Forms.ComboBox drp_completeOption; + internal System.Windows.Forms.Label label5; } } \ No newline at end of file diff --git a/win/C#/frmOptions.cs b/win/C#/frmOptions.cs index a85792400..bc511f24c 100644 --- a/win/C#/frmOptions.cs +++ b/win/C#/frmOptions.cs @@ -27,6 +27,7 @@ namespace Handbrake } drp_processors.Text = Properties.Settings.Default.Processors; drp_Priority.Text = Properties.Settings.Default.processPriority; + drp_completeOption.Text = Properties.Settings.Default.CompletionOption; if (Properties.Settings.Default.verbose == "Checked") { @@ -85,6 +86,13 @@ namespace Handbrake Properties.Settings.Default.tooltipEnable = check_tooltip.CheckState.ToString(); } + private void drp_completeOption_SelectedIndexChanged(object sender, EventArgs e) + { + Properties.Settings.Default.CompletionOption = drp_completeOption.Text; + } + + + } } \ No newline at end of file diff --git a/win/C#/frmQueue.Designer.cs b/win/C#/frmQueue.Designer.cs index f5db97dbb..f3bb3e6e6 100644 --- a/win/C#/frmQueue.Designer.cs +++ b/win/C#/frmQueue.Designer.cs @@ -49,12 +49,12 @@ namespace Handbrake this.btn_down.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_down.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.btn_down.Location = new System.Drawing.Point(540, 9); + this.btn_down.Location = new System.Drawing.Point(585, 9); this.btn_down.Name = "btn_down"; - this.btn_down.Size = new System.Drawing.Size(100, 22); + this.btn_down.Size = new System.Drawing.Size(55, 22); this.btn_down.TabIndex = 33; this.btn_down.TabStop = false; - this.btn_down.Text = "Move Down"; + this.btn_down.Text = "Down"; this.btn_down.UseVisualStyleBackColor = false; this.btn_down.Click += new System.EventHandler(this.btn_down_Click); // @@ -65,12 +65,12 @@ namespace Handbrake this.btn_up.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btn_up.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); - this.btn_up.Location = new System.Drawing.Point(434, 9); + this.btn_up.Location = new System.Drawing.Point(539, 9); this.btn_up.Name = "btn_up"; - this.btn_up.Size = new System.Drawing.Size(100, 22); + this.btn_up.Size = new System.Drawing.Size(40, 22); this.btn_up.TabIndex = 32; this.btn_up.TabStop = false; - this.btn_up.Text = "Move Up"; + this.btn_up.Text = "Up"; this.btn_up.UseVisualStyleBackColor = false; this.btn_up.Click += new System.EventHandler(this.btn_up_Click); // @@ -189,6 +189,7 @@ namespace Handbrake this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.SystemColors.ControlLight; this.ClientSize = new System.Drawing.Size(657, 406); + this.ControlBox = false; this.Controls.Add(this.btn_minimise); this.Controls.Add(this.lbl_progressValue); this.Controls.Add(this.label2); diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index c61b907c4..add7c456f 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -7,6 +7,7 @@ using System.Text; using System.Windows.Forms; using System.Threading; using System.Diagnostics; +using System.Runtime.InteropServices; namespace Handbrake { @@ -37,6 +38,13 @@ namespace Handbrake * Code to Handle the CLI and updating of the UI as each process is completed. * */ + + [DllImport("user32.dll")] + public static extern void LockWorkStation(); + [DllImport("user32.dll")] + public static extern int ExitWindowsEx(int uFlags, int dwReason); + + private void startProc(object state) { started = true; @@ -60,6 +68,29 @@ namespace Handbrake } started = false; resetQueue(); + + // Do something whent he encode ends. + switch (Properties.Settings.Default.CompletionOption) + { + case "Shutdown": + System.Diagnostics.Process.Start("Shutdown", "-s -t 60"); + break; + case "Log Off": + ExitWindowsEx(0, 0); + break; + case "Suspend": + Application.SetSuspendState(PowerState.Suspend, true, true); + break; + case "Hibernate": + Application.SetSuspendState(PowerState.Hibernate, true, true); + break; + case "Lock System": + LockWorkStation(); + break; + default: + break; + } + MessageBox.Show("Encode Queue Completed!", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } -- cgit v1.2.3