1.弹出消息框
this.View.ShowMessage("你好");
2.错误信息,对话框
this.View.ShowErrMessage("严重错误");
3.询问式,提示信息框,是否
this.View.ShowMessage("错误提示,是否继续?", //提示信息:是、否 MessageBoxOptions.YesNo, new Action<MessageBoxResult>((result) => { if (result == MessageBoxResult.Yes) { //如果选择的是,给备注赋值,是 this.View.Model.SetValue("FNote", "您选择--是"); } else if (result == MessageBoxResult.No) { //如果选择的否,给备注赋值,否 this.View.Model.SetValue("FNote", "您选择--否"); } })); //刷新一下备注 this.View.UpdateView("FNote");
4.询问式提示信息框
//警告 this.View.ShowWarnningMessage ("不能对其操作,请确认", action: (result) => { //关闭页面 this.View.Close(); } );
5.处理结果信息提示框
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);