private void ExecWaitForm() { try { WaitFormService.Show(); times++; for (int i = 0; i < 10000; i++) { WaitFormService.SetText(times.ToString() + "正在执行 ,请耐心等待...." + i.ToString()); } WaitFormService.Close(); if (times == 3) { button1.Enabled = true; return; } ExecWaitForm(); } catch (Exception ex) { WaitFormService.Close(); } }
private void MainForm_Shown(object sender, EventArgs e) { try { WaitFormService.Show(); WaitFormService.SetText("正在初始化系统数据,请稍候…………"); begin.auto(); add_menu(); auto_bg_img(); WaitFormService.Close(); begin.beginbmall();//财务编码表 } catch (Exception ex) { ex.errormess(); System.Environment.Exit(0); } }
private void Form1_Shown(object sender, EventArgs e) { //Control c = null; ; //MainForm m = (MainForm)MdiParent; //foreach (Control trol in m.Controls) //{ // if (trol is Panel) // { // c = trol; // //ToolTip toolTip = new ToolTip(); // //int times = 3000000; // //string ly = "aaaaadd 的"; // //toolTip.IsBalloon = true;// 不显示为气泡弹窗,气泡的箭头会乱跑 // //toolTip.ToolTipIcon = ToolTipIcon.Info; // //toolTip.SetToolTip(c, ""); // //toolTip.ShowAlways = true;// 总是显示 // //toolTip.UseAnimation = true; // //toolTip.UseFading = true; // ////toolTip.Hide(trol); // //toolTip.Show(ly, c, c.Width / 2, c.Height / 2, times); // } //} //c = this; // int times = 3000000; // string ly = "aaaaadd 的"; // toolTip.IsBalloon = true;// 不显示为气泡弹窗,气泡的箭头会乱跑 // toolTip.ToolTipIcon = ToolTipIcon.Info; // toolTip.SetToolTip(c, ""); // toolTip.ShowAlways = true;// 总是显示 // toolTip.UseAnimation = true; // toolTip.UseFading = true; // //toolTip.Hide(trol); // toolTip.Show(ly, c, c.Width / 2, c.Height / 2, times); //Thread thread = new Thread(ThreadFuntion); //thread.IsBackground = true; //thread.Start(); //TestDelegate d = Test; //d.BeginInvoke((Control)label1, null, null); WaitFormService.Show(); WaitFormService.SetText("d,请稍候…………"); wcoding.wcodingfinance wcoding = new newfeixiang.wcoding.wcodingfinance(); DataTable dt = wcoding.wcodingfinancetreesql4(begin_class.allmax, "1", 1, ""); WaitFormService.SetText("我是第二个,请稍候…………"); dt = wcoding.wcodingfinancetreesql4(begin_class.allmax, "1", 1, ""); WaitFormService.SetText("我是第三个哟我是第三个哟我是第三个哟我是第三个哟,请稍候…………"); dt = wcoding.wcodingfinancetreesql4(begin_class.allmax, "1", 1, ""); dt = wcoding.wcodingfinancetreesql4(begin_class.allmax, "1", 1, ""); dt = wcoding.wcodingfinancetreesql4(begin_class.allmax, "1", 1, ""); dt = wcoding.wcodingfinancetreesql4(begin_class.allmax, "1", 1, ""); WaitFormService.Close(); //toolTip.Hide(this); qg_grid_tree1.DataSource = dt; }