大连融科 WMS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

67 lines
1.8 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sid.Windows.Controls;
using System.Data;
namespace SiaSun.LMS.WPFClient.Dialog
{
public class MessageDialog
{
static string Title, Header, ContentOK, ContentFaile;
/// <summary>
/// 构造函数
/// </summary>
public MessageDialog()
{
//根据关键字获得字典值
Title = string.Format("系统提示");
Header = string.Format("执行消息");
ContentOK = string.Format("成功");
ContentFaile = string.Format("失败");
}
/// <summary>
/// 显示信息
/// </summary>
public void Show(bool bResult,string sResult)
{
if (bResult)
{
TaskDialog.Show(Title, Header, ContentOK);
}
else
{
TaskDialog.Show(Title, Header, ContentFaile + "\n" + sResult);
}
}
/// <summary>
/// 显示信息框
/// </summary>
public TaskDialogResult ShowDialog(string sResult)
{
return TaskDialog.Show(Title, Header, sResult,"","",TaskDialogButton.OkCancel, TaskDialogResult.Ok,TaskDialogIcon.Information, TaskDialogIcon.None );
}
/// <summary>
/// 显示异常信息提示
/// </summary>
public void ShowException(string ExceptionMessage)
{
TaskDialog.ShowException(Title, ContentFaile, new Exception(ExceptionMessage));
}
/// <summary>
/// 显示异常信息提示
/// </summary>
public void ShowException(Exception ex)
{
TaskDialog.ShowException(Title, ContentFaile, ex);
}
}
}