using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using RainmeterStudio.Core.Editor;
using RainmeterStudio.Core.Model;
namespace RainmeterStudio.Editor.ProjectEditor
{
///
/// Interaction logic for ProjectEditorUI.xaml
///
public partial class ProjectEditorUI : UserControl, IDocumentEditor
{
///
/// Gets the attached project document being edited
///
public ProjectDocument Document { get; private set; }
///
/// Gets the attached document
///
public IDocument AttachedDocument
{
get { return Document; }
}
///
/// Gets the UI element to be displayed in the document window
///
public UIElement EditorUI
{
get { return this; }
}
///
/// Initializes this project editor UI
///
///
public ProjectEditorUI(ProjectDocument document)
{
InitializeComponent();
Document = document;
Document.Project.PropertyChanged += Project_PropertyChanged;
DataContext = Document.Project;
}
private void Project_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
Document.IsDirty = true;
}
}
}