OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 25 Jul 2007 17:49:59 +0000 (17:49 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 25 Jul 2007 17:49:59 +0000 (17:49 +0000)
- Splash screen added. (Bit of a hack but will work until such time it can be done properly)
- Added temporary splash screen image.
- Disbaled cancel button on frmReadDVD until such time it can be coded.

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

win/C#/HandBrakeCS.csproj
win/C#/Properties/Resources.Designer.cs
win/C#/Properties/Resources.resx
win/C#/Resources/tempSplash.jpg [new file with mode: 0644]
win/C#/frmMain.cs
win/C#/frmReadDVD.cs
win/C#/frmSplashScreen.Designer.cs
win/C#/frmSplashScreen.cs

index 829bad5..86d6e8a 100644 (file)
@@ -10,6 +10,7 @@
     <RootNamespace>Handbrake</RootNamespace>\r
     <AssemblyName>Handbrake</AssemblyName>\r
     <ApplicationIcon>handbrakepineapple.ico</ApplicationIcon>\r
+    <StartupObject>Handbrake.Program</StartupObject>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
     <DebugSymbols>true</DebugSymbols>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Content Include="handbrakepineapple.ico" />\r
+    <None Include="Resources\tempSplash.jpg" />\r
     <None Include="splash.jpg" />\r
   </ItemGroup>\r
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
index 845bedb..877f63b 100644 (file)
@@ -66,5 +66,12 @@ namespace Handbrake.Properties {
                 return ((System.Drawing.Bitmap)(obj));\r
             }\r
         }\r
+        \r
+        internal static System.Drawing.Bitmap tempSplash {\r
+            get {\r
+                object obj = ResourceManager.GetObject("tempSplash", resourceCulture);\r
+                return ((System.Drawing.Bitmap)(obj));\r
+            }\r
+        }\r
     }\r
 }\r
index ede7375..98a6225 100644 (file)
   <data name="splash" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
     <value>..\splash.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
   </data>\r
+  <data name="tempSplash" type="System.Resources.ResXFileRef, System.Windows.Forms">\r
+    <value>..\Resources\tempSplash.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\r
+  </data>\r
 </root>
\ No newline at end of file
diff --git a/win/C#/Resources/tempSplash.jpg b/win/C#/Resources/tempSplash.jpg
new file mode 100644 (file)
index 0000000..0bc46b5
Binary files /dev/null and b/win/C#/Resources/tempSplash.jpg differ
index 794a571..e70994e 100644 (file)
@@ -31,6 +31,9 @@ namespace Handbrake
         \r
         public frmMain()\r
         {\r
+            \r
+            ThreadPool.QueueUserWorkItem(showSplash);\r
+            Thread.Sleep(3000);\r
 \r
             InitializeComponent();\r
 \r
@@ -49,6 +52,13 @@ namespace Handbrake
             loadUserDefaults();\r
         }\r
 \r
+        public void showSplash(object sender)\r
+        {\r
+            Form splash = new frmSplashScreen();\r
+            splash.Show();\r
+            Thread.Sleep(3000);\r
+            splash.Close();\r
+        }\r
         public void loadUserDefaults()\r
         { \r
             try\r
@@ -1383,6 +1393,7 @@ namespace Handbrake
 \r
             return querySource+ queryDestination+ queryPictureSettings+ queryVideoSettings+ h264Settings+ queryAudioSettings+ queryAdvancedSettings+ verbose;\r
         }\r
+\r
         // This is the END of the road ------------------------------------------------------------------------------\r
     }\r
 }
\ No newline at end of file
index 6c73291..b06d100 100644 (file)
@@ -32,7 +32,7 @@ namespace Handbrake
         private void btn_ok_Click(object sender, EventArgs e)\r
         {\r
             btn_ok.Enabled = false;\r
-            btn_skip.Visible = true;\r
+            //btn_skip.Visible = true;\r
             lbl_pressOk.Visible = false;\r
             lbl_progress.Text = "0%";\r
             lbl_progress.Visible = true;\r
@@ -66,6 +66,8 @@ namespace Handbrake
 \r
             Parsing.Parser readData = new Parsing.Parser(hbProc.StandardError.BaseStream);\r
             readData.OnScanProgress += Parser_OnScanProgress;\r
+          \r
+\r
             readData.OnReadLine += dvdInfo.HandleParsedData;\r
             readData.OnReadToEnd += dvdInfo.HandleParsedData;\r
             hbProc.Close();\r
index 9201edd..b85def3 100644 (file)
@@ -29,119 +29,27 @@ namespace Handbrake
         private void InitializeComponent()\r
         {\r
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSplashScreen));\r
-            this.productName = new System.Windows.Forms.Label();\r
-            this.cliVersion = new System.Windows.Forms.Label();\r
-            this.guiVerison = new System.Windows.Forms.Label();\r
-            this.lbl_cli = new System.Windows.Forms.Label();\r
-            this.lbl_gui = new System.Windows.Forms.Label();\r
-            this.label1 = new System.Windows.Forms.Label();\r
-            this.label4 = new System.Windows.Forms.Label();\r
             this.SuspendLayout();\r
             // \r
