OSDN Git Service

CLI: add iso639-2 language code to audio track information display
[handbrake-jp/handbrake-jp-git.git] / win / C# / frmActivityWindow.cs
index 981ed2f..c308990 100644 (file)
@@ -8,8 +8,8 @@ using System;
 using System.Windows.Forms;\r
 using System.IO;\r
 using System.Threading;\r
-using System.Runtime.InteropServices;\r
 using Handbrake.EncodeQueue;\r
+using Handbrake.Functions;\r
 using Microsoft.Win32;\r
 \r
 \r
@@ -68,9 +68,9 @@ namespace Handbrake
             rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));\r
             rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n", Application.UserAppDataPath));\r
             rtf_actLog.AppendText("#########################################\n\n");\r
-            if (encodeQueue.isEncoding && encodeQueue.lastQueueItem.Query != String.Empty)\r
+            if (encodeQueue.IsEncoding && encodeQueue.LastEncode.Query != String.Empty)\r
             {\r
-                rtf_actLog.AppendText("### CLI Query: " + encodeQueue.lastQueueItem.Query + "\n\n");\r
+                rtf_actLog.AppendText("### CLI Query: " + encodeQueue.LastEncode.Query + "\n\n");\r
                 rtf_actLog.AppendText("#########################################\n\n");\r
             }\r
         }\r
@@ -114,7 +114,7 @@ namespace Handbrake
                 updateTextFromThread();\r
                 while (true)\r
                 {\r
-                    if (encodeQueue.isEncoding || mainWin.isScanning)\r
+                    if (encodeQueue.IsEncoding || mainWin.isScanning)\r
                         updateTextFromThread();\r
                     else\r
                     {\r
@@ -304,23 +304,7 @@ namespace Handbrake
         #endregion\r
 \r
         #region System Information\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
-        private static extern void GlobalMemoryStatus\r
-        (\r
-            ref MEMORYSTATUS lpBuffer\r
-        );\r
+        \r
 \r
         /// <summary>\r
         /// Returns the total physical ram in a system\r
@@ -328,8 +312,8 @@ namespace Handbrake
         /// <returns></returns>\r
         public uint TotalPhysicalMemory()\r
         {\r
-            MEMORYSTATUS memStatus = new MEMORYSTATUS();\r
-            GlobalMemoryStatus(ref memStatus);\r
+            Win32.MEMORYSTATUS memStatus = new Win32.MEMORYSTATUS();\r
+            Win32.GlobalMemoryStatus(ref memStatus);\r
 \r
             uint MemoryInfo = memStatus.dwTotalPhys;\r
             MemoryInfo = MemoryInfo / 1024 / 1024;\r