OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 30 Jan 2009 21:04:36 +0000 (21:04 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Fri, 30 Jan 2009 21:04:36 +0000 (21:04 +0000)
- Fixed broken struct in the activity window that was causing memory issues.
- Few code tweaks in program.cs

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

win/C#/Program.cs
win/C#/frmActivityWindow.cs

index 6ab76bb..809626d 100644 (file)
@@ -22,7 +22,7 @@ namespace Handbrake
             try\r
             {\r
                 // Make sure the screen resolution is not below 1024x768\r
-                System.Windows.Forms.Screen scr = System.Windows.Forms.Screen.PrimaryScreen;\r
+                System.Windows.Forms.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.ToString() + "x" + scr.Bounds.Height.ToString() + " \nScreen resolution is too Low. Must be 1024x720 or greater", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);\r
@@ -35,7 +35,7 @@ namespace Handbrake
             }\r
 \r
             // Either Launch or Close the Application\r
-            if (launch == true)\r
+            if (launch)\r
             {\r
                 Application.EnableVisualStyles();\r
                 Application.SetCompatibleTextRenderingDefault(false);\r
index 94597f7..5c14e41 100644 (file)
@@ -29,7 +29,7 @@ namespace Handbrake
         public frmActivityWindow(string file, Functions.Encode eh)\r
         {\r
             InitializeComponent();\r
-            rtf_actLog.Text = string.Empty;\r
+            this.rtf_actLog.Text = string.Empty;\r
 \r
             // When the window closes, we want to abort the monitor thread.\r
             this.Disposed += new EventHandler(forceQuit);\r
@@ -310,9 +310,16 @@ namespace Handbrake
         }\r
 \r
         #region System Information\r
-        private struct MEMORYSTATUS\r
+        private struct MEMORYSTATUS // Unused var's are requred here.\r
         {\r
+            public UInt32 dwLength;\r
+            public UInt32 dwMemoryLoad;\r
             public UInt32 dwTotalPhys; // Used\r
+            public UInt32 dwAvailPhys;\r
+            public UInt32 dwTotalPageFile;\r
+            public UInt32 dwAvailPageFile;\r
+            public UInt32 dwTotalVirtual;\r
+            public UInt32 dwAvailVirtual;\r
         }\r
 \r
         [DllImport("kernel32.dll")]\r