OSDN Git Service

WinGui:
[handbrake-jp/handbrake-jp-git.git] / win / C# / frmMain.cs
index 8c5ca36..165da56 100644 (file)
@@ -77,6 +77,11 @@ namespace Handbrake
                     return this.dvdDriveLabel;\r
                 }\r
 \r
+                if (selectedTitle != null && !string.IsNullOrEmpty(selectedTitle.SourceName))\r
+                {\r
+                    return Path.GetFileName(selectedTitle.SourceName);\r
+                }\r
+\r
                 if (Path.GetFileNameWithoutExtension(this.sourcePath) != "VIDEO_TS")\r
                     return Path.GetFileNameWithoutExtension(this.sourcePath);\r
 \r
@@ -924,21 +929,16 @@ namespace Handbrake
         /// </summary>\r
         private void ExportPreset()\r
         {\r
-            MessageBox.Show("This feature has not been implimented yet.", "Not Implimented", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
-            return;\r
-\r
-            /*SaveFileDialog savefiledialog = new SaveFileDialog();\r
-            savefiledialog.Filter = "plist|*.plist";\r
+            SaveFileDialog savefiledialog = new SaveFileDialog { Filter = "plist|*.plist" };\r
 \r
             if (treeView_presets.SelectedNode != null)\r
             {\r
-\r
                 if (savefiledialog.ShowDialog() == DialogResult.OK)\r
                 {\r
                     Preset preset = presetHandler.GetPreset(treeView_presets.SelectedNode.Text);\r
                     PlistPresetHandler.Export(savefiledialog.FileName, preset);\r
                 }\r
-            }*/\r
+            }\r
         }\r
 \r
         #endregion\r
@@ -1440,7 +1440,7 @@ namespace Handbrake
             // Update the source label if we have multiple streams\r
             if (selectedTitle != null)\r
                 if (!string.IsNullOrEmpty(selectedTitle.SourceName))\r
-                    labelSource.Text = labelSource.Text = Path.GetFileName(selectedTitle.SourceName);\r
+                    labelSource.Text = Path.GetFileName(selectedTitle.SourceName);\r
 \r
             // Run the AutoName & ChapterNaming functions\r
             if (Properties.Settings.Default.autoNaming)\r
@@ -2201,11 +2201,6 @@ namespace Handbrake
         private void UpdateSourceLabel()\r
         {\r
             labelSource.Text = string.IsNullOrEmpty(sourcePath) ? "Select \"Source\" to continue." : this.SourceName;\r
-\r
-            if (selectedTitle != null)\r
-                if (!string.IsNullOrEmpty(selectedTitle.SourceName))\r
-                    // If it's one of multiple source files, make sure we don't use the folder name\r
-                    labelSource.Text = Path.GetFileName(selectedTitle.SourceName);\r
         }\r
 \r
         /// <summary>\r