/// <summary> /// /// </summary> private void InitAuto() { if (isautoRun) { return; } isautoRun = true; Application.DoEvents(); var t1 = new Thread(() => BeginInvoke(new Action(() => { if (!autoStart) { return; } // MessageBox.Show("autoStart"); if (bfForms == null) { bfForms = new BusinessForms(this); bfForms.Show(); } Application.DoEvents(); //导入数据 //bfForms.button1_Click(new object(), new EventArgs()); LogManager.SetUI(bfForms.TB_logText); ClearAndPrepareNext(); }))); t1.IsBackground = true; t1.Start(); }
private void toolStripMenuItem13_Click(object sender, EventArgs e) { if (bfForms == null) { bfForms = new BusinessForms(this); bfForms.Show(); } bfForms.Activate(); }