コミットメタ情報

リビジョンf14f3aa4a0ce207c190e524e5204ed9ae4eab8e3 (tree)
日時2019-09-02 01:11:47
作者yyagi <yyagi.dtxmania@gmai...>
コミッターyyagi

ログメッセージ

#xxxxx システムログを出力するメソッドを、別クラスに分けた。CDTXManiaに置きつづけておくのはよろしくないと思うので。

変更サマリ

差分

--- a/DTXMania/DTXMania.csproj
+++ b/DTXMania/DTXMania.csproj
@@ -158,6 +158,7 @@
158158 <Compile Include="コード\ステージ\07.演奏\TypesForPlayStage.cs" />
159159 <Compile Include="コード\ステージ\CActDigit.cs" />
160160 <Compile Include="コード\全体\cmdparse.cs" />
161+ <Compile Include="コード\全体\CPutSystemLog.cs" />
161162 <Compile Include="コード\全体\CResources.cs" />
162163 <Compile Include="コード\全体\Coordinates.cs" />
163164 <Compile Include="コード\全体\CDTX2WAVmode.cs" />
--- a/DTXMania/コード/全体/CDTXMania.cs
+++ b/DTXMania/コード/全体/CDTXMania.cs
@@ -263,9 +263,7 @@ namespace DTXMania
263263 Trace.TraceInformation("----------------------");
264264 Trace.TraceInformation("■ アプリケーションの初期化");
265265
266- PutSystemLog();
267-
268-
266+ CPutSystemLog.PutSystemLog();
269267 #endregion
270268
271269 #region [ 言語の設定 ]
@@ -3173,151 +3171,5 @@ namespace DTXMania
31733171 bマウスカーソル表示中 = false;
31743172 }
31753173 }
3176-
3177- /// <summary>
3178- /// システム環境のログを出力する
3179- /// </summary>
3180- private void PutSystemLog()
3181- {
3182- System.Management.ManagementClass mc =
3183- new System.Management.ManagementClass("Win32_Processor");
3184- System.Management.ManagementObjectCollection moc = mc.GetInstances();
3185- foreach (System.Management.ManagementObject mo in moc)
3186- {
3187- Trace.TraceInformation("-------------------------");
3188- Trace.TraceInformation("CPU Information:");
3189- //Trace.TraceInformation("DeviceID = {0}", mo["DeviceID"]);
3190- Trace.TraceInformation("Name = {0}", mo["Name"]);
3191- Trace.TraceInformation("MaxClockSpeed = {0}MHz", mo["MaxClockSpeed"]);
3192- Trace.TraceInformation("L2CacheSize = {0}KB", mo["L2CacheSize"]);
3193- Trace.TraceInformation("L3CacheSize = {0}KB", mo["L3CacheSize"]);
3194- Trace.TraceInformation("NumberOfCores = {0}", mo["NumberOfCores"]);
3195- Trace.TraceInformation("NumberOfLogicalProcessors = {0}", mo["NumberOfLogicalProcessors"]);
3196- }
3197- moc.Dispose();
3198- mc.Dispose();
3199-
3200- //System.Management.ManagementClass mc =
3201- // new System.Management.ManagementClass("Win32_OperatingSystem");
3202- //System.Management.ManagementObjectCollection moc = mc.GetInstances();
3203- mc =
3204- new System.Management.ManagementClass("Win32_OperatingSystem");
3205- moc = mc.GetInstances();
3206- foreach (System.Management.ManagementObject mo in moc)
3207- {
3208- Trace.TraceInformation("-------------------------");
3209- Trace.TraceInformation("OS Information:");
3210- //簡単な説明(Windows 8.1では「Microsoft Windows 8.1 Pro」等)
3211- Trace.TraceInformation("OS: " + mo["Caption"]);
3212- //バージョン(Windows 8.1では、「6.3.9600」)
3213- Trace.TraceInformation("Version: " + mo["Version"]);
3214- //ビルド番号(Windows 8.1では「9600」)
3215- //Trace.TraceInformation( "BuildNumber: " + mo["BuildNumber"]);
3216-
3217- //サービスパック(Windows 8.1ではNULL)
3218- Trace.TraceInformation("CSDVersion (ServicePack): " + mo["CSDVersion"]);
3219- //言語(日本語は「1041」)
3220- Trace.TraceInformation("OSLanguage: " + mo["OSLanguage"]);
3221-
3222- Trace.TraceInformation("OSArchitecture: " + mo["OSArchitecture"]);
3223-
3224- //Trace.TraceInformation("TotalVisibleMemorySize = {0}", mo["TotalVisibleMemorySize"]);
3225- }
3226- moc.Dispose();
3227- mc.Dispose();
3228-
3229- Trace.TraceInformation("-------------------------");
3230- Trace.TraceInformation("General Environment Information:");
3231- //Trace.TraceInformation("OS Version: " + Environment.OSVersion); // fake version will be returned (due to the lack of manifest settings)
3232- //Trace.TraceInformation("ProcessorCount: " + Environment.ProcessorCount.ToString());
3233- Trace.TraceInformation("CLR Version: " + Environment.Version.ToString());
3234- Trace.TraceInformation("SystemPageSize: " + Environment.SystemPageSize.ToString());
3235-
3236- var cominfo = new Microsoft.VisualBasic.Devices.ComputerInfo();
3237- Trace.TraceInformation("TotalPhysicalMemorySize: {0:F2}GB", (cominfo.TotalPhysicalMemory / 1024f / 1024f / 1024f));
3238- Trace.TraceInformation("VirtialMemorySize: {0:F2}GB", (cominfo.TotalVirtualMemory / 1024f / 1024f / 1024f));
3239- Trace.TraceInformation("FreePhysicalMemorySize: {0:F2}MB", (cominfo.AvailablePhysicalMemory / 1024f / 1024f));
3240- Trace.TraceInformation("FreeVirtualMemorySize: {0:F2}MB", (cominfo.AvailableVirtualMemory / 1024f / 1024f));
3241- //Trace.TraceInformation(cominfo.OSFullName + ", " + cominfo.OSPlatform + ", " + cominfo.OSVersion);
3242-
3243- mc = new System.Management.ManagementClass("Win32_PhysicalMemory");
3244- moc = mc.GetInstances();
3245- Trace.TraceInformation("-------------------------");
3246- Trace.TraceInformation("Physical Memory Information:");
3247- foreach (System.Management.ManagementObject mo in moc)
3248- {
3249- Trace.TraceInformation("Capacity: {0:F2}GB", (Convert.ToInt64(mo["Capacity"]) / 1024f / 1024f / 1024f));
3250- }
3251- moc.Dispose();
3252- mc.Dispose();
3253-
3254- mc = new System.Management.ManagementClass("Win32_DisplayControllerConfiguration");
3255- moc = mc.GetInstances();
3256- foreach (System.Management.ManagementObject mo in moc)
3257- {
3258- Trace.TraceInformation("-------------------------");
3259- Trace.TraceInformation("Display Adapter Information:");
3260- Trace.TraceInformation("Name: " + mo["Name"]);
3261- Trace.TraceInformation("VideoMode: " + mo["VideoMode"]);
3262- Trace.TraceInformation("HorizontalResolution: " + mo["HorizontalResolution"]);
3263- Trace.TraceInformation("VerticalResolution: " + mo["VerticalResolution"]);
3264- Trace.TraceInformation("RefreshRate: " + mo["RefreshRate"]);
3265- }
3266- moc.Dispose();
3267- mc.Dispose();
3268-
3269- mc = new System.Management.ManagementClass("Win32_VideoController");
3270- moc = mc.GetInstances();
3271- foreach (System.Management.ManagementObject mo in moc)
3272- {
3273- Trace.TraceInformation("-------------------------");
3274- Trace.TraceInformation("Video Controller Information:");
3275- Trace.TraceInformation("Description: " + mo["Description"]);
3276- Trace.TraceInformation("AdapterRAM: {0}MB", (Convert.ToInt64(mo["AdapterRAM"]) / 1024f / 1024f));
3277- Trace.TraceInformation("CapabilityDescriptions: " + mo["CapabilityDescriptions"]);
3278- }
3279- moc.Dispose();
3280- mc.Dispose();
3281-
3282- mc = new System.Management.ManagementClass("Win32_DesktopMonitor");
3283- moc = mc.GetInstances();
3284- foreach (System.Management.ManagementObject mo in moc)
3285- {
3286- Trace.TraceInformation("-------------------------");
3287- Trace.TraceInformation("Display Information:");
3288- Trace.TraceInformation("Description: " + mo["Description"]);
3289- Trace.TraceInformation("PixelsPerXLogicalInch: " + mo["PixelsPerXLogicalInch"]);
3290- Trace.TraceInformation("PixelsPerYLogicalInch: " + mo["PixelsPerYLogicalInch"]);
3291- Trace.TraceInformation("ScreenWidth: " + mo["ScreenWidth"]);
3292- Trace.TraceInformation("ScreenHeight: " + mo["ScreenHeight"]);
3293- }
3294- moc.Dispose();
3295- mc.Dispose();
3296-
3297- mc = new System.Management.ManagementClass("Win32_SoundDevice");
3298- moc = mc.GetInstances();
3299- foreach (System.Management.ManagementObject mo in moc)
3300- {
3301- Trace.TraceInformation("-------------------------");
3302- Trace.TraceInformation("Audio Information:");
3303- //Trace.TraceInformation("Caption: " + mo["Caption"]);
3304- //Trace.TraceInformation("ProductName: " + mo["ProductName"]);
3305- //Trace.TraceInformation("DMABufferSize: " + mo["DMABufferSize"]);
3306-
3307- foreach (PropertyData property in mo.Properties)
3308- {
3309- Trace.TraceInformation("{0}:{1}", property.Name, property.Value);
3310- }
3311- }
3312- moc.Dispose();
3313- mc.Dispose();
3314-
3315- Trace.TraceInformation("----------------------");
3316- Trace.TraceInformation("DTXMania settings:");
3317- Trace.TraceInformation("VSyncWait: " + ConfigIni.bVSyncWait.ToString());
3318- Trace.TraceInformation("Fullscreen: " + ConfigIni.bFullScreen.ToString());
3319- Trace.TraceInformation("----------------------");
3320- }
3321-
33223174 }
33233175 }
--- /dev/null
+++ b/DTXMania/コード/全体/CPutSystemLog.cs
@@ -0,0 +1,158 @@
1+using System;
2+using System.Collections.Generic;
3+using System.Linq;
4+using System.Text;
5+using System.Threading.Tasks;
6+using System.Diagnostics;
7+using System.Management;
8+
9+namespace DTXMania
10+{
11+ /// <summary>
12+ /// システム環境のログを出力する
13+ /// </summary>
14+ public static class CPutSystemLog
15+ {
16+ public static void PutSystemLog()
17+ {
18+ System.Management.ManagementClass mc =
19+ new System.Management.ManagementClass("Win32_Processor");
20+ System.Management.ManagementObjectCollection moc = mc.GetInstances();
21+ foreach (System.Management.ManagementObject mo in moc)
22+ {
23+ Trace.TraceInformation("-------------------------");
24+ Trace.TraceInformation("CPU Information:");
25+ //Trace.TraceInformation("DeviceID = {0}", mo["DeviceID"]);
26+ Trace.TraceInformation("Name = {0}", mo["Name"]);
27+ Trace.TraceInformation("MaxClockSpeed = {0}MHz", mo["MaxClockSpeed"]);
28+ Trace.TraceInformation("L2CacheSize = {0}KB", mo["L2CacheSize"]);
29+ Trace.TraceInformation("L3CacheSize = {0}KB", mo["L3CacheSize"]);
30+ Trace.TraceInformation("NumberOfCores = {0}", mo["NumberOfCores"]);
31+ Trace.TraceInformation("NumberOfLogicalProcessors = {0}", mo["NumberOfLogicalProcessors"]);
32+ }
33+ moc.Dispose();
34+ mc.Dispose();
35+
36+ //System.Management.ManagementClass mc =
37+ // new System.Management.ManagementClass("Win32_OperatingSystem");
38+ //System.Management.ManagementObjectCollection moc = mc.GetInstances();
39+ mc =
40+ new System.Management.ManagementClass("Win32_OperatingSystem");
41+ moc = mc.GetInstances();
42+ foreach (System.Management.ManagementObject mo in moc)
43+ {
44+ Trace.TraceInformation("-------------------------");
45+ Trace.TraceInformation("OS Information:");
46+ //簡単な説明(Windows 8.1では「Microsoft Windows 8.1 Pro」等)
47+ Trace.TraceInformation("OS: " + mo["Caption"]);
48+ //バージョン(Windows 8.1では、「6.3.9600」)
49+ Trace.TraceInformation("Version: " + mo["Version"]);
50+ //ビルド番号(Windows 8.1では「9600」)
51+ //Trace.TraceInformation( "BuildNumber: " + mo["BuildNumber"]);
52+
53+ //サービスパック(Windows 8.1ではNULL)
54+ Trace.TraceInformation("CSDVersion (ServicePack): " + mo["CSDVersion"]);
55+ //言語(日本語は「1041」)
56+ Trace.TraceInformation("OSLanguage: " + mo["OSLanguage"]);
57+
58+ Trace.TraceInformation("OSArchitecture: " + mo["OSArchitecture"]);
59+
60+ //Trace.TraceInformation("TotalVisibleMemorySize = {0}", mo["TotalVisibleMemorySize"]);
61+ }
62+ moc.Dispose();
63+ mc.Dispose();
64+
65+ Trace.TraceInformation("-------------------------");
66+ Trace.TraceInformation("General Environment Information:");
67+ //Trace.TraceInformation("OS Version: " + Environment.OSVersion); // fake version will be returned (due to the lack of manifest settings)
68+ //Trace.TraceInformation("ProcessorCount: " + Environment.ProcessorCount.ToString());
69+ Trace.TraceInformation("CLR Version: " + Environment.Version.ToString());
70+ Trace.TraceInformation("SystemPageSize: " + Environment.SystemPageSize.ToString());
71+
72+ var cominfo = new Microsoft.VisualBasic.Devices.ComputerInfo();
73+ Trace.TraceInformation("TotalPhysicalMemorySize: {0:F2}GB", (cominfo.TotalPhysicalMemory / 1024f / 1024f / 1024f));
74+ Trace.TraceInformation("VirtialMemorySize: {0:F2}GB", (cominfo.TotalVirtualMemory / 1024f / 1024f / 1024f));
75+ Trace.TraceInformation("FreePhysicalMemorySize: {0:F2}MB", (cominfo.AvailablePhysicalMemory / 1024f / 1024f));
76+ Trace.TraceInformation("FreeVirtualMemorySize: {0:F2}MB", (cominfo.AvailableVirtualMemory / 1024f / 1024f));
77+ //Trace.TraceInformation(cominfo.OSFullName + ", " + cominfo.OSPlatform + ", " + cominfo.OSVersion);
78+
79+ mc = new System.Management.ManagementClass("Win32_PhysicalMemory");
80+ moc = mc.GetInstances();
81+ Trace.TraceInformation("-------------------------");
82+ Trace.TraceInformation("Physical Memory Information:");
83+ foreach (System.Management.ManagementObject mo in moc)
84+ {
85+ Trace.TraceInformation("Capacity: {0:F2}GB", (Convert.ToInt64(mo["Capacity"]) / 1024f / 1024f / 1024f));
86+ }
87+ moc.Dispose();
88+ mc.Dispose();
89+
90+ mc = new System.Management.ManagementClass("Win32_DisplayControllerConfiguration");
91+ moc = mc.GetInstances();
92+ foreach (System.Management.ManagementObject mo in moc)
93+ {
94+ Trace.TraceInformation("-------------------------");
95+ Trace.TraceInformation("Display Adapter Information:");
96+ Trace.TraceInformation("Name: " + mo["Name"]);
97+ Trace.TraceInformation("VideoMode: " + mo["VideoMode"]);
98+ Trace.TraceInformation("HorizontalResolution: " + mo["HorizontalResolution"]);
99+ Trace.TraceInformation("VerticalResolution: " + mo["VerticalResolution"]);
100+ Trace.TraceInformation("RefreshRate: " + mo["RefreshRate"]);
101+ }
102+ moc.Dispose();
103+ mc.Dispose();
104+
105+ mc = new System.Management.ManagementClass("Win32_VideoController");
106+ moc = mc.GetInstances();
107+ foreach (System.Management.ManagementObject mo in moc)
108+ {
109+ Trace.TraceInformation("-------------------------");
110+ Trace.TraceInformation("Video Controller Information:");
111+ Trace.TraceInformation("Description: " + mo["Description"]);
112+ Trace.TraceInformation("AdapterRAM: {0}MB", (Convert.ToInt64(mo["AdapterRAM"]) / 1024f / 1024f));
113+ Trace.TraceInformation("CapabilityDescriptions: " + mo["CapabilityDescriptions"]);
114+ }
115+ moc.Dispose();
116+ mc.Dispose();
117+
118+ mc = new System.Management.ManagementClass("Win32_DesktopMonitor");
119+ moc = mc.GetInstances();
120+ foreach (System.Management.ManagementObject mo in moc)
121+ {
122+ Trace.TraceInformation("-------------------------");
123+ Trace.TraceInformation("Display Information:");
124+ Trace.TraceInformation("Description: " + mo["Description"]);
125+ Trace.TraceInformation("PixelsPerXLogicalInch: " + mo["PixelsPerXLogicalInch"]);
126+ Trace.TraceInformation("PixelsPerYLogicalInch: " + mo["PixelsPerYLogicalInch"]);
127+ Trace.TraceInformation("ScreenWidth: " + mo["ScreenWidth"]);
128+ Trace.TraceInformation("ScreenHeight: " + mo["ScreenHeight"]);
129+ }
130+ moc.Dispose();
131+ mc.Dispose();
132+
133+ mc = new System.Management.ManagementClass("Win32_SoundDevice");
134+ moc = mc.GetInstances();
135+ foreach (System.Management.ManagementObject mo in moc)
136+ {
137+ Trace.TraceInformation("-------------------------");
138+ Trace.TraceInformation("Audio Information:");
139+ //Trace.TraceInformation("Caption: " + mo["Caption"]);
140+ //Trace.TraceInformation("ProductName: " + mo["ProductName"]);
141+ //Trace.TraceInformation("DMABufferSize: " + mo["DMABufferSize"]);
142+
143+ foreach (PropertyData property in mo.Properties)
144+ {
145+ Trace.TraceInformation("{0}:{1}", property.Name, property.Value);
146+ }
147+ }
148+ moc.Dispose();
149+ mc.Dispose();
150+
151+ Trace.TraceInformation("----------------------");
152+ Trace.TraceInformation("DTXMania settings:");
153+ Trace.TraceInformation("VSyncWait: " + CDTXMania.Instance.ConfigIni.bVSyncWait.ToString());
154+ Trace.TraceInformation("Fullscreen: " + CDTXMania.Instance.ConfigIni.bFullScreen.ToString());
155+ Trace.TraceInformation("----------------------");
156+ }
157+ }
158+}
旧リポジトリブラウザで表示