/// </summary>\r
public class AboutViewModel : ViewModelBase, IAboutViewModel\r
{\r
- /// <summary>\r
- /// The system info.\r
- /// </summary>\r
- private string systemInfo;\r
-\r
/// <summary>\r
/// Initializes a new instance of the <see cref="AboutViewModel"/> class.\r
/// </summary>\r
public AboutViewModel()\r
{\r
this.Title = "About HandBrake";\r
-\r
- StringBuilder builder = new StringBuilder();\r
- foreach (var item in SystemInfo.GetGPUInfo)\r
- {\r
- builder.AppendLine(item);\r
- }\r
-\r
- StringBuilder system = new StringBuilder();\r
- system.AppendLine(string.Format("Enviroment: {0}", Environment.NewLine));\r
- system.AppendLine(string.Format("Operating System: {0}", Environment.OSVersion));\r
- system.AppendLine(string.Format("CPU: {0}", SystemInfo.GetCpuCount));\r
- system.AppendLine(string.Format("Ram: {0} MB{1}", SystemInfo.TotalPhysicalMemory, Environment.NewLine));\r
-\r
- system.AppendLine(string.Format("{0}GPU Information:{0}{0}{1}", Environment.NewLine, builder));\r
-\r
- system.AppendLine(string.Format("{0}System Paths:{0}", Environment.NewLine));\r
- system.AppendLine(string.Format("Temp Dir: {0}", Path.GetTempPath()));\r
- system.AppendLine(string.Format("Install Dir: {0}", Application.StartupPath));\r
- system.AppendLine(string.Format("Data Dir: {0}\n", Application.UserAppDataPath));\r
-\r
- SystemInformation = system.ToString();\r
}\r
\r
/// <summary>\r
}\r
}\r
\r
- /// <summary>\r
- /// Gets or sets the system info.\r
- /// </summary>\r
- public string SystemInformation\r
- {\r
- get\r
- {\r
- return this.systemInfo;\r
- }\r
- set\r
- {\r
- this.systemInfo = value;\r
- this.NotifyOfPropertyChange("SystemInfo");\r
- }\r
- }\r
-\r
/// <summary>\r
/// Close this window.\r
/// </summary>\r
<RowDefinition Height="Auto" />\r
<RowDefinition Height="Auto" />\r
<RowDefinition Height="*" />\r
- <RowDefinition Height="Auto" />\r
- <RowDefinition Height="*" />\r
</Grid.RowDefinitions>\r
\r
<StackPanel Grid.Row="0"\r
<TextBox Text="{x:Static Properties:Resources.About_GPL}" Grid.Row="2" Margin="10,0,10,10" HorizontalAlignment="Stretch"\r
VerticalAlignment="Stretch" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />\r
\r
- <TextBlock Grid.Row="3" Margin="5,10,0,5" Text="System Information: " />\r
-\r
- <TextBox Text="{Binding SystemInformation}" Grid.Row="4" Margin="10,0,10,10" HorizontalAlignment="Stretch"\r
- VerticalAlignment="Stretch" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" />\r
-\r
-\r
</Grid>\r
</Grid>\r
\r