1.普通弹框
this.View.ShowMessage("操作成功")
2.二次提示 提示是否继续,或者取消
this.View.ShowMessage("错误提示,是否继续?",MessageBoxOptions.YesNoCancel,
new Action<MessageBoxResult>((result) => //通过result接收值
{
if (result == MessageBoxResult.Yes) {
//点击是
}
else if (result == MessageBoxResult.No)
{
//点击否
}else if (result == MessageBoxResult.Cancel) {
//取消
}})
);
3.警告框
this.View.ShowWarnningMessage("有异常数据")
4.列表提示框:多选针对多个处理结果 一次性提示
IOperationResult opResult = new OperationResult();
opResult.OperateResult.Add(new OperateResult(){
Name = "信息提示",
Message = "成功",
SuccessStatus = true});
opResult.OperateResult.Add(new OperateResult(){
Name = "信息提示",
Message = "失败",
SuccessStatus = false});
this.View.ShowOperateResult(opResult.OperateResult);
5.抛出异常
throw new KDException("异常信息")
6.错误提示框
this.View.ShowErrMessage("操作错误!");