using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using RainmeterStudio.Model;
using System.ComponentModel;
namespace RainmeterStudio.Documents.Text
{
public class TextDocument : IDocument
{
private Reference _reference;
private bool _isDirty;
///
/// Gets or sets the text associated with this document
///
public List Lines
{
get; private 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()
{
Lines = new List();
}
}
}