namespace VideoBrowser.ViewModels { using System.Windows.Input; using System.Windows.Media; using VideoBrowser.Common; using VideoBrowser.Controls.CefSharpBrowser.Helpers; using VideoBrowser.Resources; /// /// Defines the . /// public class AboutViewModel { #region Constructors /// /// Initializes a new instance of the class. /// internal AboutViewModel() { this.ApplicationName = AppEnvironment.LongName; this.ProjectUrlClickedCommand = new RelayCommand(this.OnProjectUrlClicked, nameof(this.ProjectUrlClickedCommand)); this.LinkedInCommand = new RelayCommand(this.OnLinkedIn, nameof(this.TwitterCommand)); this.TwitterCommand = new RelayCommand(this.OnTwitter, nameof(this.TwitterCommand)); } #endregion Constructors #region Properties /// /// Gets the AppIcon. /// public ImageSource AppIcon { get; } = Helpers.ImageHelper.ToImageSource(Properties.Resources.Icon); /// /// Gets the ApplicationName. /// public string ApplicationName { get; } /// /// Gets the Author. /// public string Author => $"By {AppEnvironment.Author}"; /// /// Gets the Icon. /// public Geometry Icon => Icons.Info; /// /// Gets the LinkedInCommand. /// public ICommand LinkedInCommand { get; } /// /// Gets the ProjectUrl. /// public string ProjectUrl => AppEnvironment.ProjectUrl; /// /// Gets the ProjectUrlClickedCommand. /// public ICommand ProjectUrlClickedCommand { get; } /// /// Gets the TwitterCommand. /// public ICommand TwitterCommand { get; } /// /// Gets the Version. /// public string Version => $"Version {AppEnvironment.Version}"; #endregion Properties #region Methods /// /// The OnLinkedIn. /// /// The obj. private void OnLinkedIn(object obj) { ProcessHelper.OpenUrl(@"https://www.linkedin.com/in/ynurcahyo/"); } /// /// The OnProjectUrlClicked. /// /// The obj. private void OnProjectUrlClicked(object obj) { ProcessHelper.OpenUrl(this.ProjectUrl); } /// /// The OnTwitter. /// /// The obj. private void OnTwitter(object obj) { ProcessHelper.OpenUrl(@"https://twitter.com/txtnurcahyo"); } #endregion Methods } }