Bladeren bron

修改未加载测量结果文件,关闭报告程序时报错的问题

zhangjiaxin 4 jaren geleden
bovenliggende
commit
8406df13ab
1 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. 6 2
      OTSIncAReportApp/frmReportApp.cs

+ 6 - 2
OTSIncAReportApp/frmReportApp.cs

@@ -1216,8 +1216,12 @@ namespace OTSIncAReportApp
 
         private void frmReportApp_FormClosed(object sender, FormClosedEventArgs e)
         {
-            string strDBpathGB = resultFilesList[0].FilePath + "\\" + "ReportGBDB.db"; 
-            File.Delete(strDBpathGB);
+            if (resultFilesList.Count!=0)
+            {
+                string strDBpathGB = resultFilesList[0].FilePath + "\\" + "ReportGBDB.db";
+                File.Delete(strDBpathGB);
+            }
+            
             Process.GetCurrentProcess().Kill();
             this.Hide();//打开EChar图后,回收浏览器资源暂卡,为达到操作流畅性,先隐藏窗体再回收资源