12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- /* ==============================================================================
- * 功能描述:MessageShow
- * 创 建 者:SAGACLOUD
- * 创建日期:2017/8/25 9:29:57
- * ==============================================================================*/
- using System;
- using System.Collections.Generic;
- using System.Windows.Forms;
- namespace SAGA.DotNetUtils.Others
- {
- /// <summary>
- /// MessageShow
- /// </summary>
- public class MessageShowBase
- {
- public static bool Confirm(string strText)
- {
- return (MessageBox.Show(strText, "上格云技术", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK);
- }
- public static bool ConfirmYesNo(string strText)
- {
- return (MessageBox.Show(strText, "上格云技术", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
- }
- public static void Error(string strText)
- {
- MessageBox.Show(strText, "上格云技术", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- }
- public static void Infomation(List<string> listText)
- {
- if ((listText != null) && (listText.Count != 0))
- {
- string strText = "";
- foreach (string str2 in listText)
- {
- strText = strText + str2 + Environment.NewLine;
- }
- Infomation(strText);
- }
- }
- public static void Infomation(string strText)
- {
- MessageBox.Show(strText, "上格云技术", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
- }
- public static bool Question(string strText)
- {
- return (MessageBox.Show(strText, "上格云技术", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes);
- }
- public static DialogResult Question2(string strText)
- {
- return MessageBox.Show(strText, "上格云技术", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
- }
-
- public static bool Retry(string strText)
- {
- return (MessageBox.Show(strText, "上格云技术", MessageBoxButtons.RetryCancel, MessageBoxIcon.Question) == DialogResult.Retry);
- }
- public static void Show(Exception ex)
- {
- MessageBox.Show(ex.Message + ex.StackTrace);
- }
-
- }
- }
|