2014-07-26 07:12:56 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2014-08-12 13:33:13 +00:00
|
|
|
|
using RainmeterStudio.Core.Documents;
|
2014-07-26 07:12:56 +00:00
|
|
|
|
|
2014-08-12 13:33:13 +00:00
|
|
|
|
namespace RainmeterStudio.Core.Model.Events
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
2014-07-29 16:42:52 +00:00
|
|
|
|
public abstract class DocumentEventArgsBase : EventArgs
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
2014-07-29 16:42:52 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the newly created document editor
|
|
|
|
|
/// </summary>
|
2014-07-26 07:12:56 +00:00
|
|
|
|
public IDocumentEditor Editor { get; private set; }
|
|
|
|
|
|
2014-07-29 16:42:52 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the opened document
|
|
|
|
|
/// </summary>
|
|
|
|
|
public IDocument Document { get { return Editor.AttachedDocument; } }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes the DocumentOpenedEventArgs
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="editor">The document editor</param>
|
|
|
|
|
public DocumentEventArgsBase(IDocumentEditor editor)
|
2014-07-26 07:12:56 +00:00
|
|
|
|
{
|
|
|
|
|
Editor = editor;
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-07-29 16:42:52 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event arguments for the document opened event
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DocumentOpenedEventArgs : DocumentEventArgsBase
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes the DocumentOpenedEventArgs
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="editor">The document editor</param>
|
|
|
|
|
public DocumentOpenedEventArgs(IDocumentEditor editor)
|
|
|
|
|
: base(editor)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Event arguments for the document closed event
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DocumentClosedEventArgs : DocumentEventArgsBase
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes the DocumentClosedEventArgs
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="editor">The document editor</param>
|
|
|
|
|
public DocumentClosedEventArgs(IDocumentEditor editor)
|
|
|
|
|
: base(editor)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-07-26 07:12:56 +00:00
|
|
|
|
}
|