/* Change the option string to reflect the new mod settings */\r
mainWindow.rtf_x264Query.Text = changedOptString;\r
}\r
+\r
/*\r
* Used by on_x264_WidgetChange()\r
* Called when the current x264 option string contains no options.\r
}\r
}\r
}\r
+\r
/*\r
* Take a single option and standardize it. Returns as a String\r
* Input: String. - Single X264 Option. Name only\r
<value>Checked</value>\r
</setting>\r
<setting name="hb_version" serializeAs="String">\r
- <value>0.9.3</value>\r
+ <value>SVN1457</value>\r
</setting>\r
<setting name="tooltipEnable" serializeAs="String">\r
<value>Checked</value>\r
<value>Checked</value>\r
</setting>\r
<setting name="hb_build" serializeAs="String">\r
- <value>2008043001</value>\r
+ <value>2008051201</value>\r
</setting>\r
<setting name="skipversion" serializeAs="String">\r
<value>0</value>\r
string logFile = Path.Combine(Path.GetTempPath(), read_file);\r
if (File.Exists(logFile))\r
{\r
- monitorFile = new Thread(autoUpdate);\r
- monitorFile.Start();\r
+ if (read_file == "dvdinfo.dat") // No need to refresh the window if we are viwing dvdinfo.dat\r
+ updateTextFromThread();\r
+ else // however, we should refresh when reading the encode log file.\r
+ {\r
+ monitorFile = new Thread(autoUpdate);\r
+ monitorFile.Start();\r
+ }\r
}\r
else\r
- {\r
MessageBox.Show("The log file could not be found. Maybe you cleared your system's tempory folder or maybe you just havn't run an encode yet.", "Notice", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
- }\r
}\r
\r
+ // Update the Activity window every 5 seconds with the latest log data.\r
private void autoUpdate(object state)\r
{\r
while (true)\r
private delegate void UpdateUIHandler();\r
private void updateTextFromThread()\r
{\r
- if (this.InvokeRequired)\r
+ try\r
{\r
- this.BeginInvoke(new UpdateUIHandler(updateTextFromThread));\r
- return;\r
+ if (this.InvokeRequired)\r
+ {\r
+ this.BeginInvoke(new UpdateUIHandler(updateTextFromThread));\r
+ return;\r
+ }\r
+ rtf_actLog.Text = readFile();\r
+ this.rtf_actLog.SelectionStart = this.rtf_actLog.Text.Length - 1;\r
+ this.rtf_actLog.ScrollToCaret();\r
+ }\r
+ catch (Exception exc)\r
+ {\r
+ MessageBox.Show(exc.ToString());\r
}\r
- rtf_actLog.Text = readFile();\r
- this.rtf_actLog.SelectionStart = this.rtf_actLog.Text.Length - 1;\r
- this.rtf_actLog.ScrollToCaret();\r
-\r
- //if (rtf_actLog.Text.Contains("HandBrake has exited."))\r
- //monitorFile.Abort();\r
}\r
\r
private string readFile()\r
// ISO_Open\r
// \r
this.ISO_Open.DefaultExt = "ISO";\r
- this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;";\r
+ this.ISO_Open.Filter = "All Supported Files|*.iso;*.mpg;*.m2t;*.vob;*.ts;*.mpeg;*.mpeg;*.avi;*.mp4;*.mkv;";\r
this.ISO_Open.RestoreDirectory = true;\r
this.ISO_Open.SupportMultiDottedExtensions = true;\r
+ \r
// \r
// FileToolStripMenuItem\r
// \r
Form splash = new frmSplashScreen();\r
splash.Show();\r
}\r
+\r
private void setupH264Panel()\r
{\r
/*Set opt widget values here*/\r
/* Standardize the option string */\r
rtf_x264Query.Text = "";\r
}\r
+\r
private void loadUserDefaults()\r
{\r
string userDefaults = Properties.Settings.Default.defaultUserSettings;\r
}\r
\r
#endregion\r
-\r
\r
-\r
-\r
+ \r
// This is the END of the road ------------------------------------------------------------------------------\r
}\r
}
\ No newline at end of file