diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/frmMain.cs | 16 | ||||
-rw-r--r-- | win/C#/frmPreview.cs | 16 | ||||
-rw-r--r-- | win/C#/frmQueue.cs | 21 |
3 files changed, 35 insertions, 18 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index b0e61fd27..07828e81a 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -615,7 +615,7 @@ namespace Handbrake }
queueWindow.setQueue();
if (encodeQueue.count() > 1)
- queueWindow.Show();
+ queueWindow.Show(false);
setEncodeStarted(); // Encode is running, so setup the GUI appropriately
encodeQueue.startEncode(); // Start The Queue Encoding Process
@@ -639,13 +639,11 @@ namespace Handbrake encodeQueue.add(query, text_source.Text, text_destination.Text);
encodeQueue.write2disk("hb_queue_recovery.xml"); // Writes the queue to the recovery file, just incase the GUI crashes.
- queueWindow.setQueue();
queueWindow.Show();
}
}
private void btn_showQueue_Click(object sender, EventArgs e)
{
- queueWindow.setQueue();
queueWindow.Show();
queueWindow.Activate();
}
@@ -666,7 +664,7 @@ namespace Handbrake qtpreview.Show();
}
else
- MessageBox.Show("The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(qtpreview, "The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
private void btn_ActivityWindow_Click(object sender, EventArgs e)
@@ -1740,11 +1738,11 @@ namespace Handbrake if (curDrive.IsReady)
{
if (File.Exists(curDrive.RootDirectory + "VIDEO_TS\\VIDEO_TS.IFO"))
+ {
mnu_dvd_drive.Text = curDrive.RootDirectory + "VIDEO_TS (" + curDrive.VolumeLabel + ")";
- else
- mnu_dvd_drive.Text = "[No DVD Drive Ready]";
-
- foundDrive = true;
+ foundDrive = true;
+ break;
+ }
}
}
@@ -2109,4 +2107,4 @@ namespace Handbrake // This is the END of the road ------------------------------------------------------------------------------
}
-}
\ No newline at end of file +}
diff --git a/win/C#/frmPreview.cs b/win/C#/frmPreview.cs index 52aabe6f6..e2022ca2b 100644 --- a/win/C#/frmPreview.cs +++ b/win/C#/frmPreview.cs @@ -28,7 +28,7 @@ namespace Handbrake }
catch (Exception exc)
{
- MessageBox.Show("It would appear QuickTime 7 is not installed. QuickTime preview functionality will be disabled! \n\n Debug Info:\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(mw, "It would appear QuickTime 7 is not installed. QuickTime preview functionality will be disabled! \n\n Debug Info:\n" + exc, "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
btn_playQT.Enabled = false;
noQT = true;
}
@@ -58,7 +58,7 @@ namespace Handbrake {
// Make sure we are not already encoding and if we are then display an error.
if (hbProc != null)
- MessageBox.Show("Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(this, "Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);
else
{
hbProc = process.runCli(this, (string)state);
@@ -99,7 +99,7 @@ namespace Handbrake }
catch (Exception exc)
{
- MessageBox.Show("frmPreview.cs encodeCompleted " + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ MessageBox.Show(this, "frmPreview.cs encodeCompleted " + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
#endregion
@@ -133,10 +133,10 @@ namespace Handbrake lbl_status.Text = "VLC will now launch.";
}
else
- MessageBox.Show("Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in the program options is correct.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(this, "Unable to detect VLC Player. \nPlease make sure VLC is installed and the directory specified in the program options is correct.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
else
- MessageBox.Show("Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show(this, "Unable to find the preview file. Either the file was deleted or the encode failed. Check the activity log for details.", "VLC", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
@@ -169,13 +169,13 @@ namespace Handbrake catch (COMException ex)
{
QTUtils qtu = new QTUtils();
- MessageBox.Show("Unable to open movie:\n\nError Code: " + ex.ErrorCode.ToString("X") + "\nQT Error code : " + qtu.QTErrorFromErrorCode(ex.ErrorCode));
+ MessageBox.Show(this, "Unable to open movie:\n\nError Code: " + ex.ErrorCode.ToString("X") + "\nQT Error code : " + qtu.QTErrorFromErrorCode(ex.ErrorCode), "QT", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
catch (Exception ex)
{
- MessageBox.Show("Unable to open movie:\n\n" + ex);
+ MessageBox.Show(this, "Unable to open movie:\n\n" + ex, "QT", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
}
#endregion
}
-}
\ No newline at end of file +}
diff --git a/win/C#/frmQueue.cs b/win/C#/frmQueue.cs index 36e8b067e..86549a20f 100644 --- a/win/C#/frmQueue.cs +++ b/win/C#/frmQueue.cs @@ -50,6 +50,25 @@ namespace Handbrake updateUIElements();
}
+ /// <summary>
+ /// Initializes the Queue list, then shows and activates the window
+ /// </summary>
+ public new void Show()
+ {
+ Show(true);
+ }
+
+ /// <summary>
+ /// Initializes the Queue list only if doSetQueue is true, then shows and activates the window
+ /// </summary>
+ /// <param name="doSetQueue">Indicates whether to call setQueue() before showing the window</param>
+ public void Show(bool doSetQueue)
+ {
+ if (doSetQueue) setQueue();
+ base.Show();
+ Activate();
+ }
+
// Start and Stop Controls
private void btn_encode_Click(object sender, EventArgs e)
{
@@ -287,4 +306,4 @@ namespace Handbrake base.OnClosing(e);
}
}
-}
\ No newline at end of file +}
|