JD2022-TU1/main/tools/framework/JD.Sequencers/Tools/ToolStartingEventArgs.cs

37 lines
No EOL
1,022 B
C#

using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace JD.Sequencers.Tools
{
public class ToolStartingEventArgs : CancelEventArgs
{
private readonly MouseButtons m_mouseButtons;
private readonly Point m_location;
public ToolStartingEventArgs(MouseButtons mouseButtons, int clicks, int x, int y, int delta)
: this(new MouseEventArgs(mouseButtons, clicks, x, y, delta))
{ }
public ToolStartingEventArgs(MouseEventArgs eventArgs)
{
m_mouseButtons = eventArgs.Button;
m_location = eventArgs.Location;
}
/// <summary>
/// When set to true, user will have to redo its click to restart a tool operation.
/// </summary>
public bool CancelEntireEvent { get; set; }
public MouseButtons Button
{
get { return m_mouseButtons; }
}
public Point Location
{
get { return m_location; }
}
}
}