{\r
InitializeComponent();\r
\r
- if (Properties.Settings.Default.tooltipEnable == "Checked")\r
+ if (Properties.Settings.Default.tooltipEnable)\r
setToolTipActive(true);\r
\r
reset2Defaults();\r
string strCmdLine = String.Format(@" CMD /c """"{0}"" {1} 2>""{2}"" """, handbrakeCLIPath, query, logPath);\r
\r
ProcessStartInfo cliStart = new ProcessStartInfo("CMD.exe", strCmdLine);\r
- if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
+ if (Properties.Settings.Default.enocdeStatusInGui)\r
{\r
cliStart.RedirectStandardOutput = true;\r
cliStart.UseShellExecute = false;\r
\r
}\r
- if (Properties.Settings.Default.cli_minimized == "Checked")\r
+ if (Properties.Settings.Default.cli_minimized)\r
cliStart.WindowStyle = ProcessWindowStyle.Minimized;\r
\r
Process[] before = Process.GetProcesses(); // Get a list of running processes before starting.\r
File.Copy(tempLogFile, Path.Combine(logDir, encodeLogFile));\r
\r
// Save a copy of the log file in the same location as the enocde.\r
- if (Properties.Settings.Default.saveLogWithVideo == "Checked")\r
+ if (Properties.Settings.Default.saveLogWithVideo)\r
File.Copy(tempLogFile, Path.Combine(encodeDestinationPath, encodeLogFile));\r
\r
// Save a copy of the log file to a user specified location\r
if (Directory.Exists(Properties.Settings.Default.saveLogPath))\r
- if (Properties.Settings.Default.saveLogPath != String.Empty && Properties.Settings.Default.saveLogToSpecifiedPath == "Checked")\r
+ if (Properties.Settings.Default.saveLogPath != String.Empty && Properties.Settings.Default.saveLogToSpecifiedPath)\r
File.Copy(tempLogFile, Path.Combine(Properties.Settings.Default.saveLogPath, encodeLogFile));\r
}\r
catch (Exception exc)\r
query += " -t " + titleInfo[0];\r
}\r
\r
- if (Properties.Settings.Default.dvdnav == "Checked")\r
+ if (Properties.Settings.Default.dvdnav)\r
if (mainWindow.drop_angle.Items.Count != 0)\r
query += " --angle " + mainWindow.drop_angle.SelectedItem;\r
\r
\r
query += " -v " + Properties.Settings.Default.verboseLevel;\r
\r
- if (Properties.Settings.Default.dvdnav == "Checked")\r
+ if (Properties.Settings.Default.dvdnav)\r
query += " --dvdnav";\r
#endregion\r
\r
\r
output.ReadLine();\r
\r
- if (Properties.Settings.Default.dvdnav == "Checked")\r
+ if (Properties.Settings.Default.dvdnav)\r
{\r
// Get the Angles for the title.\r
m = Regex.Match(output.ReadLine(), @" \+ angle\(s\) ([0-9,])");\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
- public string defaultSettings {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+ public bool defaultSettings {\r
get {\r
- return ((string)(this["defaultSettings"]));\r
+ return ((bool)(this["defaultSettings"]));\r
}\r
set {\r
this["defaultSettings"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
- public string updateStatus {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+ public bool updateStatus {\r
get {\r
- return ((string)(this["updateStatus"]));\r
+ return ((bool)(this["updateStatus"]));\r
}\r
set {\r
this["updateStatus"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
- public string tooltipEnable {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+ public bool tooltipEnable {\r
get {\r
- return ((string)(this["tooltipEnable"]));\r
+ return ((bool)(this["tooltipEnable"]));\r
}\r
set {\r
this["tooltipEnable"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
- public string autoNaming {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+ public bool autoNaming {\r
get {\r
- return ((string)(this["autoNaming"]));\r
+ return ((bool)(this["autoNaming"]));\r
}\r
set {\r
this["autoNaming"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
- public string drive_detection {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+ public bool drive_detection {\r
get {\r
- return ((string)(this["drive_detection"]));\r
+ return ((bool)(this["drive_detection"]));\r
}\r
set {\r
this["drive_detection"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string cli_minimized {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool cli_minimized {\r
get {\r
- return ((string)(this["cli_minimized"]));\r
+ return ((bool)(this["cli_minimized"]));\r
}\r
set {\r
this["cli_minimized"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string saveLogToSpecifiedPath {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool saveLogToSpecifiedPath {\r
get {\r
- return ((string)(this["saveLogToSpecifiedPath"]));\r
+ return ((bool)(this["saveLogToSpecifiedPath"]));\r
}\r
set {\r
this["saveLogToSpecifiedPath"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string saveLogWithVideo {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool saveLogWithVideo {\r
get {\r
- return ((string)(this["saveLogWithVideo"]));\r
+ return ((bool)(this["saveLogWithVideo"]));\r
}\r
set {\r
this["saveLogWithVideo"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("T:\\Program Files\\VideoLAN\\vlc\\vlc.exe")]\r
+ [global::System.Configuration.DefaultSettingValueAttribute("C:\\Program Files\\VideoLAN\\vlc\\vlc.exe")]\r
public string VLC_Path {\r
get {\r
return ((string)(this["VLC_Path"]));\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("Checked")]\r
- public string MainWindowMinimize {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool MainWindowMinimize {\r
get {\r
- return ((string)(this["MainWindowMinimize"]));\r
+ return ((bool)(this["MainWindowMinimize"]));\r
}\r
set {\r
this["MainWindowMinimize"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string QueryEditorTab {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool QueryEditorTab {\r
get {\r
- return ((string)(this["QueryEditorTab"]));\r
+ return ((bool)(this["QueryEditorTab"]));\r
}\r
set {\r
this["QueryEditorTab"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string dvdnav {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool dvdnav {\r
get {\r
- return ((string)(this["dvdnav"]));\r
+ return ((bool)(this["dvdnav"]));\r
}\r
set {\r
this["dvdnav"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string presetNotification {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool presetNotification {\r
get {\r
- return ((string)(this["presetNotification"]));\r
+ return ((bool)(this["presetNotification"]));\r
}\r
set {\r
this["presetNotification"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string enocdeStatusInGui {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]\r
+ public bool enocdeStatusInGui {\r
get {\r
- return ((string)(this["enocdeStatusInGui"]));\r
+ return ((bool)(this["enocdeStatusInGui"]));\r
}\r
set {\r
this["enocdeStatusInGui"] = value;\r
\r
[global::System.Configuration.UserScopedSettingAttribute()]\r
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
- [global::System.Configuration.DefaultSettingValueAttribute("")]\r
- public string trayIconAlerts {\r
+ [global::System.Configuration.DefaultSettingValueAttribute("True")]\r
+ public bool trayIconAlerts {\r
get {\r
- return ((string)(this["trayIconAlerts"]));\r
+ return ((bool)(this["trayIconAlerts"]));\r
}\r
set {\r
this["trayIconAlerts"] = value;\r
<Setting Name="Processors" Type="System.String" Scope="User">\r
<Value Profile="(Default)">Automatic</Value>\r
</Setting>\r
- <Setting Name="defaultSettings" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">Checked</Value>\r
+ <Setting Name="defaultSettings" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">True</Value>\r
</Setting>\r
- <Setting Name="updateStatus" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">Checked</Value>\r
+ <Setting Name="updateStatus" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">True</Value>\r
</Setting>\r
<Setting Name="hb_version" Type="System.String" Scope="User">\r
<Value Profile="(Default)">{hb_version}</Value>\r
</Setting>\r
- <Setting Name="tooltipEnable" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">Checked</Value>\r
+ <Setting Name="tooltipEnable" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">True</Value>\r
</Setting>\r
<Setting Name="CompletionOption" Type="System.String" Scope="User">\r
<Value Profile="(Default)">Do Nothing</Value>\r
<Setting Name="skipversion" Type="System.Int32" Scope="User">\r
<Value Profile="(Default)">0</Value>\r
</Setting>\r
- <Setting Name="autoNaming" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">Checked</Value>\r
+ <Setting Name="autoNaming" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">True</Value>\r
</Setting>\r
<Setting Name="autoNamePath" Type="System.String" Scope="User">\r
<Value Profile="(Default)" />\r
<Setting Name="appcast_unstable" Type="System.String" Scope="User">\r
<Value Profile="(Default)">http://handbrake.fr/appcast_unstable.xml</Value>\r
</Setting>\r
- <Setting Name="drive_detection" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">Checked</Value>\r
+ <Setting Name="drive_detection" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">True</Value>\r
</Setting>\r
- <Setting Name="cli_minimized" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="cli_minimized" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
<Setting Name="autoNameFormat" Type="System.String" Scope="User">\r
<Value Profile="(Default)">{source}-{title}</Value>\r
</Setting>\r
- <Setting Name="saveLogToSpecifiedPath" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="saveLogToSpecifiedPath" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
<Setting Name="saveLogPath" Type="System.String" Scope="User">\r
<Value Profile="(Default)" />\r
</Setting>\r
- <Setting Name="saveLogWithVideo" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="saveLogWithVideo" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
<Setting Name="VLC_Path" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">T:\Program Files\VideoLAN\vlc\vlc.exe</Value>\r
+ <Value Profile="(Default)">C:\Program Files\VideoLAN\vlc\vlc.exe</Value>\r
</Setting>\r
- <Setting Name="MainWindowMinimize" Type="System.String" Scope="User">\r
- <Value Profile="(Default)">Checked</Value>\r
+ <Setting Name="MainWindowMinimize" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
- <Setting Name="QueryEditorTab" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="QueryEditorTab" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
<Setting Name="x264cqstep" Type="System.String" Scope="User">\r
<Value Profile="(Default)">0.25</Value>\r
<Setting Name="verboseLevel" Type="System.Int32" Scope="User">\r
<Value Profile="(Default)">1</Value>\r
</Setting>\r
- <Setting Name="dvdnav" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="dvdnav" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
- <Setting Name="presetNotification" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="presetNotification" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
- <Setting Name="enocdeStatusInGui" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="enocdeStatusInGui" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">False</Value>\r
</Setting>\r
- <Setting Name="trayIconAlerts" Type="System.String" Scope="User">\r
- <Value Profile="(Default)" />\r
+ <Setting Name="trayIconAlerts" Type="System.Boolean" Scope="User">\r
+ <Value Profile="(Default)">True</Value>\r
</Setting>\r
<Setting Name="lastUpdateCheckDate" Type="System.DateTime" Scope="User">\r
<Value Profile="(Default)" />\r
<value>Automatic</value>\r
</setting>\r
<setting name="defaultSettings" serializeAs="String">\r
- <value>Checked</value>\r
+ <value>True</value>\r
</setting>\r
<setting name="updateStatus" serializeAs="String">\r
- <value>Checked</value>\r
+ <value>True</value>\r
</setting>\r
<setting name="hb_version" serializeAs="String">\r
<value>{hb_version}</value>\r
</setting>\r
<setting name="tooltipEnable" serializeAs="String">\r
- <value>Checked</value>\r
+ <value>True</value>\r
</setting>\r
<setting name="CompletionOption" serializeAs="String">\r
<value>Do Nothing</value>\r
<value>0</value>\r
</setting>\r
<setting name="autoNaming" serializeAs="String">\r
- <value>Checked</value>\r
+ <value>True</value>\r
</setting>\r
<setting name="autoNamePath" serializeAs="String">\r
<value />\r
<value>http://handbrake.fr/appcast_unstable.xml</value>\r
</setting>\r
<setting name="drive_detection" serializeAs="String">\r
- <value>Checked</value>\r
+ <value>True</value>\r
</setting>\r
<setting name="cli_minimized" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="autoNameFormat" serializeAs="String">\r
<value>{source}-{title}</value>\r
</setting>\r
<setting name="saveLogToSpecifiedPath" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="saveLogPath" serializeAs="String">\r
<value />\r
</setting>\r
<setting name="saveLogWithVideo" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="VLC_Path" serializeAs="String">\r
- <value>T:\Program Files\VideoLAN\vlc\vlc.exe</value>\r
+ <value>C:\Program Files\VideoLAN\vlc\vlc.exe</value>\r
</setting>\r
<setting name="MainWindowMinimize" serializeAs="String">\r
- <value>Checked</value>\r
+ <value>False</value>\r
</setting>\r
<setting name="QueryEditorTab" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="x264cqstep" serializeAs="String">\r
<value>0.25</value>\r
<value>1</value>\r
</setting>\r
<setting name="dvdnav" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="presetNotification" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="enocdeStatusInGui" serializeAs="String">\r
- <value />\r
+ <value>False</value>\r
</setting>\r
<setting name="trayIconAlerts" serializeAs="String">\r
- <value />\r
+ <value>True</value>\r
</setting>\r
<setting name="lastUpdateCheckDate" serializeAs="String">\r
<value />\r
Application.DoEvents(); // Forces frmMain to draw\r
\r
// Check for new versions, if update checking is enabled\r
- if (Properties.Settings.Default.updateStatus == "Checked")\r
+ if (Properties.Settings.Default.updateStatus)\r
{\r
DateTime now = DateTime.Now;\r
DateTime lastCheck = Properties.Settings.Default.lastUpdateCheckDate;\r
treeView_presets.ExpandAll();\r
lbl_encode.Text = "";\r
queueWindow = new frmQueue(encodeQueue); // Prepare the Queue\r
- if (Properties.Settings.Default.QueryEditorTab != "Checked")\r
+ if (Properties.Settings.Default.QueryEditorTab)\r
tabs_panel.TabPages.RemoveAt(7); // Remove the query editor tab if the user does not want it enabled.\r
\r
// Load the user's default settings or Normal Preset\r
- if (Properties.Settings.Default.defaultSettings == "Checked" && Properties.Settings.Default.defaultPreset != "")\r
+ if (Properties.Settings.Default.defaultSettings && Properties.Settings.Default.defaultPreset != "")\r
{\r
if (presetHandler.getPreset(Properties.Settings.Default.defaultPreset) != null)\r
{\r
loadNormalPreset();\r
\r
// Enabled GUI tooltip's if Required\r
- if (Properties.Settings.Default.tooltipEnable == "Checked")\r
+ if (Properties.Settings.Default.tooltipEnable)\r
ToolTip.Active = true;\r
\r
//Finished Loading\r
private void events()\r
{\r
// Handle Window Resize\r
- if (Properties.Settings.Default.MainWindowMinimize == "Checked")\r
+ if (Properties.Settings.Default.MainWindowMinimize)\r
this.Resize += new EventHandler(frmMain_Resize);\r
\r
// Handle Encode Start / Finish / Pause\r
setEncodeStarted();\r
\r
// Experimental HBProc Process Monitoring.\r
- if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
+ if (Properties.Settings.Default.enocdeStatusInGui)\r
{\r
Thread encodeMon = new Thread(encodeMonitorThread);\r
encodeMon.Start();\r
}\r
private void mnu_options_Click(object sender, EventArgs e)\r
{\r
- Form Options = new frmOptions();\r
- Options.ShowDialog();\r
+ Form options = new frmOptions();\r
+ options.ShowDialog();\r
}\r
#endregion\r
\r
#region ToolStrip\r
private void btn_source_Click(object sender, EventArgs e)\r
{\r
- if (Properties.Settings.Default.drive_detection == "Checked")\r
+ if (Properties.Settings.Default.drive_detection)\r
{\r
mnu_dvd_drive.Visible = true;\r
Thread driveInfoThread = new Thread(getDriveInfoThread);\r
if (FormWindowState.Minimized == this.WindowState)\r
{\r
notifyIcon.Visible = true;\r
- if (!encodeQueue.isEncoding)\r
- {\r
- notifyIcon.BalloonTipText = lbl_encode.Text != "" ? lbl_encode.Text : "Not Encoding";\r
- if (Properties.Settings.Default.trayIconAlerts == "Checked")\r
- notifyIcon.ShowBalloonTip(500);\r
- }\r
this.Hide();\r
}\r
else if (FormWindowState.Normal == this.WindowState)\r
// Otheriwse if its not, title data has to be loased from parsing.\r
if (drp_dvdtitle.Text != "Automatic")\r
{\r
- selectedTitle = drp_dvdtitle.SelectedItem as Parsing.Title;\r
+ selectedTitle = drp_dvdtitle.SelectedItem as Title;\r
lbl_duration.Text = selectedTitle.Duration.ToString();\r
PictureSettings.setComponentsAfterScan(selectedTitle); // Setup Picture Settings Tab Control\r
\r
// Populate the Angles dropdown\r
drop_angle.Items.Clear();\r
- if (Properties.Settings.Default.dvdnav == "Checked")\r
+ if (Properties.Settings.Default.dvdnav)\r
{\r
drop_angle.Visible = true;\r
lbl_angle.Visible = true;\r
}\r
\r
// Run the autoName & chapterNaming functions\r
- if (Properties.Settings.Default.autoNaming == "Checked")\r
+ if (Properties.Settings.Default.autoNaming)\r
{\r
string autoPath = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);\r
if (autoPath != null)\r
lbl_duration.Text = Main.calculateDuration(drop_chapterStart.Text, drop_chapterFinish.Text, selectedTitle).ToString();\r
\r
// Run the Autonaming function\r
- if (Properties.Settings.Default.autoNaming == "Checked")\r
+ if (Properties.Settings.Default.autoNaming)\r
text_destination.Text = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);\r
\r
// Disable chapter markers if only 1 chapter is selected.\r
lbl_duration.Text = Main.calculateDuration(drop_chapterStart.Text, drop_chapterFinish.Text, selectedTitle).ToString();\r
\r
// Run the Autonaming function\r
- if (Properties.Settings.Default.autoNaming == "Checked")\r
+ if (Properties.Settings.Default.autoNaming)\r
text_destination.Text = Main.autoName(drp_dvdtitle, drop_chapterStart.Text, drop_chapterFinish.Text, text_source.Text, text_destination.Text, drop_format.SelectedIndex);\r
\r
// Add more rows to the Chapter menu if needed.\r
File.Delete(dvdInfoPath);\r
\r
String dvdnav = string.Empty;\r
- if (Properties.Settings.Default.dvdnav == "Checked")\r
+ if (Properties.Settings.Default.dvdnav)\r
dvdnav = " --dvdnav";\r
string strCmdLine = String.Format(@"cmd /c """"{0}"" -i ""{1}"" -t0 {2} -v >""{3}"" 2>&1""", handbrakeCLIPath, inputFile, dvdnav, dvdInfoPath);\r
\r
btn_start.Image = Properties.Resources.Play;\r
\r
// If the window is minimized, display the notification in a popup.\r
- if (FormWindowState.Minimized == this.WindowState)\r
- {\r
- notifyIcon.BalloonTipText = lbl_encode.Text;\r
- notifyIcon.ShowBalloonTip(500);\r
- }\r
+ if (Properties.Settings.Default.trayIconAlerts)\r
+ if (FormWindowState.Minimized == this.WindowState)\r
+ {\r
+ notifyIcon.BalloonTipText = lbl_encode.Text;\r
+ notifyIcon.ShowBalloonTip(500);\r
+ }\r
}\r
catch (Exception exc)\r
{\r
lbl_encode.Visible = true;\r
lbl_encode.Text = "Encoding in Progress";\r
btn_start.Text = "Stop";\r
- btn_start.ToolTipText = "Stop the encoding process. \nWarning: This may break your file. Press ctrl-c in the CLI window if you wish it to exit cleanly.";\r
+ btn_start.ToolTipText = "Stop the encoding process.";\r
btn_start.Image = Properties.Resources.stop;\r
}\r
catch (Exception exc)\r
public void loadPresetPanel()\r
{\r
if (presetHandler.checkIfPresetsAreOutOfDate())\r
- if (Properties.Settings.Default.presetNotification == "Unchecked")\r
+ if (!Properties.Settings.Default.presetNotification)\r
MessageBox.Show(\r
"HandBrake has determined your built-in presets are out of date... These presets will now be updated.",\r
"Preset Update", MessageBoxButtons.OK, MessageBoxIcon.Information);\r
// #############################\r
\r
// Enable Tooltips.\r
- if (Properties.Settings.Default.tooltipEnable == "Checked")\r
+ if (Properties.Settings.Default.tooltipEnable)\r
{\r
check_tooltip.CheckState = CheckState.Checked;\r
ToolTip.Active = true;\r
}\r
\r
// Setup Widgets to match settings.\r
- if (Properties.Settings.Default.updateStatus == "Checked")\r
+ if (Properties.Settings.Default.updateStatus)\r
check_updateCheck.CheckState = CheckState.Checked;\r
\r
// enable loading of default user settings.\r
- if (Properties.Settings.Default.defaultSettings == "Checked")\r
+ if (Properties.Settings.Default.defaultSettings)\r
check_userDefaultSettings.CheckState = CheckState.Checked;\r
\r
// On Encode Completeion Action\r
drp_completeOption.Text = Properties.Settings.Default.CompletionOption;\r
\r
// Enable auto naming feature.\r
- if (Properties.Settings.Default.autoNaming == "Checked")\r
+ if (Properties.Settings.Default.autoNaming)\r
check_autoNaming.CheckState = CheckState.Checked;\r
\r
// Store the auto name path\r
// #############################\r
\r
// Enable Start CLI minimized\r
- if (Properties.Settings.Default.cli_minimized == "Checked")\r
+ if (Properties.Settings.Default.cli_minimized)\r
check_cli_minimized.CheckState = CheckState.Checked;\r
\r
// Number of processor cores\r
\r
\r
// Save logs in the same directory as encoded files\r
- if (Properties.Settings.Default.saveLogWithVideo == "Checked")\r
+ if (Properties.Settings.Default.saveLogWithVideo)\r
check_saveLogWithVideo.CheckState = CheckState.Checked;\r
\r
// Save Logs in a specified path\r
- if (Properties.Settings.Default.saveLogToSpecifiedPath == "Checked")\r
+ if (Properties.Settings.Default.saveLogToSpecifiedPath)\r
check_logsInSpecifiedLocation.CheckState = CheckState.Checked;\r
\r
// The saved log path\r
// #############################\r
\r
// Enable GUI DVD Drive detection code\r
- if (Properties.Settings.Default.drive_detection == "Checked")\r
+ if (Properties.Settings.Default.drive_detection)\r
btn_drive_detect.CheckState = CheckState.Checked;\r
\r
// Minimise to Tray\r
- if (Properties.Settings.Default.trayIconAlerts == "Checked")\r
+ if (Properties.Settings.Default.trayIconAlerts)\r
check_trayStatusAlerts.CheckState = CheckState.Checked;\r
\r
// Tray Balloon popups\r
- if (Properties.Settings.Default.MainWindowMinimize == "Checked")\r
+ if (Properties.Settings.Default.MainWindowMinimize)\r
check_mainMinimize.CheckState = CheckState.Checked;\r
\r
// Enable / Disable Query editor tab\r
- if (Properties.Settings.Default.QueryEditorTab == "Checked")\r
+ if (Properties.Settings.Default.QueryEditorTab)\r
check_queryEditorTab.CheckState = CheckState.Checked;\r
\r
// Preset update notification\r
- if (Properties.Settings.Default.presetNotification == "Checked")\r
+ if (Properties.Settings.Default.presetNotification)\r
check_disablePresetNotification.CheckState = CheckState.Checked;\r
\r
// Experimental In-GUI encode status indicator.\r
- if (Properties.Settings.Default.enocdeStatusInGui == "Checked")\r
+ if (Properties.Settings.Default.enocdeStatusInGui)\r
check_inGuiStatus.CheckState = CheckState.Checked;\r
\r
// Days between update checks\r
drop_x264step.SelectedItem = Properties.Settings.Default.x264cqstep;\r
\r
// Use Experimental dvdnav\r
- if (Properties.Settings.Default.dvdnav == "Checked")\r
+ if (Properties.Settings.Default.dvdnav)\r
check_dvdnav.CheckState = CheckState.Checked;\r
}\r
\r
#region General\r
private void check_updateCheck_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.updateStatus = check_updateCheck.CheckState.ToString();\r
+ Properties.Settings.Default.updateStatus = check_updateCheck.Checked;\r
}\r
\r
private void check_userDefaultSettings_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.defaultSettings = check_userDefaultSettings.CheckState.ToString();\r
+ Properties.Settings.Default.defaultSettings = check_userDefaultSettings.Checked;\r
}\r
\r
private void check_tooltip_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.tooltipEnable = check_tooltip.CheckState.ToString();\r
+ Properties.Settings.Default.tooltipEnable = check_tooltip.Checked;\r
}\r
private void drp_completeOption_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
\r
private void check_autoNaming_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.autoNaming = check_autoNaming.CheckState.ToString();\r
+ Properties.Settings.Default.autoNaming = check_autoNaming.Checked;\r
}\r
\r
private void txt_autoNameFormat_TextChanged(object sender, EventArgs e)\r
#region CLI\r
private void check_cli_minimized_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.cli_minimized = check_cli_minimized.CheckState.ToString();\r
+ Properties.Settings.Default.cli_minimized = check_cli_minimized.Checked;\r
}\r
\r
private void drp_processors_SelectedIndexChanged(object sender, EventArgs e)\r
\r
private void check_saveLogWithVideo_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.saveLogWithVideo = check_saveLogWithVideo.CheckState.ToString();\r
+ Properties.Settings.Default.saveLogWithVideo = check_saveLogWithVideo.Checked;\r
}\r
private void check_logsInSpecifiedLocation_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.saveLogToSpecifiedPath = check_logsInSpecifiedLocation.CheckState.ToString();\r
+ Properties.Settings.Default.saveLogToSpecifiedPath = check_logsInSpecifiedLocation.Checked;\r
}\r
\r
private void btn_saveLog_Click(object sender, EventArgs e)\r
#region Advanced\r
private void btn_drive_detect_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.drive_detection = btn_drive_detect.CheckState.ToString();\r
+ Properties.Settings.Default.drive_detection = btn_drive_detect.Checked;\r
}\r
\r
private void check_mainMinimize_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.MainWindowMinimize = check_mainMinimize.CheckState.ToString();\r
+ Properties.Settings.Default.MainWindowMinimize = check_mainMinimize.Checked;\r
}\r
\r
private void check_trayStatusAlerts_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.trayIconAlerts = check_trayStatusAlerts.CheckState.ToString();\r
+ Properties.Settings.Default.trayIconAlerts = check_trayStatusAlerts.Checked;\r
}\r
\r
private void check_queryEditorTab_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.QueryEditorTab = check_queryEditorTab.CheckState.ToString();\r
+ Properties.Settings.Default.QueryEditorTab = check_queryEditorTab.Checked;\r
}\r
\r
private void check_disablePresetNotification_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.presetNotification = check_disablePresetNotification.CheckState.ToString();\r
+ Properties.Settings.Default.presetNotification = check_disablePresetNotification.Checked;\r
}\r
\r
private void check_inGuiStatus_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.CheckState.ToString();\r
+ Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.Checked;\r
}\r
\r
private void numeric_updateCheckDays_ValueChanged(object sender, EventArgs e)\r
\r
private void check_dvdnav_CheckedChanged(object sender, EventArgs e)\r
{\r
- Properties.Settings.Default.dvdnav = check_dvdnav.CheckState.ToString();\r
+ Properties.Settings.Default.dvdnav = check_dvdnav.Checked;\r
} \r
#endregion\r
\r