/// <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); } }
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.ShowDialog(this); } }