DotNet 4.8.1 build of DotNetBar
This commit is contained in:
59
PROMS/DotNetBar Source Code/Events/EventSourceArgs.cs
Normal file
59
PROMS/DotNetBar Source Code/Events/EventSourceArgs.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace DevComponents.DotNetBar.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents event arguments that provide information on source of action.
|
||||
/// </summary>
|
||||
public class EventSourceArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the source of the event.
|
||||
/// </summary>
|
||||
public readonly eEventSource Source = eEventSource.Code;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the EventSourceArgs class.
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
public EventSourceArgs(eEventSource source)
|
||||
{
|
||||
Source = source;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delegate for the CancelableEventSource event.
|
||||
/// </summary>
|
||||
public delegate void CancelableEventSourceHandler(object sender, CancelableEventSourceArgs e);
|
||||
/// <summary>
|
||||
/// Represents event arguments that provide information on source of action and allow canceling of action.
|
||||
/// </summary>
|
||||
public class CancelableEventSourceArgs : EventSourceArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets whether event action will be canceled.
|
||||
/// </summary>
|
||||
public bool Cancel = false;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the EventSourceArgs class.
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
public CancelableEventSourceArgs(eEventSource source)
|
||||
: base(source)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the CancelableEventSourceArgs class.
|
||||
/// </summary>
|
||||
/// <param name="cancel"></param>
|
||||
public CancelableEventSourceArgs(eEventSource source, bool cancel)
|
||||
: base(source)
|
||||
{
|
||||
Cancel = cancel;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user