2014-07-29 20:35:59 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2014-08-12 13:33:13 +00:00
|
|
|
|
using RainmeterStudio.Core;
|
2014-09-12 10:26:52 +00:00
|
|
|
|
using RainmeterStudio.Core.Editor;
|
2014-08-12 13:33:13 +00:00
|
|
|
|
using RainmeterStudio.Core.Model;
|
2014-07-29 20:35:59 +00:00
|
|
|
|
|
2014-08-12 13:33:13 +00:00
|
|
|
|
namespace RainmeterStudio.TextEditorPlugin
|
2014-07-29 20:35:59 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A blank text document template
|
|
|
|
|
/// </summary>
|
2014-08-12 13:33:13 +00:00
|
|
|
|
[PluginExport]
|
2014-08-15 21:39:31 +00:00
|
|
|
|
public class TextDocumentTemplate : IDocumentTemplate
|
2014-07-29 20:35:59 +00:00
|
|
|
|
{
|
2014-08-15 21:39:31 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the document template name
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string Name
|
2014-07-29 20:35:59 +00:00
|
|
|
|
{
|
2014-08-15 21:39:31 +00:00
|
|
|
|
get { return "Text"; }
|
2014-07-29 20:35:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-08-15 21:39:31 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the default extension of this template
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string DefaultExtension
|
|
|
|
|
{
|
|
|
|
|
get { return "txt"; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets or sets the properties of this template
|
|
|
|
|
/// </summary>
|
|
|
|
|
public IEnumerable<Property> Properties
|
|
|
|
|
{
|
|
|
|
|
get { return Enumerable.Empty<Property>(); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a document using this template
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>Created document.</returns>
|
|
|
|
|
public IDocument CreateDocument()
|
2014-07-29 20:35:59 +00:00
|
|
|
|
{
|
|
|
|
|
return new TextDocument();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|