using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RainmeterStudio.Core.Documents;
namespace RainmeterStudio.Core.Model.Events
{
public abstract class DocumentEventArgsBase : EventArgs
{
///
/// Gets the newly created document editor
///
public IDocumentEditor Editor { get; private set; }
///
/// Gets the opened document
///
public IDocument Document { get { return Editor.AttachedDocument; } }
///
/// Initializes the DocumentOpenedEventArgs
///
/// The document editor
public DocumentEventArgsBase(IDocumentEditor editor)
{
Editor = editor;
}
}
///
/// Event arguments for the document opened event
///
public class DocumentOpenedEventArgs : DocumentEventArgsBase
{
///
/// Initializes the DocumentOpenedEventArgs
///
/// The document editor
public DocumentOpenedEventArgs(IDocumentEditor editor)
: base(editor)
{
}
}
///
/// Event arguments for the document closed event
///
public class DocumentClosedEventArgs : DocumentEventArgsBase
{
///
/// Initializes the DocumentClosedEventArgs
///
/// The document editor
public DocumentClosedEventArgs(IDocumentEditor editor)
: base(editor)
{
}
}
}