using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Editor.ProjectEditor
{
///
/// A project document
///
/// Unlike the Project class, this class implements the 'IDocument'
/// interface. This is a proxy class for the actual project.
public class ProjectDocument : IDocument
{
private Reference _reference;
private bool _isDirty = false;
///
/// Gets or sets the reference of the document
///
public Reference Reference
{
get
{
return _reference;
}
set
{
_reference = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("Reference"));
}
}
///
public bool IsDirty
{
get
{
return _isDirty;
}
set
{
_isDirty = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("IsDirty"));
}
}
///
/// Gets the project this project document is linked to
///
public Project Project { get; private set; }
///
/// Event triggered when a property changes value
///
public event PropertyChangedEventHandler PropertyChanged;
///
/// Initializes this project document
///
/// The actual project this document is linked to
public ProjectDocument(Project project)
{
Project = project;
}
}
}