版博士V2.0程序
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.

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace MaiMuAOI.SysUI.ProductAndStep
  11. {
  12. public partial class WaitFrm : Form
  13. {
  14. public WaitFrm(EventHandler<EventArgs> Method, string msg)
  15. {
  16. InitializeComponent();
  17. if (!string.IsNullOrEmpty(msg))
  18. lblTip.Text = msg;
  19. _Method = Method;
  20. }
  21. private EventHandler<EventArgs> _Method;
  22. private IAsyncResult asyncResult;
  23. private void timer1_Tick(object sender, EventArgs e)
  24. {
  25. if (asyncResult.IsCompleted)
  26. this.Close();
  27. }
  28. /// <summary>
  29. /// 窗体第一次加载事件
  30. /// </summary>
  31. /// <param name="sender"></param>
  32. /// <param name="e"></param>
  33. private void FrmWaitingBox_Shown(object sender, EventArgs e)
  34. {
  35. asyncResult = _Method.BeginInvoke(null, null, null,null);
  36. }
  37. }
  38. }