OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 2 Sep 2009 10:05:31 +0000 (10:05 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 2 Sep 2009 10:05:31 +0000 (10:05 +0000)
- Fix spelling error with regards to no auto name directory set.
- Lower Res check limit to 620. Should allow overscan tv's to work just fine.
- cleaned up program.cs a bit.
- Fixed the show queue button. It now activates the queue window correctly.

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

win/C#/Program.cs
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

index f2bae96..64ef81b 100644 (file)
@@ -19,35 +19,16 @@ namespace Handbrake
         [STAThread]\r
         static void Main()\r
         {\r
-            // Check the system meets the system requirements.\r
-            Boolean launch = true;\r
-            try\r
-            {\r
-                // Make sure the screen resolution is not below 1024x768\r
-                Screen scr = Screen.PrimaryScreen;\r
-                if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 720))\r
-                {\r
-                    MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
-                    launch = false;\r
-                }\r
-            }\r
-            catch (Exception exc)\r
-            {\r
-                MessageBox.Show("frmMain.cs - systemCheck() " + exc);\r
-            }\r
-\r
-            // Either Launch or Close the Application\r
-            if (launch)\r
+            Screen scr = Screen.PrimaryScreen;\r
+            if ((scr.Bounds.Width < 1024) || (scr.Bounds.Height < 620))\r
+                MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n" + "Your screen is running at: " + scr.Bounds.Width + "x" + scr.Bounds.Height + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+            else\r
             {\r
-                string appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake";\r
-                if (!Directory.Exists(appDir))\r
-                    Directory.CreateDirectory(appDir);\r
-\r
-                string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
+                string logDir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\logs");\r
                 if (!Directory.Exists(logDir))\r
                     Directory.CreateDirectory(logDir);\r
 \r
-                if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml"))\r
+                if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml")))\r
                 {\r
                     PresetsHandler x = new PresetsHandler();\r
                     x.updateBuiltInPresets();\r
@@ -57,8 +38,6 @@ namespace Handbrake
                 Application.SetCompatibleTextRenderingDefault(false);\r
                 Application.Run(new frmMain());\r
             }\r
-            else\r
-                Application.Exit();\r
         }\r
     }\r
 \r
index b983551..0fba4d2 100644 (file)
@@ -99,7 +99,6 @@ namespace Handbrake
             this.Label47 = new System.Windows.Forms.Label();\r
             this.Label3 = new System.Windows.Forms.Label();\r
             this.tab_audio = new System.Windows.Forms.TabPage();\r
-            this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
             this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);\r
             this.tab_video = new System.Windows.Forms.TabPage();\r
             this.radio_cq = new System.Windows.Forms.RadioButton();\r
@@ -111,18 +110,14 @@ namespace Handbrake
             this.SliderValue = new System.Windows.Forms.Label();\r
             this.Label46 = new System.Windows.Forms.Label();\r
             this.tab_picture = new System.Windows.Forms.TabPage();\r
-            this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
             this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();\r
             this.tabs_panel = new System.Windows.Forms.TabControl();\r
             this.tab_filters = new System.Windows.Forms.TabPage();\r
-            this.Filters = new Handbrake.Controls.Filters();\r
             this.tab_subtitles = new System.Windows.Forms.TabPage();\r
-            this.Subtitles = new Handbrake.Controls.Subtitles();\r
             this.tab_chapters = new System.Windows.Forms.TabPage();\r
             this.btn_importChapters = new System.Windows.Forms.Button();\r
             this.label31 = new System.Windows.Forms.Label();\r
             this.tab_advanced = new System.Windows.Forms.TabPage();\r
-            this.x264Panel = new Handbrake.Controls.x264Panel();\r
             this.tab_query = new System.Windows.Forms.TabPage();\r
             this.btn_clear = new System.Windows.Forms.Button();\r
             this.label34 = new System.Windows.Forms.Label();\r
@@ -176,6 +171,11 @@ namespace Handbrake
             this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();\r
             this.openPreset = new System.Windows.Forms.OpenFileDialog();\r
             this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();\r
