1 // -----------------------------------------------------------------------
2 // <copyright file="AboutViewModel.cs" company="Microsoft">
3 // TODO: Update copyright text.
5 // -----------------------------------------------------------------------
7 using System.ComponentModel.Composition;
8 using System.Diagnostics;
9 using System.Reflection;
12 namespace Pithos.Client.WPF.Shell
15 using System.Collections.Generic;
20 /// TODO: Update summary.
22 [Export(typeof(AboutViewModel))]
23 public class AboutViewModel:Screen
25 public string Version { get; set; }
27 public DateTime Released { get; set; }
29 public Uri SupportPage { get; set; }
31 public string Bits { get; set; }
33 public AboutViewModel()
35 Assembly assembly = Assembly.GetExecutingAssembly();
37 var attributes=assembly.GetCustomAttributes(false);
38 var versionAtt = attributes.OfType<AssemblyInformationalVersionAttribute>().First();
39 Released = DateTime.Parse(versionAtt.InformationalVersion);
41 var fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);
42 Version = fileVersion.FileVersion;
44 Bits = Environment.Is64BitProcess ? "64 bit" : "32 bit";