OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 7 Nov 2010 18:46:56 +0000 (18:46 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sun, 7 Nov 2010 18:46:56 +0000 (18:46 +0000)
- Collaspe the preview window if QT is not installed. Hide the QuickTime playback options.

git-svn-id: svn://localhost/HandBrake/trunk@3659 b64f7644-9d1e-0410-96f1-a4d463321fa5

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