mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
61 lines
1.7 KiB
C#
61 lines
1.7 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// Gets the newly created document editor
|
|
/// </summary>
|
|
public IDocumentEditor Editor { get; private set; }
|
|
|
|
/// <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)
|
|
{
|
|
Editor = editor;
|
|
}
|
|
}
|
|
|
|
/// <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)
|
|
{
|
|
}
|
|
}
|
|
}
|