}\r
queueWindow.setQueue();\r
if (encodeQueue.count() > 1)\r
- queueWindow.Show();\r
+ queueWindow.Show(false);\r
\r
setEncodeStarted(); // Encode is running, so setup the GUI appropriately\r
encodeQueue.startEncode(); // Start The Queue Encoding Process\r
encodeQueue.add(query, text_source.Text, text_destination.Text);\r
encodeQueue.write2disk("hb_queue_recovery.xml"); // Writes the queue to the recovery file, just incase the GUI crashes.\r
\r
- queueWindow.setQueue();\r
queueWindow.Show();\r
}\r
}\r
private void btn_showQueue_Click(object sender, EventArgs e)\r
{\r
- queueWindow.setQueue();\r
queueWindow.Show();\r
queueWindow.Activate();\r
}\r
qtpreview.Show();\r
}\r
else\r
- MessageBox.Show("The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ MessageBox.Show(qtpreview, "The preview window is already open!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
}\r
}\r
private void btn_ActivityWindow_Click(object sender, EventArgs e)\r
if (curDrive.IsReady)\r
{\r
if (File.Exists(curDrive.RootDirectory + "VIDEO_TS\\VIDEO_TS.IFO"))\r
+ {\r
mnu_dvd_drive.Text = curDrive.RootDirectory + "VIDEO_TS (" + curDrive.VolumeLabel + ")";\r
- else\r
- mnu_dvd_drive.Text = "[No DVD Drive Ready]";\r
-\r
- foundDrive = true;\r
+ foundDrive = true;\r
+ break;\r
+ }\r
\r
}\r
}\r
\r
// This is the END of the road ------------------------------------------------------------------------------\r
}\r
-}
\ No newline at end of file
+}\r
}\r
catch (Exception exc)\r
{\r
- 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);\r
+ 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);\r
btn_playQT.Enabled = false;\r
noQT = true;\r
}\r
{\r
// Make sure we are not already encoding and if we are then display an error.\r
if (hbProc != null)\r
- MessageBox.Show("Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ MessageBox.Show(this, "Handbrake is already encoding a video!", "Status", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
else\r
{\r
hbProc = process.runCli(this, (string)state);\r
}\r
catch (Exception exc)\r
{\r
- MessageBox.Show("frmPreview.cs encodeCompleted " + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ MessageBox.Show(this, "frmPreview.cs encodeCompleted " + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
}\r
}\r
#endregion\r
lbl_status.Text = "VLC will now launch.";\r
}\r
else\r
- 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);\r
+ 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);\r
}\r
else\r
- 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);\r
+ 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);\r
}\r
}\r
\r
catch (COMException ex)\r
{\r
QTUtils qtu = new QTUtils();\r
- MessageBox.Show("Unable to open movie:\n\nError Code: " + ex.ErrorCode.ToString("X") + "\nQT Error code : " + qtu.QTErrorFromErrorCode(ex.ErrorCode));\r
+ 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);\r
}\r
catch (Exception ex)\r
{\r
- MessageBox.Show("Unable to open movie:\n\n" + ex);\r
+ MessageBox.Show(this, "Unable to open movie:\n\n" + ex, "QT", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
}\r
}\r
#endregion\r
}\r
-}
\ No newline at end of file
+}\r
updateUIElements();\r
}\r
\r
+ /// <summary>\r
+ /// Initializes the Queue list, then shows and activates the window\r
+ /// </summary>\r
+ public new void Show()\r
+ {\r
+ Show(true);\r
+ }\r
+\r
+ /// <summary>\r
+ /// Initializes the Queue list only if doSetQueue is true, then shows and activates the window\r
+ /// </summary>\r
+ /// <param name="doSetQueue">Indicates whether to call setQueue() before showing the window</param>\r
+ public void Show(bool doSetQueue)\r
+ {\r
+ if (doSetQueue) setQueue();\r
+ base.Show();\r
+ Activate();\r
+ }\r
+\r
// Start and Stop Controls\r
private void btn_encode_Click(object sender, EventArgs e)\r
{\r
base.OnClosing(e);\r
}\r
}\r
-}
\ No newline at end of file
+}\r