public int maxWidth;\r
public int maxHeight;\r
Process hbproc;\r
+ private Form splash;\r
\r
// Applicaiton Startup ************************************************\r
\r
public frmMain()\r
{\r
// Load the splash screen in this thread\r
- Form splash = new frmSplashScreen();\r
+ splash = new frmSplashScreen();\r
splash.Show();\r
\r
//Create a label that can be updated from the parent thread.\r
- Label lblStatus = new Label {Size = new Size(250, 20), Location = new Point(10, 280)};\r
+ Label lblStatus = new Label { Size = new Size(250, 20), Location = new Point(10, 280) };\r
splash.Controls.Add(lblStatus);\r
InitializeComponent();\r
\r
{\r
lblStatus.Text = "Checking for updates ...";\r
Application.DoEvents();\r
+\r
Thread updateCheckThread = new Thread(startupUpdateCheck);\r
updateCheckThread.Start();\r
}\r
x264Panel.reset2Defaults();\r
\r
// Send the query from the file to the Query Parser class, then load the preset\r
- Functions.QueryParser presetQuery = Functions.QueryParser.Parse(query);\r
+ QueryParser presetQuery = QueryParser.Parse(query);\r
presetLoader.presetLoader(this, presetQuery, Properties.Settings.Default.defaultPreset, loadPictureSettings);\r
\r
// The x264 widgets will need updated, so do this now:\r
updateWindow.Show();\r
}\r
}\r
- catch (Exception) { /* Do Nothing*/ }\r
+ catch (Exception exc)\r
+ {\r
+ MessageBox.Show(splash, "Unable to perform update check. If this problem persists, you can turn of update checking in the program options. \nError Information: \n\n" + exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ }\r
}\r
private void queueRecovery()\r
{\r
if (FormWindowState.Minimized == this.WindowState)\r
{\r
notifyIcon.Visible = true;\r
- notifyIcon.BalloonTipText = lbl_encode.Text != "" ? lbl_encode.Text : "Not Encoding";\r
- notifyIcon.ShowBalloonTip(500);\r
+ if (!encodeQueue.isEncoding)\r
+ {\r
+ notifyIcon.BalloonTipText = lbl_encode.Text != "" ? lbl_encode.Text : "Not Encoding";\r
+ notifyIcon.ShowBalloonTip(500);\r
+ }\r
this.Hide();\r
}\r
else if (FormWindowState.Normal == this.WindowState)\r
MessageBox.Show("Sorry, HandBrake does not support UNC file paths. \nTry mounting the share as a network drive in My Computer", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
else\r
{\r
-\r
if (filename != "")\r
{\r
setupGUIforScan(filename);\r
DVD_Save.FilterIndex = 2;\r
else if (drop_format.SelectedIndex.Equals(2))\r
DVD_Save.FilterIndex = 3;\r
- else if (drop_format.SelectedIndex.Equals(3))\r
- DVD_Save.FilterIndex = 4;\r
- else if (drop_format.SelectedIndex.Equals(4))\r
- DVD_Save.FilterIndex = 5;\r
\r
if (DVD_Save.ShowDialog() == DialogResult.OK)\r
{\r
\r
string strCmdLine = String.Format(@"cmd /c """"{0}"" -i ""{1}"" -t0 -v >""{2}"" 2>&1""", handbrakeCLIPath, inputFile, dvdInfoPath);\r
\r
- ProcessStartInfo hbParseDvd = new ProcessStartInfo("CMD.exe", strCmdLine)\r
- {WindowStyle = ProcessWindowStyle.Hidden};\r
+ ProcessStartInfo hbParseDvd = new ProcessStartInfo("CMD.exe", strCmdLine) { WindowStyle = ProcessWindowStyle.Hidden };\r
\r
using (hbproc = Process.Start(hbParseDvd))\r
{\r
DriveInfo[] theCollectionOfDrives = DriveInfo.GetDrives();\r
foreach (DriveInfo curDrive in theCollectionOfDrives)\r
{\r
- if (curDrive.DriveType == DriveType.CDRom)\r
+ if (curDrive.DriveType == DriveType.CDRom && curDrive.IsReady)\r
{\r
- if (curDrive.IsReady)\r
+ if (File.Exists(curDrive.RootDirectory + "VIDEO_TS\\VIDEO_TS.IFO"))\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
- foundDrive = true;\r
- break;\r
- }\r
-\r
+ mnu_dvd_drive.Text = curDrive.RootDirectory + "VIDEO_TS (" + curDrive.VolumeLabel + ")";\r
+ foundDrive = true;\r
+ break;\r
}\r
}\r
}\r
#region Audio Panel Code Helpers\r
private void setAudioByContainer(String path)\r
{\r
- string oldval;\r
-\r
if ((path.Contains("MP4")) || (path.Contains("M4V")))\r
{\r
- oldval = drp_audenc_1.Text;\r
+ string oldval = drp_audenc_1.Text;\r
drp_audenc_1.Items.Clear();\r
drp_audenc_1.Items.Add("AAC");\r
drp_audenc_1.Items.Add("AC3");\r
List<string> presetNames = presetHandler.getUserPresetNames();\r
foreach (string preset in presetNames)\r
{\r
- preset_treeview = new TreeNode(preset) {ForeColor = Color.Black};\r
+ preset_treeview = new TreeNode(preset) { ForeColor = Color.Black };\r
\r
// Now Fill Out List View with Items\r
treeView_presets.Nodes.Add(preset_treeview);\r