예제 #1
0
 /// <summary>
 /// 后台程序完成
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void bgWorker_WorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     if (e.Error != null)
     {
         MessageBox.Show(e.Error.ToString());
         return;
     }
     if (!e.Cancelled)
     {
         this.Status_Label.Text = "Finish!";
     }
     else
     {
         this.Status_Label.Text = "Exit!";
     }
     //恢复状态
     this.dateTimePicker_SearchTime.Enabled = true;
     this.comboBox_GlassIDList.Enabled      = true;
     this.userButton_Refresh.Enabled        = true;
     //玻璃ID信息
     CommonMethod.Bind <GlassInfo>(ref this.comboBox_GlassIDList, ProgramData.SysPara.GlassInfos, "Id", "", ProgramData.SelectTips);//comboBox_GlassIDList帮定数据
     //保存检索信息
     ProgramData.SaveGlassInfo(dateTimePicker_SearchTime.Value.ToString(ProgramData.DateFormat));
 }