+            this.PictureSettings = new Handbrake.Controls.PictureSettings();\r
+            this.Filters = new Handbrake.Controls.Filters();\r
+            this.AudioSettings = new Handbrake.Controls.AudioPanel();\r
+            this.Subtitles = new Handbrake.Controls.Subtitles();\r
+            this.x264Panel = new Handbrake.Controls.x264Panel();\r
             notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
             notifyIconMenu.SuspendLayout();\r
             ((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
@@ -784,15 +784,6 @@ namespace Handbrake
             this.tab_audio.Text = "Audio";\r
             this.tab_audio.UseVisualStyleBackColor = true;\r
             // \r
-            // AudioSettings\r
-            // \r
-            this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
-            this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
-            this.AudioSettings.Name = "AudioSettings";\r
-            this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
-            this.AudioSettings.TabIndex = 0;\r
-            // \r
             // AudioMenuRowHeightHack\r
             // \r
             this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;\r
@@ -929,16 +920,6 @@ namespace Handbrake
             this.tab_picture.Text = "Picture";\r
             this.tab_picture.UseVisualStyleBackColor = true;\r
             // \r
-            // PictureSettings\r
-            // \r
-            this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
-            this.PictureSettings.Enabled = false;\r
-            this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
-            this.PictureSettings.Name = "PictureSettings";\r
-            this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
-            this.PictureSettings.TabIndex = 0;\r
-            // \r
             // Check_ChapterMarkers\r
             // \r
             this.Check_ChapterMarkers.AutoSize = true;\r
@@ -978,15 +959,6 @@ namespace Handbrake
             this.tab_filters.Text = "Video Filters";\r
             this.tab_filters.UseVisualStyleBackColor = true;\r
             // \r
-            // Filters\r
-            // \r
-            this.Filters.BackColor = System.Drawing.Color.Transparent;\r
-            this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Filters.Location = new System.Drawing.Point(0, 0);\r
-            this.Filters.Name = "Filters";\r
-            this.Filters.Size = new System.Drawing.Size(713, 310);\r
-            this.Filters.TabIndex = 0;\r
-            // \r
             // tab_subtitles\r
             // \r
             this.tab_subtitles.Controls.Add(this.Subtitles);\r
@@ -998,15 +970,6 @@ namespace Handbrake
             this.tab_subtitles.Text = "Subtitles";\r
             this.tab_subtitles.UseVisualStyleBackColor = true;\r
             // \r
-            // Subtitles\r
-            // \r
-            this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
-            this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
-            this.Subtitles.Name = "Subtitles";\r
-            this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
-            this.Subtitles.TabIndex = 0;\r
-            // \r
             // tab_chapters\r
             // \r
             this.tab_chapters.BackColor = System.Drawing.Color.Transparent;\r
@@ -1057,16 +1020,6 @@ namespace Handbrake
             this.tab_advanced.Text = "Advanced";\r
             this.tab_advanced.UseVisualStyleBackColor = true;\r
             // \r
-            // x264Panel\r
-            // \r
-            this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
-            this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
-            this.x264Panel.Name = "x264Panel";\r
-            this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
-            this.x264Panel.TabIndex = 0;\r
-            this.x264Panel.x264Query = "";\r
-            // \r
             // tab_query\r
             // \r
             this.tab_query.Controls.Add(this.btn_clear);\r
@@ -1640,11 +1593,59 @@ namespace Handbrake
             // \r
             this.File_ChapterImport.Filter = "CSV Files|*.csv";\r
             // \r
+            // PictureSettings\r
+            // \r
+            this.PictureSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.PictureSettings.Enabled = false;\r
+            this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.PictureSettings.Location = new System.Drawing.Point(0, 0);\r
+            this.PictureSettings.Name = "PictureSettings";\r
+            this.PictureSettings.Size = new System.Drawing.Size(666, 279);\r
+            this.PictureSettings.TabIndex = 0;\r
+            // \r
+            // Filters\r
+            // \r
+            this.Filters.BackColor = System.Drawing.Color.Transparent;\r
+            this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Filters.Location = new System.Drawing.Point(0, 0);\r
+            this.Filters.Name = "Filters";\r
+            this.Filters.Size = new System.Drawing.Size(713, 310);\r
+            this.Filters.TabIndex = 0;\r
+            // \r
+            // AudioSettings\r
+            // \r
+            this.AudioSettings.BackColor = System.Drawing.Color.Transparent;\r
+            this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.AudioSettings.Location = new System.Drawing.Point(0, 0);\r
+            this.AudioSettings.Name = "AudioSettings";\r
+            this.AudioSettings.Size = new System.Drawing.Size(715, 310);\r
+            this.AudioSettings.TabIndex = 0;\r
+            // \r
+            // Subtitles\r
+            // \r
+            this.Subtitles.BackColor = System.Drawing.Color.Transparent;\r
+            this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.Subtitles.Location = new System.Drawing.Point(0, 0);\r
+            this.Subtitles.Name = "Subtitles";\r
+            this.Subtitles.Size = new System.Drawing.Size(722, 310);\r
+            this.Subtitles.TabIndex = 0;\r
+            // \r
+            // x264Panel\r
+            // \r
+            this.x264Panel.BackColor = System.Drawing.Color.Transparent;\r
+            this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.x264Panel.Location = new System.Drawing.Point(0, 0);\r
+            this.x264Panel.Name = "x264Panel";\r
+            this.x264Panel.Size = new System.Drawing.Size(720, 306);\r
+            this.x264Panel.TabIndex = 0;\r
+            this.x264Panel.x264Query = "";\r
+            // \r
             // frmMain\r
             // \r
             this.AllowDrop = true;\r
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\r
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\r
+            this.AutoScroll = true;\r
             this.ClientSize = new System.Drawing.Size(1000, 582);\r
             this.Controls.Add(this.tableLayoutPanel3);\r
             this.Controls.Add(this.toolStrip1);\r
@@ -1660,6 +1661,7 @@ namespace Handbrake
             this.DoubleBuffered = true;\r
             this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));\r
+            this.MinimumSize = new System.Drawing.Size(775, 480);\r
             this.Name = "frmMain";\r
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\r
             this.Text = "HandBrake";\r
index 53b1541..ec2b3a6 100644 (file)
@@ -756,6 +756,7 @@ namespace Handbrake
         private void btn_showQueue_Click(object sender, EventArgs e)\r
         {\r
             queueWindow.Show();\r
+            queueWindow.Activate();\r
         }\r
         private void tb_preview_Click(object sender, EventArgs e)\r
         {\r
@@ -938,7 +939,7 @@ namespace Handbrake
                 if (autoPath != null)\r
                     text_destination.Text = autoPath;\r
                 else\r
-                    MessageBox.Show("You currently have \"Automatically name output files\" enabled for the destination file box, but you do not have a default direcotry set.\n\nYou should set a \"Default Path\" in HandBrakes preferences. (See 'Tools' menu -> 'Options' -> 'General' Tab -> 'Default Path')", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
+                    MessageBox.Show("You currently have \"Automatically name output files\" enabled for the destination file box, but you do not have a default directory set.\n\nYou should set a \"Default Path\" in HandBrakes preferences. (See 'Tools' menu -> 'Options' -> 'General' Tab -> 'Default Path')", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);\r
             }\r
 \r
             data_chpt.Rows.Clear();\r