CTT/Unity/Assets/ModelView/Event/ShowMessageBoxEvent.cs

19 lines
530 B
C#
Raw Normal View History

2021-04-08 20:09:59 +08:00
using ET.EventType;
using System;
using System.Collections.Generic;
namespace ET
{
public class ShowMessageBoxEvent : AEvent<ShowMessageBox>
{
public override async ETTask Run(ShowMessageBox args)
{
string ok = args.ok == null ? "确定" :args.ok;
string no = args.no == null ? "取消" :args.no;
2021-04-11 19:50:39 +08:00
MessageBox box = MessageBox.Show(args.title, args.content, ok, no);
2021-04-08 20:09:59 +08:00
box.onComplete += args.action;
await ETTask.CompletedTask;
}
}
}