示例#1
0
 /// <summary>
 /// 显示指定的消息
 /// </summary>
 /// <param name="text"></param>
 /// <param name="title"></param>
 public void showMessage(string text, string title = "提示")
 {
     mUCChorme.UICall(() =>
     {
         MSMessageBox.ShowModal(MSMessageBox.MSMessageBoxButton.OK, title, text);
     });
 }
示例#2
0
        /// <summary>
        /// 显示对话框
        /// </summary>
        /// <returns></returns>
        public static MessageResult ShowModal(MSMessageBoxButton button, string title, string content)
        {
            var win = new MSMessageBox();

            win.Init(button, title, content);
            win.ShowDialog();
            return(win.result);
        }
示例#3
0
 /// <summary>
 /// 显示警告对话框
 /// </summary>
 /// <param name="window"></param>
 /// <param name="text"></param>
 /// <returns></returns>
 public static MSMessageBox.MessageResult ShowMessageExclamation(this ContentControl window, string text)
 {
     return(MSMessageBox.ShowModal(MSMessageBox.MSMessageBoxButton.OK, "警告", text));
 }
示例#4
0
 /// <summary>
 /// 显示错误信息对话框
 /// </summary>
 /// <param name="window"></param>
 /// <param name="ex">错误</param>
 /// <returns></returns>
 public static MSMessageBox.MessageResult ShowMessageError(this ContentControl window, Exception ex)
 {
     return(MSMessageBox.ShowModal(MSMessageBox.MSMessageBoxButton.OK, "错误", Helpers.ExceptionHelper.GetMessage(ex)));
 }