summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-09-07 16:54:52 +0000
committersr55 <[email protected]>2013-09-07 16:54:52 +0000
commit0c5a1f22cce32136e76c471c9dd6716e20c81f91 (patch)
tree53fe3f7cfafe32c781239da186649ab4c01597e3 /win/CS/HandBrake.ApplicationServices
parentfc297e6f21f204621f110b6f156031cf6dc626a4 (diff)
WinGui: Add System Information to the About Window and Log header.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5775 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj1
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs9
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs33
3 files changed, 42 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
index d884131d0..bb85a5071 100644
--- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
+++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
@@ -66,6 +66,7 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
+ <Reference Include="System.Management" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Windows.Forms" />
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
index 42f075508..f316c85c6 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs
@@ -96,10 +96,17 @@ namespace HandBrake.ApplicationServices.Utilities
{
var logHeader = new StringBuilder();
+ StringBuilder gpuBuilder = new StringBuilder();
+ foreach (var item in SystemInfo.GetGPUInfo)
+ {
+ gpuBuilder.AppendLine(string.Format(" {0}", item));
+ }
+
logHeader.AppendLine(String.Format("HandBrake {0} - {1}", VersionHelper.GetVersion(), VersionHelper.GetPlatformBitnessVersion()));
logHeader.AppendLine(String.Format("OS: {0}", Environment.OSVersion));
logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount));
- logHeader.Append(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory));
+ logHeader.AppendLine(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory));
+ logHeader.AppendLine(String.Format("GPU Information:{0}{1}", Environment.NewLine, gpuBuilder.ToString().TrimEnd()));
logHeader.AppendLine(String.Format("Screen: {0}x{1}", SystemInfo.ScreenBounds.Bounds.Width, SystemInfo.ScreenBounds.Bounds.Height));
logHeader.AppendLine(String.Format("Temp Dir: {0}", Path.GetTempPath()));
logHeader.AppendLine(String.Format("Install Dir: {0}", Application.StartupPath));
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
index 41af30f5e..6eb669114 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/SystemInfo.cs
@@ -10,7 +10,11 @@
namespace HandBrake.ApplicationServices.Utilities
{
using System;
+ using System.Collections.Generic;
+ using System.Globalization;
+ using System.Management;
using System.Text.RegularExpressions;
+ using System.Windows.Documents;
using System.Windows.Forms;
using HandBrake.Interop.HbLib;
@@ -109,5 +113,34 @@ namespace HandBrake.ApplicationServices.Utilities
return false;
}
}
+
+ /// <summary>
+ /// Gets the get gpu driver version.
+ /// </summary>
+ public static List<string> GetGPUInfo
+ {
+ get
+ {
+ List<string> gpuInfo = new List<string>();
+ ManagementObjectSearcher searcher = new ManagementObjectSearcher(
+ "select * from " + "Win32_VideoController");
+ foreach (ManagementObject share in searcher.Get())
+ {
+ string gpu = string.Empty, version = string.Empty;
+
+ foreach (PropertyData PC in share.Properties)
+ {
+ if (PC.Name.Equals("DriverVersion")) version = PC.Value.ToString();
+
+
+ if (PC.Name.Equals("Name"))
+ gpu = PC.Value.ToString();
+ }
+
+ gpuInfo.Add(string.Format("{0} - {1}", gpu, version));
+ }
+ return gpuInfo;
+ }
+ }
}
} \ No newline at end of file