using DevExpress.XtraBars.Alerter;
|
|
namespace IStation.Win
|
{
|
//用于右下角弹窗提示
|
public class AlertTool
|
{
|
private static AlertControl Alert
|
{
|
get
|
{
|
if (_alert == null)
|
{
|
_alert = new AlertControl();
|
//_alert.FormMaxCount = 1;
|
_alert.AutoFormDelay = 2 * 1000;
|
_alert.AutoHeight = true;
|
}
|
return _alert;
|
}
|
}
|
private static AlertControl _alert = null;
|
|
/// <summary>
|
/// 显示右下角弹窗
|
/// </summary>
|
/// <param name="owner"></param>
|
/// <param name="caption"></param>
|
/// <param name="text"></param>
|
public static void ShowInfo(Form owner, string caption, string text)
|
{
|
DevExpress.XtraBars.Alerter.AlertInfo info = new DevExpress.XtraBars.Alerter.AlertInfo(caption, text);
|
AlertTool.Alert.Show(owner, info);
|
}
|
|
|
}
|
}
|