2014-08-15 12:31:33 +00:00
|
|
|
|
using System.Windows.Media;
|
|
|
|
|
using RainmeterStudio.Business;
|
2014-08-12 13:33:13 +00:00
|
|
|
|
using RainmeterStudio.Core.Documents;
|
2014-07-29 16:42:52 +00:00
|
|
|
|
|
|
|
|
|
namespace RainmeterStudio.UI.ViewModel
|
|
|
|
|
{
|
|
|
|
|
public class DocumentTemplateViewModel
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the document template
|
|
|
|
|
/// </summary>
|
|
|
|
|
public DocumentTemplate Template { get; private set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the document template name
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Name { get { return Template.Name; } }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the icon of this document template
|
|
|
|
|
/// </summary>
|
2014-08-15 12:31:33 +00:00
|
|
|
|
public ImageSource Icon
|
2014-07-29 16:42:52 +00:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2014-08-15 12:31:33 +00:00
|
|
|
|
return ResourceProvider.GetImage("Template_" + Name + "_Icon");
|
2014-07-29 16:42:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the display text
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string DisplayText
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2014-08-15 12:31:33 +00:00
|
|
|
|
return ResourceProvider.GetString("Template_" + Name + "_DisplayText");
|
2014-07-29 16:42:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the description of this document template
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Description
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2014-08-15 12:31:33 +00:00
|
|
|
|
return ResourceProvider.GetString("Template_" + Name + "_Description");
|
2014-07-29 16:42:52 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes the document template view model
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="template">The document template</param>
|
|
|
|
|
public DocumentTemplateViewModel(DocumentTemplate template)
|
|
|
|
|
{
|
|
|
|
|
this.Template = template;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|