|
12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
-
- namespace MaiMuAOI.SysUI.ProductAndStep
- {
- public partial class WaitFrm : Form
- {
- public WaitFrm(EventHandler<EventArgs> Method, string msg)
- {
- InitializeComponent();
- if (!string.IsNullOrEmpty(msg))
- lblTip.Text = msg;
- _Method = Method;
- }
-
- private EventHandler<EventArgs> _Method;
- private IAsyncResult asyncResult;
- private void timer1_Tick(object sender, EventArgs e)
- {
- if (asyncResult.IsCompleted)
- this.Close();
- }
- /// <summary>
- /// 窗体第一次加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void FrmWaitingBox_Shown(object sender, EventArgs e)
- {
- asyncResult = _Method.BeginInvoke(null, null, null,null);
- }
- }
- }
|