OSDN Git Service

CLI: update the built in presets
[handbrake-jp/handbrake-jp-git.git] / win / C# / frmPreview.cs
index bbf8c78..3a8a220 100644 (file)
@@ -10,6 +10,7 @@ namespace Handbrake
     using System.IO;\r
     using System.Runtime.InteropServices;\r
     using System.Threading;\r
+    using System.Windows;\r
     using System.Windows.Forms;\r
     using Functions;\r
 \r
@@ -19,6 +20,8 @@ namespace Handbrake
     using QTOControlLib;\r
     using QTOLibrary;\r
 \r
+    using MessageBox = System.Windows.Forms.MessageBox;\r
+\r
     /// <summary>\r
     /// The Preview Window\r
     /// </summary>\r
@@ -73,6 +76,13 @@ namespace Handbrake
             catch (Exception)\r
             {\r
                 this.noQt = true;\r
+\r
+                int borderWidth = (this.Width - this.ClientSize.Width) / 2;\r
+                int titlebarAndBorder = this.Height - this.ClientSize.Height;\r
+\r
+                this.Height = toolBar.Height + titlebarAndBorder + 1;\r
+                btn_playQT.Enabled = false;\r
+                btn_playQT.Visible = false;\r
             }\r
 \r
             this.mainWindow = mw;\r
@@ -400,7 +410,7 @@ namespace Handbrake
                 QTControl.Show();\r
 \r
                 this.ClientSize = QTControl.Size;\r
-                this.Height += 25;\r
+                this.Height += toolBar.Height;\r
             }\r
             catch (COMException ex)\r
             {\r