-            // productName\r
-            // \r
-            this.productName.AutoSize = true;\r
-            this.productName.Font = new System.Drawing.Font("Verdana", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.productName.Location = new System.Drawing.Point(177, 69);\r
-            this.productName.Name = "productName";\r
-            this.productName.Size = new System.Drawing.Size(180, 32);\r
-            this.productName.TabIndex = 0;\r
-            this.productName.Text = "Handbrake";\r
-            // \r
-            // cliVersion\r
-            // \r
-            this.cliVersion.AutoSize = true;\r
-            this.cliVersion.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.cliVersion.Location = new System.Drawing.Point(180, 197);\r
-            this.cliVersion.Name = "cliVersion";\r
-            this.cliVersion.Size = new System.Drawing.Size(145, 13);\r
-            this.cliVersion.TabIndex = 1;\r
-            this.cliVersion.Text = "Handbrake CLI Version:";\r
-            // \r
-            // guiVerison\r
-            // \r
-            this.guiVerison.AutoSize = true;\r
-            this.guiVerison.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.guiVerison.Location = new System.Drawing.Point(180, 170);\r
-            this.guiVerison.Name = "guiVerison";\r
-            this.guiVerison.Size = new System.Drawing.Size(55, 13);\r
-            this.guiVerison.TabIndex = 2;\r
-            this.guiVerison.Text = "Version:";\r
-            // \r
-            // lbl_cli\r
-            // \r
-            this.lbl_cli.AutoSize = true;\r
-            this.lbl_cli.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_cli.Location = new System.Drawing.Point(331, 197);\r
-            this.lbl_cli.Name = "lbl_cli";\r
-            this.lbl_cli.Size = new System.Drawing.Size(88, 13);\r
-            this.lbl_cli.TabIndex = 4;\r
-            this.lbl_cli.Text = "{CLI Version}";\r
-            // \r
-            // lbl_gui\r
-            // \r
-            this.lbl_gui.AutoSize = true;\r
-            this.lbl_gui.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.lbl_gui.Location = new System.Drawing.Point(331, 170);\r
-            this.lbl_gui.Name = "lbl_gui";\r
-            this.lbl_gui.Size = new System.Drawing.Size(90, 13);\r
-            this.lbl_gui.TabIndex = 5;\r
-            this.lbl_gui.Text = "{GUI Version}";\r
-            // \r
-            // label1\r
-            // \r
-            this.label1.AutoSize = true;\r
-            this.label1.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label1.Location = new System.Drawing.Point(418, 170);\r
-            this.label1.Name = "label1";\r
-            this.label1.Size = new System.Drawing.Size(43, 13);\r
-            this.label1.TabIndex = 6;\r
-            this.label1.Text = "(Beta)";\r
-            // \r
-            // label4\r
-            // \r
-            this.label4.AutoSize = true;\r
-            this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label4.Location = new System.Drawing.Point(418, 197);\r
-            this.label4.Name = "label4";\r
-            this.label4.Size = new System.Drawing.Size(43, 13);\r
-            this.label4.TabIndex = 7;\r
-            this.label4.Text = "(Beta)";\r
-            // \r
             // frmSplashScreen\r
             // \r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
             this.BackColor = System.Drawing.Color.White;\r
-            this.BackgroundImage = global::Handbrake.Properties.Resources.splash;\r
+            this.BackgroundImage = global::Handbrake.Properties.Resources.tempSplash;\r
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;\r
             this.ClientSize = new System.Drawing.Size(496, 276);\r
             this.ControlBox = false;\r
-            this.Controls.Add(this.label4);\r
-            this.Controls.Add(this.label1);\r
-            this.Controls.Add(this.lbl_gui);\r
-            this.Controls.Add(this.lbl_cli);\r
-            this.Controls.Add(this.guiVerison);\r
-            this.Controls.Add(this.cliVersion);\r
-            this.Controls.Add(this.productName);\r
             this.Font = new System.Drawing.Font("Corbel", 8.25F);\r
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
             this.Name = "frmSplashScreen";\r
             this.Text = "SplashScreen";\r
             this.ResumeLayout(false);\r
-            this.PerformLayout();\r
 \r
         }\r
 \r
         #endregion\r
 \r
-        private System.Windows.Forms.Label productName;\r
-        private System.Windows.Forms.Label cliVersion;\r
-        private System.Windows.Forms.Label guiVerison;\r
-        private System.Windows.Forms.Label lbl_cli;\r
-        private System.Windows.Forms.Label lbl_gui;\r
-        private System.Windows.Forms.Label label1;\r
-        private System.Windows.Forms.Label label4;\r
     }\r
 }
\ No newline at end of file
index d45d0ca..f86122c 100644 (file)
@@ -14,8 +14,8 @@ namespace Handbrake
         public frmSplashScreen()\r
         {\r
             InitializeComponent();\r
-            lbl_cli.Text = Properties.Settings.Default.CliVersion;\r
-            lbl_gui.Text = Properties.Settings.Default.GuiVersion;\r
+            //lbl_cli.Text = Properties.Settings.Default.CliVersion;\r
+            //lbl_gui.Text = Properties.Settings.Default.GuiVersion;\r
         }\r
     }\r
 }
\ No newline at end of file