// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The About View Model
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
using System.ComponentModel.Composition;
using Caliburn.Micro;
using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrakeWPF.ViewModels.Interfaces;
///
/// The About View Model
///
[Export(typeof(IAboutViewModel))]
public class AboutViewModel : ViewModelBase, IAboutViewModel
{
///
/// Initializes a new instance of the class.
///
///
/// The window manager.
///
///
/// The user Setting Service.
///
public AboutViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
{
this.Title = "About HandBrake";
}
///
/// Gets Version.
///
public string Version
{
get
{
string nightly = UserSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeVersion).Contains("svn") ? " (SVN / Nightly Build)" : string.Empty;
return string.Format(
"{0} ({1}) {2}",
UserSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeVersion),
UserSettingService.GetUserSetting(ASUserSettingConstants.HandBrakeBuild),
nightly);
}
}
///
/// Close this window.
///
public void Close()
{
this.TryClose();
}
}
}