using System.Windows.Media;
using RainmeterStudio.Business;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.UI.ViewModel
{
///
/// View model for document templates
///
public class DocumentTemplateViewModel
{
///
/// Gets the document template
///
public IDocumentTemplate 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("DocumentTemplate_" + Name + "_Icon");
}
}
///
/// Gets or sets the display text
///
public string DisplayText
{
get
{
return ResourceProvider.GetString("DocumentTemplate_" + Name + "_DisplayText");
}
}
///
/// Gets or sets the description of this document template
///
public string Description
{
get
{
return ResourceProvider.GetString("DocumentTemplate_" + Name + "_Description");
}
}
///
/// Initializes the document template view model
///
/// The document template
public DocumentTemplateViewModel(IDocumentTemplate template)
{
this.Template = template;
}
}
}