// -----------------------------------------------------------------------
//
// TODO: Update copyright text.
//
// -----------------------------------------------------------------------
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Reflection;
using Caliburn.Micro;
namespace Pithos.Client.WPF.Shell
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
///
/// TODO: Update summary.
///
[Export(typeof(AboutViewModel))]
public class AboutViewModel:Screen
{
public string Version { get; set; }
public DateTime Released { get; set; }
public Uri SupportPage { get; set; }
public string Bits { get; set; }
public AboutViewModel()
{
Assembly assembly = Assembly.GetExecutingAssembly();
var attributes=assembly.GetCustomAttributes(false);
var versionAtt = attributes.OfType().First();
Released = DateTime.Parse(versionAtt.InformationalVersion);
var fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);
Version = fileVersion.FileVersion;
Bits = Environment.Is64BitProcess ? "64 bit" : "32 bit";
}
public void CloseAbout()
{
this.TryClose();
}
}
}