OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / frmOptions.cs
index 5f5977a..5427aeb 100644 (file)
@@ -21,7 +21,7 @@ namespace Handbrake
             InitializeComponent();\r
             mainWindow = mw;\r
 \r
-            IDictionary<string, string> langList = Main.mapLanguages();\r
+            IDictionary<string, string> langList = Main.MapLanguages();\r
             foreach (string item in langList.Keys)\r
                 drop_preferredLang.Items.Add(item);\r
 \r
@@ -116,7 +116,6 @@ namespace Handbrake
             // 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
@@ -128,6 +127,7 @@ namespace Handbrake
             // 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
@@ -144,6 +144,7 @@ namespace Handbrake
             // 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
@@ -156,6 +157,9 @@ namespace Handbrake
             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
@@ -290,7 +294,7 @@ namespace Handbrake
         {\r
             if (radio_foreignAndSubs.Checked)\r
                 Properties.Settings.Default.DubAudio = false;\r
-        }       \r
+        }\r
         #endregion\r
 \r
         #region CLI\r
@@ -352,11 +356,16 @@ namespace Handbrake
             DialogResult result = MessageBox.Show("Are you sure you wish to clear the log file directory?", "Clear Logs", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);\r
             if (result == DialogResult.Yes)\r
             {\r
-                Main.clearLogs();\r
+                Main.ClearLogs();\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
         #endregion\r
 \r
         #region Advanced\r
@@ -391,9 +400,25 @@ namespace Handbrake
         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("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