using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RainmeterStudio.Core;
using RainmeterStudio.Core.Editor;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Editor.ProjectEditor
{
///
/// Project editor factory
///
[PluginExport]
public class ProjectEditorFactory : IDocumentEditorFactory
{
///
/// Creates a new project editor
///
/// The project document
/// Created editor
public IDocumentEditor CreateEditor(IDocument document)
{
return new ProjectEditorUI((ProjectDocument)document);
}
///
/// Checks if this editor can edit documents of given type
///
/// Type
/// True if the project editor can edit that kind of document
public bool CanEdit(Type type)
{
return (type.Equals(typeof(ProjectDocument)));
}
}
}