Homepage: <http://handbrake.fr>.\r
It may be used under the terms of the GNU General Public License. */\r
\r
-using System;\r
-using System.Collections.Generic;\r
-using System.Globalization;\r
-using System.Windows.Forms;\r
-using Handbrake.Functions;\r
-\r
namespace Handbrake\r
{\r
+ using System;\r
+ using System.Collections.Generic;\r
+ using System.Diagnostics;\r
+ using System.Globalization;\r
+ using System.Windows.Forms;\r
+ using Functions;\r
+\r
public partial class frmOptions : Form\r
{\r
private frmMain mainWindow;\r
// Log Verbosity Level\r
cb_logVerboseLvl.SelectedIndex = Properties.Settings.Default.verboseLevel;\r
\r
-\r
// Save logs in the same directory as encoded files\r
if (Properties.Settings.Default.saveLogWithVideo)\r
check_saveLogWithVideo.CheckState = CheckState.Checked;\r
// The saved log path\r
text_logPath.Text = Properties.Settings.Default.saveLogPath;\r
\r
+ check_clearOldLogs.Checked = Properties.Settings.Default.clearOldLogs;\r
\r
// #############################\r
// Advanced\r
// Enable / Disable Query editor tab\r
if (Properties.Settings.Default.QueryEditorTab)\r
check_queryEditorTab.CheckState = CheckState.Checked;\r
+ check_promptOnUnmatchingQueries.Enabled = check_queryEditorTab.Checked;\r
\r
// Prompt on inconsistant queries\r
check_promptOnUnmatchingQueries.Checked = Properties.Settings.Default.PromptOnUnmatchingQueries;\r
if (Properties.Settings.Default.enocdeStatusInGui)\r
check_inGuiStatus.CheckState = CheckState.Checked;\r
\r
+ check_showCliForInGUIEncode.Checked = Properties.Settings.Default.showCliForInGuiEncodeStatus;\r
+ check_showCliForInGUIEncode.Enabled = check_inGuiStatus.Checked;\r
+\r
// Set the preview count\r
drop_previewScanCount.SelectedItem = Properties.Settings.Default.previewScanCount.ToString();\r
\r
}\r
\r
#region General\r
+\r
private void check_updateCheck_CheckedChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.updateStatus = check_updateCheck.Checked;\r
{\r
if (text_an_path.Text == string.Empty)\r
{\r
- Properties.Settings.Default.autoNamePath = "";\r
+ Properties.Settings.Default.autoNamePath = string.Empty;\r
text_an_path.Text = "Click 'Browse' to set the default location";\r
}\r
else\r
{\r
Properties.Settings.Default.useM4v = check_m4v.Checked;\r
}\r
+\r
#endregion\r
\r
#region Picture\r
+\r
private void btn_vlcPath_Click(object sender, EventArgs e)\r
{\r
openFile_vlc.ShowDialog();\r
if (openFile_vlc.FileName != string.Empty)\r
txt_vlcPath.Text = openFile_vlc.FileName;\r
}\r
+\r
private void txt_vlcPath_TextChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.VLC_Path = txt_vlcPath.Text;\r
}\r
+\r
#endregion\r
\r
#region Audio and Subtitles\r
+\r
private void drop_preferredLang_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.NativeLanguage = drop_preferredLang.SelectedItem.ToString();\r
}\r
+\r
private void radio_dub_CheckedChanged(object sender, EventArgs e)\r
{\r
if (radio_dub.Checked)\r
Properties.Settings.Default.DubAudio = true;\r
}\r
+\r
private void radio_foreignAndSubs_CheckedChanged(object sender, EventArgs e)\r
{\r
if (radio_foreignAndSubs.Checked)\r
Properties.Settings.Default.DubAudio = false;\r
- } \r
+ }\r
+\r
#endregion\r
\r
#region CLI\r
+\r
private void check_cli_minimized_CheckedChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.cli_minimized = check_cli_minimized.Checked;\r
{\r
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
string windir = Environment.GetEnvironmentVariable("WINDIR");\r
- System.Diagnostics.Process prc = new System.Diagnostics.Process();\r
+ Process prc = new Process();\r
prc.StartInfo.FileName = windir + @"\explorer.exe";\r
prc.StartInfo.Arguments = logDir;\r
prc.Start();\r
\r
private void btn_clearLogs_Click(object sender, EventArgs e)\r
{\r
- DialogResult result = MessageBox.Show("Are you sure you wish to clear the log file directory?", "Clear Logs", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);\r
+ DialogResult result = MessageBox.Show("Are you sure you wish to clear the log file directory?", "Clear Logs", \r
+ MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);\r
if (result == DialogResult.Yes)\r
{\r
Main.ClearLogs();\r
- MessageBox.Show(this, "HandBrake's Log file directory has been cleared!", "Notice", MessageBoxButtons.OK,\r
+ MessageBox.Show(this, "HandBrake's Log file directory has been cleared!", "Notice", MessageBoxButtons.OK, \r
MessageBoxIcon.Information);\r
}\r
}\r
+\r
+ private void check_clearOldLogs_CheckedChanged(object sender, EventArgs e)\r
+ {\r
+ Properties.Settings.Default.clearOldLogs = check_clearOldLogs.Checked;\r
+ }\r
+\r
#endregion\r
\r
#region Advanced\r
private void check_inGuiStatus_CheckedChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.enocdeStatusInGui = check_inGuiStatus.Checked;\r
+\r
+ check_showCliForInGUIEncode.Enabled = check_inGuiStatus.Checked;\r
+\r
+ if (this.IsHandleCreated)\r
+ if (check_inGuiStatus.Checked)\r
+ {\r
+ MessageBox.Show(\r
+ "This feature is experimental!\n\n You will not be able to \91Stop\92 an encode mid-process.\n"\r
+ + "Doing so will render the file unplayable.\n" +\r
+ "If you enable 'Show CLI Window', you'll be ablt to hit ctrl-c in the encode window to cleanly exit the CLI. This will give you a playable file.\n\n" +\r
+ "You are also limited to 1 instance of HandBrakeCLI on your system.", \r
+ "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+ }\r
+ }\r
+\r
+ private void check_showCliForInGUIEncode_CheckedChanged(object sender, EventArgs e)\r
+ {\r
+ Properties.Settings.Default.showCliForInGuiEncodeStatus = check_showCliForInGUIEncode.Checked;\r
}\r
\r
- \r
private void drop_previewScanCount_SelectedIndexChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.previewScanCount = int.Parse(drop_previewScanCount.SelectedItem.ToString());\r
{\r
Properties.Settings.Default.noDvdNav = check_dvdnav.Checked;\r
}\r
+\r
#endregion\r
\r
#region Debug\r
+\r
private void check_disableResCalc_CheckedChanged(object sender, EventArgs e)\r
{\r
Properties.Settings.Default.disableResCalc = check_disableResCalc.Checked;\r
}\r
+\r
#endregion\r
\r
private void btn_close_Click(object sender, EventArgs e)\r