summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-05-23 14:57:00 +0000
committersr55 <[email protected]>2009-05-23 14:57:00 +0000
commitee294958088a96ca232a1334eea6542dd7e30d60 (patch)
tree56fd62f1f300c731ee3316b52a8d65dc247bc695 /win/C#/frmMain.cs
parentb1ef4b866e0a29e3274d521eb0b768d48195fc9e (diff)
WinGui:WinGui:
- Stop button, now allows the CLI to cleanly exit by sending ctrl-c rather than killing the process. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2444 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r--win/C#/frmMain.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index cc28130ac..15c3e5588 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -11,9 +11,9 @@ using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Threading;
+using Handbrake.EncodeQueue;
using Handbrake.Functions;
using Handbrake.Presets;
-using Handbrake.Queue;
using Handbrake.Parsing;
namespace Handbrake
@@ -218,7 +218,7 @@ namespace Handbrake
// Experimental HBProc Process Monitoring.
if (Properties.Settings.Default.enocdeStatusInGui == "Checked")
{
- HBProcess = encodeQueue.hbProc;
+ HBProcess = encodeQueue.encodeProcess.hbProcProcess;
Thread EncodeMon = new Thread(encodeMonitorThread);
EncodeMon.Start();
}
@@ -584,13 +584,16 @@ namespace Handbrake
{
if (btn_start.Text == "Stop")
{
- DialogResult result = MessageBox.Show("Are you sure you wish to cancel the encode? Please note that this may break the encoded file. \nTo safely cancel your encode, press ctrl-c on your keyboard in the CLI window. This *may* allow you to preview your encoded content.", "Cancel Encode?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+ DialogResult result = MessageBox.Show("Are you sure you wish to cancel the encode?", "Cancel Encode?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
// Pause The Queue
- encodeQueue.pauseEncode();
- encodeQueue.endEncode();
+ encodeQueue.pauseEncodeQueue();
+
+ // Allow the CLI to exit cleanly
+ Win32.SetForegroundWindow(encodeQueue.encodeProcess.processHandle);
+ SendKeys.Send("^C");
// Update the GUI
setEncodeFinished();