using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.ComponentModel;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.TextEditorPlugin
{
public class TextDocument : IDocument
{
private Reference _reference;
private bool _isDirty;
///
/// Gets or sets the text associated with this document
///
public string Text
{
get; set;
}
///
/// Gets or sets the reference of this document
///
public Reference Reference
{
get
{
return _reference;
}
set
{
_reference = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("Reference"));
}
}
///
/// Gets a property indicating if this file was modified and not saved
///
public bool IsDirty
{
get
{
return _isDirty;
}
set
{
_isDirty = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("IsDirty"));
}
}
///
/// Triggered when the value of a property changes
///
public event PropertyChangedEventHandler PropertyChanged;
///
/// Initializes the text document
///
public TextDocument()
{
Text = String.Empty;
}
}
}