Example #1
0
 /// <summary>
 /// 显示弹出框
 /// </summary>
 /// <param name="text">The text.</param>
 public void ShowAlert(string text)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action <string>(ShowAlert), new object[] { text });
     }
     else
     {
         MessageAlert alert = new MessageAlert(text);
         alert.ShowDialog(this);
     }
 }
Example #2
0
 /// <summary>
 /// 弹出提示
 /// </summary>
 /// <param name="text">The text.</param>
 public void AlertTip(string text)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new Action <string>(AlertTip), new object[] { text });
     }
     else
     {
         MessageAlert alert = new MessageAlert(text, "提示");
         alert.StartPosition = FormStartPosition.CenterScreen;
         alert.Show();
     }
 }