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 = 5 * 1000; _alert.AutoHeight = true; } return _alert; } } private static AlertControl _alert = null; /// /// 显示右下角弹窗 /// /// /// /// 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); } } }