2014-07-26 07:12:56 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using RainmeterStudio.Business;
|
|
|
|
|
using RainmeterStudio.Model;
|
|
|
|
|
|
|
|
|
|
namespace RainmeterStudio.Documents.Text
|
|
|
|
|
{
|
2014-07-29 20:35:59 +00:00
|
|
|
|
[AutoRegister]
|
|
|
|
|
public class TextEditorFactory : IDocumentEditorFactory
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
|
|
|
|
public IDocumentEditor CreateEditor(IDocument document)
|
|
|
|
|
{
|
2014-07-29 20:35:59 +00:00
|
|
|
|
return new TextEditor((TextDocument)document);
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-07-29 20:35:59 +00:00
|
|
|
|
public bool CanEdit(Type type)
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
2014-07-29 20:35:59 +00:00
|
|
|
|
return type.Equals(typeof(TextDocument));
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|
2014-07-29 20:35:59 +00:00
|
|
|
|
}
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|