summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/ViewModels
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/HandBrakeWPF/ViewModels
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/HandBrakeWPF/ViewModels')
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs
index cb9cef3e7..f456357b7 100644
--- a/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/AboutViewModel.cs
@@ -9,6 +9,11 @@
namespace HandBrakeWPF.ViewModels
{
+ using System;
+ using System.IO;
+ using System.Text;
+ using System.Windows.Forms;
+
using HandBrake.ApplicationServices.Utilities;
using HandBrakeWPF.ViewModels.Interfaces;
@@ -19,11 +24,37 @@ namespace HandBrakeWPF.ViewModels
public class AboutViewModel : ViewModelBase, IAboutViewModel
{
/// <summary>
+ /// The system info.
+ /// </summary>
+ private string systemInfo;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="AboutViewModel"/> class.
/// </summary>
public AboutViewModel()
{
this.Title = "About HandBrake";
+
+ StringBuilder builder = new StringBuilder();
+ foreach (var item in SystemInfo.GetGPUInfo)
+ {
+ builder.AppendLine(item);
+ }
+
+ StringBuilder system = new StringBuilder();
+ system.AppendLine(string.Format("Enviroment: {0}", Environment.NewLine));
+ system.AppendLine(string.Format("Operating System: {0}", Environment.OSVersion));
+ system.AppendLine(string.Format("CPU: {0}", SystemInfo.GetCpuCount));
+ system.AppendLine(string.Format("Ram: {0} MB{1}", SystemInfo.TotalPhysicalMemory, Environment.NewLine));
+
+ system.AppendLine(string.Format("{0}GPU Information:{0}{0}{1}", Environment.NewLine, builder));
+
+ system.AppendLine(string.Format("{0}System Paths:{0}", Environment.NewLine));
+ system.AppendLine(string.Format("Temp Dir: {0}", Path.GetTempPath()));
+ system.AppendLine(string.Format("Install Dir: {0}", Application.StartupPath));
+ system.AppendLine(string.Format("Data Dir: {0}\n", Application.UserAppDataPath));
+
+ SystemInformation = system.ToString();
}
/// <summary>
@@ -38,6 +69,22 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
+ /// Gets or sets the system info.
+ /// </summary>
+ public string SystemInformation
+ {
+ get
+ {
+ return this.systemInfo;
+ }
+ set
+ {
+ this.systemInfo = value;
+ this.NotifyOfPropertyChange("SystemInfo");
+ }
+ }
+
+ /// <summary>
/// Close this window.
/// </summary>
public void Close()