rainmeter-studio/RainmeterStudio.TextEditor/TextEditorFactory.cs

26 lines
624 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using RainmeterStudio.Core;
2014-09-12 10:26:52 +00:00
using RainmeterStudio.Core.Editor;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.TextEditorPlugin
{
[PluginExport]
public class TextEditorFactory : IDocumentEditorFactory
{
public IDocumentEditor CreateEditor(IDocument document)
{
return new TextEditor((TextDocument)document);
}
public bool CanEdit(Type type)
{
return type.Equals(typeof(TextDocument));
}
}
}