using System.Windows.Media;
using RainmeterStudio.Business;
using RainmeterStudio.Core.Documents;
namespace RainmeterStudio.UI.ViewModel
{
public class DocumentTemplateViewModel
{
///
/// Gets the document template
///
public DocumentTemplate Template { get; private set; }
///
/// Gets the document template name
///
public string Name { get { return Template.Name; } }
///
/// Gets or sets the icon of this document template
///
public ImageSource Icon
{
get
{
return ResourceProvider.GetImage("Template_" + Name + "_Icon");
}
}
///
/// Gets or sets the display text
///
public string DisplayText
{
get
{
return ResourceProvider.GetString("Template_" + Name + "_DisplayText");
}
}
///
/// Gets or sets the description of this document template
///
public string Description
{
get
{
return ResourceProvider.GetString("Template_" + Name + "_Description");
}
}
///
/// Initializes the document template view model
///
/// The document template
public DocumentTemplateViewModel(DocumentTemplate template)
{
this.Template = template;
}
}
}