diff options
author | sr55 <[email protected]> | 2009-07-23 20:10:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-07-23 20:10:29 +0000 |
commit | c27af07ac1576c950ba8f1967ee32b9a1fcf43f1 (patch) | |
tree | 4fe1e6dad0a75031eeddb19f2f58afe4d70698d7 /win/C#/frmMain.cs | |
parent | c20851de01a73ec1148207b858d7fe79ce7c98a5 (diff) |
WinGui:
- getCliProcess(): This is now massively faster at returning the process ID of HandBrakeCLI. This means that the GUI updates it's elements far faster instead of the noticeable few seconds pause when an encode starts. This also fixes an error message that would appear if the CLI process quit before the GUI was setup.
- Code re factoring in Main.cs. Reduced the amount of code needed for a few functions.
- Combined the Encode and Queue handler. This just makes things a bit easier when other parts of the GUI need the encode process info. The new CLI handling code is not in yet.
- Added the CLI build environment to the About window
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2726 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 62e0bc698..f385b1507 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -22,7 +22,7 @@ namespace Handbrake public partial class frmMain : Form
{
// Objects which may be used by one or more other objects *************
- QueueHandler encodeQueue = new QueueHandler();
+ EncodeAndQueueHandler encodeQueue = new EncodeAndQueueHandler();
PresetsHandler presetHandler = new PresetsHandler();
QueryGenerator queryGen = new QueryGenerator();
@@ -650,7 +650,7 @@ namespace Handbrake encodeQueue.RequestPause();
// Allow the CLI to exit cleanly
- Win32.SetForegroundWindow((int)encodeQueue.encodeHandler.processHandle);
+ Win32.SetForegroundWindow((int)encodeQueue.processHandle);
SendKeys.Send("^C");
// Update the GUI
@@ -1004,7 +1004,7 @@ namespace Handbrake drop_chapterFinish.Text = c_start.ToString();
}
- lbl_duration.Text = Main.calculateDuration(drop_chapterStart.Text, drop_chapterFinish.Text, selectedTitle).ToString();
+ lbl_duration.Text = Main.calculateDuration(drop_chapterStart.SelectedIndex, drop_chapterFinish.SelectedIndex, selectedTitle).ToString();
// Run the Autonaming function
if (Properties.Settings.Default.autoNaming)
@@ -1035,7 +1035,7 @@ namespace Handbrake drop_chapterFinish.Text = c_start.ToString();
}
- lbl_duration.Text = Main.calculateDuration(drop_chapterStart.Text, drop_chapterFinish.Text, selectedTitle).ToString();
+ lbl_duration.Text = Main.calculateDuration(drop_chapterStart.SelectedIndex, drop_chapterFinish.SelectedIndex, selectedTitle).ToString();
// Run the Autonaming function
if (Properties.Settings.Default.autoNaming)
@@ -1469,7 +1469,7 @@ namespace Handbrake // Now select the longest title
if (thisDVD.Titles.Count != 0)
- drp_dvdtitle.SelectedItem = Main.selectLongestTitle(drp_dvdtitle);
+ drp_dvdtitle.SelectedItem = Main.selectLongestTitle(thisDVD);
// Enable the creation of chapter markers if the file is an image of a dvd.
if (sourcePath.ToLower().Contains(".iso") || sourcePath.ToLower().Contains("VIDEO_TS"))
@@ -1696,7 +1696,7 @@ namespace Handbrake protected override void OnFormClosing(FormClosingEventArgs e)
{
// If currently encoding, the queue isn't paused, and there are queue items to process, prompt to confirm close.
- if ((encodeQueue.IsEncoding) && (!encodeQueue.PauseRequested) && (encodeQueue.Count > 0))
+ if ((encodeQueue.isEncoding) && (!encodeQueue.PauseRequested) && (encodeQueue.Count > 0))
{
DialogResult result = MessageBox.Show("HandBrake has queue items to process. Closing HandBrake will not stop the current encoding, but will stop processing the queue.\n\nDo you want to close HandBrake?",
"Close HandBrake?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
@@ -1713,7 +1713,7 @@ namespace Handbrake {
try
{
- Parser encode = new Parser(encodeQueue.encodeHandler.hbProcess.StandardOutput.BaseStream);
+ Parser encode = new Parser(encodeQueue.hbProcess.StandardOutput.BaseStream);
encode.OnEncodeProgress += encodeOnEncodeProgress;
while (!encode.EndOfStream)
{
|