ant-design-blazor/components/modal/config/ModalClosingEventArgs.cs
zxyao 31aac9f914 refactor: unified use of FeedbackComponent for modal comfirm and drawer (#1263)
* refactor: support to use the same template for confirm and modal

* refactor: support to use the same template for drawer

* refactor: separate interface IOkCancelRef

* chore: modify EventUtil class summary

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-04-04 15:40:54 +08:00

35 lines
938 B
C#

using Microsoft.AspNetCore.Components.Web;
namespace AntDesign
{
public class ModalClosingEventArgs
{
public ModalClosingEventArgs() { }
public ModalClosingEventArgs(MouseEventArgs mouseEvent, bool cancel)
{
Cancel = cancel;
MouseEvent = mouseEvent;
}
public MouseEventArgs MouseEvent { get; set; }
/// <summary>
/// 获取或设置一个值,该值指示是否应取消事件。
/// 返回结果: true 如果应取消事件;否则为 false。
/// Gets or sets a value indicating whether the event should be cancelled.
/// Return result: true if the event should be cancelled; otherwise false.
/// </summary>
public bool Cancel { get; set; }
/// <summary>
/// Reject to close
/// </summary>
public void Reject()
{
Cancel = true;
}
}
}