Beispiel #1
0
 /// <summary>
 /// 循环下载所有数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void button2_Click(object sender, EventArgs e)
 {
     zhengfan = true;
     if (!timer1.Enabled)
     {
         timer1.Start();
         CmnXhLoadHandler handler = new CmnXhLoadHandler(XHCmnDownLoadData);
         using (CmnLoadDataForm form = new CmnLoadDataForm("正循环下载数据正在运行中..."))
         {
             double       b;
             IAsyncResult result = handler.BeginInvoke(out b, null, null);
             form.AsyncResult = result;
             form.ShowDialog(this);
             handler.EndInvoke(out b, result);
         }
     }
 }
Beispiel #2
0
        private void frmOutline_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“attDataSet.d_machines”中。您可以根据需要移动或删除它。

            zhengfan = true;
            if (!timer1.Enabled)
            {
                timer1.Start();
                CmnXhLoadHandler handler = new CmnXhLoadHandler(XHCmnDownLoadData);
                using (CmnLoadDataForm form = new CmnLoadDataForm("正循环下载数据正在运行中..."))
                {
                    double       b;
                    IAsyncResult result = handler.BeginInvoke(out b, null, null);
                    form.AsyncResult = result;
                    form.ShowDialog(this);
                    handler.EndInvoke(out b, result);
                }
            }
        }