留言框 [英] MessageBox

查看:52
本文介绍了留言框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何存储和比较消息框结果.

就像我通过消息框提醒用户一样.
根据用户选择确定或取消.我需要继续

但是如何知道所选的用户呢?

How can i store and compare the Message box result.

Like i am alerting the user by Message box.
Based on the user selects ok or cancel. i need to proceed

but how can i know wat the user selected.

推荐答案

if (MessageBox.Show(message, caption, MessageBoxButton.OKCancel) == MessageBoxResult.OK)
{
//Do something
}
else
{
//Do something else
}


这篇关于留言框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