using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Media; using RainmeterStudio.Business; using RainmeterStudio.Core.Model; namespace RainmeterStudio.UI.ViewModel { /// /// View model for project templates /// public class ProjectTemplateViewModel { /// /// Gets the project template /// public IProjectTemplate Template { get; private set; } /// /// Gets the name of the template /// public string Name { get { return Template.Name; } } /// /// Gets the display text /// public string DisplayText { get { return ResourceProvider.GetString("ProjectTemplate_" + Name + "_DisplayText"); } } /// /// Gets the description /// public string Description { get { return ResourceProvider.GetString("ProjectTemplate_" + Name + "_Description"); } } /// /// Gets the icon /// public ImageSource Icon { get { return ResourceProvider.GetImage("ProjectTemplate_" + Name + "_Icon"); } } /// /// Initializes the project template view model /// /// A project template public ProjectTemplateViewModel(IProjectTemplate template) { Template = template; } } }