Mercurial > silverbladetech
view Chronosv2/source/ViewModel/AboutViewModel.cs @ 15:060f02cd4591
Initial commit, pre airport work
author | stevenh7776 stevenhollidge@hotmail.com |
---|---|
date | Mon, 12 Mar 2012 23:05:21 +0800 |
parents | 741981715d94 |
children |
line wrap: on
line source
using System; using System.Deployment.Application; using System.Reflection; using Chronos.Presentation.Core.VirtualDesktops; using Chronos.Presentation.ViewModel; namespace Chronos.ViewModel { /// <summary> /// About window viewmodel /// </summary> public sealed class AboutViewModel : NavigationViewModel { #region · Properties · /// <summary> /// Gets the application version. /// </summary> /// <value>The application version.</value> public string Version { get { if (ApplicationDeployment.IsNetworkDeployed) { return ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); } else { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } } } /// <summary> /// Gets the application product id. /// </summary> /// <value>The application product id.</value> public string ProductId { get { return Guid.NewGuid().ToString(); } } #endregion #region · Constructors · /// <summary> /// Initializes a new instance of the <see cref="AboutViewModel"/> class. /// </summary> public AboutViewModel() : base() { } #endregion #region · Overriden Methods · public override bool CanClose() { return true; } public override void Close() { this.GetService<IVirtualDesktopManager>().CloseDialog(); } #endregion } }