Esempio n. 1
0
 /// <summary>
 /// 弹出询问消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">消息标题</param>
 /// <param name="messageBoxButtons">显示按钮</param>
 /// <param name="messageBoxIcon">显示图标</param>
 /// <param name="button">默认按钮</param>
 /// <returns>DialogResult</returns>
 public static DialogResult Question(string message, string caption, MessageBoxButtons messageBoxButtons, MessageBoxIcon messageBoxIcon, MessageBoxDefaultButton button)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         return(XtraMessageBox.Show(message, caption, messageBoxButtons, messageBoxIcon, button));
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">消息标题</param>
 /// <param name="messageBoxIcon">提醒图标</param>
 public static void Message(string message, string caption, MessageBoxIcon messageBoxIcon)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, caption, System.Windows.Forms.MessageBoxButtons.OK, messageBoxIcon);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 3
0
 /// <summary>
 /// 弹出消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 public static void Information(string message)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, "提示", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 弹出消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">提示标题</param>
 public static void Message(string message, string caption)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, caption);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 5
0
 /// <summary>
 /// 弹出错误消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 public static void ErrorNoLog(string message)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, "", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 6
0
 /// <summary>
 /// 消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">消息标题</param>
 /// <param name="messageBoxButtons">显示按钮</param>
 /// <param name="messageBoxIcon">提醒图标</param>
 public static void Show(string message, string caption, MessageBoxButtons messageBoxButtons, MessageBoxIcon messageBoxIcon)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, caption, messageBoxButtons, messageBoxIcon);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 7
0
 /// <summary>
 /// 弹出消息框启动等待匡
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">提示标题</param>
 /// <param name="waitMessage">等待消息框</param>
 /// <param name="interval">等待计时</param>
 public static void MessageStartWaitDiaglog(string message, string caption, string waitMessage = "", int interval = -1)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, caption);
         WaitFormUtils.ShowWaitForm(waitMessage, "", interval);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 8
0
 /// <summary>
 /// 弹出消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">消息标题</param>
 /// <param name="waitMessage">等待匡,消息内容</param>
 /// <param name="interval">计时</param>
 public static void InformationWaitForm(string message, string caption, string waitMessage = "", int interval = -1)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, caption, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
         WaitFormUtils.ShowWaitForm(waitMessage, "", interval);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 9
0
 /// <summary>
 /// 弹出警告消息框
 /// </summary>
 /// <param name="message">警告消息</param>
 /// <param name="waitMessage">等待消息内容</param>
 /// <param name="interval">等待匡计时</param>
 public static void WarningStartDialog(string message, string waitMessage = "", int interval = -1)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBox.Show(message, "", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
         WaitFormUtils.ShowWaitForm(waitMessage, "", interval);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 弹出错误消息框
 /// </summary>
 /// <param name="exception">错误消息</param>
 /// <param name="caption">消息标题</param>
 public static void Error(Exception exception, string caption)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         string errorId = Environment.MachineName + DateTime.Now.ToString("yyyyMMddHHmmss").ToString();
         string text    = errorId + ":" + exception.Message;
         XtraMessageBox.Show(text, caption, System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 11
0
 /// <summary>
 /// 弹出错误消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 public static void Error(string message)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         string errorId = Environment.MachineName + DateTime.Now.ToString("yyyyMMddHHmmss").ToString();
         //Logger.WriteLogInfoToSql(errorId, new Exception(message));
         string text = errorId + ":" + message;
         XtraMessageBox.Show(text, "", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 12
0
 public static DialogResult XtraMessageBoxForm(string message, string caption)
 {
     try
     {
         WaitFormUtils.CloseWaitForm();
         XtraMessageBoxArgs xtraMessageBoxArgs = new XtraMessageBoxArgs(null, message, caption, MessageBoxButtonsToDialogResults(MessageBoxButtons.YesNo), MessageBoxIconToIcon(MessageBoxIcon.Question), MessageBoxDefaultButtonToInt(MessageBoxDefaultButton.Button1));
         XtraMessageBoxForm form = new XtraMessageBoxForm();
         foreach (Control ctr in form.Controls)
         {
             if (ctr is SimpleButton)
             {
                 ((SimpleButton)ctr).Appearance.Font = new System.Drawing.Font("宋体", 18, System.Drawing.FontStyle.Regular);
             }
         }
         form.Font = new System.Drawing.Font("宋体", 18, System.Drawing.FontStyle.Regular);
         return(form.ShowMessageBoxDialog(xtraMessageBoxArgs));
     }
     finally
     {
         ProcessUtils.ClearMemory();
     }
 }
Esempio n. 13
0
 /// <summary>
 /// 弹出询问消息框
 /// </summary>
 /// <param name="message">消息内容</param>
 /// <param name="caption">标题</param>
 /// <returns>DialogResult.OK;DialogResult.Cancel</returns>
 public static DialogResult Question(string message, string caption)
 {
     WaitFormUtils.CloseWaitForm();
     return(XtraMessageBox.Show(message, caption, MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2));
 }