// 判斷有沒有兩個以上的及格標準 void BGW_RunWorkerCompleted_Step1(object sender, RunWorkerCompletedEventArgs e) { string fileName = (string)((object[])e.Result)[0]; bool IsContinue = false; // 假如有學生有多重及格標準 顯示給使用者看 if (_MultiTagStudentDic.Count > 0) { FrmWarningStudent frm = new FrmWarningStudent(_MultiTagStudentDic); DialogResult result = frm.ShowDialog(); if (result == DialogResult.OK) { // 繼續產生 IsContinue = true; _IsProcessWarningStudent = true; } else if (result == DialogResult.Ignore) { // 加到待處理名單 IsContinue = true; _IsProcessWarningStudent = false; } else if (result == DialogResult.Cancel) { // 關閉 IsContinue = false; } } else { IsContinue = true; _IsProcessWarningStudent = true; } // 進行Step2 if (IsContinue == true) { _BGW_Step2.RunWorkerAsync(new object[] { fileName }); } else { FormComponetEnable(true); FISCA.Presentation.MotherForm.SetStatusBarMessage(Global.Title + "產生取消。", 100); } }
// 判斷有沒有兩個以上的及格標準 void BGW_RunWorkerCompleted_Step1(object sender, RunWorkerCompletedEventArgs e) { string fileName = (string)((object[])e.Result)[0]; bool IsContinue = false; // 假如有學生有多重及格標準 顯示給使用者看 if(_MultiTagStudentDic.Count > 0) { FrmWarningStudent frm = new FrmWarningStudent(_MultiTagStudentDic); DialogResult result = frm.ShowDialog(); if(result == DialogResult.OK) { // 繼續產生 IsContinue = true; _IsProcessWarningStudent = true; } else if(result == DialogResult.Ignore) { // 加到待處理名單 IsContinue = true; _IsProcessWarningStudent = false; } else if(result == DialogResult.Cancel) { // 關閉 IsContinue = false; } } else { IsContinue = true; _IsProcessWarningStudent = true; } // 進行Step2 if (IsContinue == true) { _BGW_Step2.RunWorkerAsync(new object[] { fileName }); } else { FormComponetEnable(true); FISCA.Presentation.MotherForm.SetStatusBarMessage(Global.Title + "產生取消。", 100); } }