2014-08-12 13:33:13 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using RainmeterStudio.Core;
|
|
|
|
|
using RainmeterStudio.Core.Documents;
|
|
|
|
|
using RainmeterStudio.Core.Model;
|
|
|
|
|
|
|
|
|
|
namespace RainmeterStudio.SkinDesignerPlugin
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Skin designer factory
|
|
|
|
|
/// </summary>
|
|
|
|
|
[PluginExport]
|
|
|
|
|
public class SkinDesignerFactory : IDocumentEditorFactory
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Creates a new editor object
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="document">Document to be edited by the editor</param>
|
|
|
|
|
/// <returns>A new document editor</returns>
|
|
|
|
|
public IDocumentEditor CreateEditor(IDocument document)
|
|
|
|
|
{
|
2014-08-14 07:06:20 +00:00
|
|
|
|
return new SkinDesigner((SkinDocument)document);
|
2014-08-12 13:33:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Tests if this editor can edit this document type
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="type">Document type</param>
|
|
|
|
|
/// <returns>True if the editor can edit the document type</returns>
|
|
|
|
|
public bool CanEdit(Type type)
|
|
|
|
|
{
|
2014-08-14 07:06:20 +00:00
|
|
|
|
return type.Equals(typeof(SkinDocument));
|
2014-08-12 13:33:13 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|