浏览代码

报告程序手动删除颗粒(分布图,颗粒分页表)手动备份一键备份数据库,自动备份数据,完成

zhangjiaxin 3 年之前
父节点
当前提交
b3620edca2
共有 1 个文件被更改,包括 24 次插入14 次删除
  1. 24 14
      OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

+ 24 - 14
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -232,9 +232,9 @@ namespace OTSIncAReportGraph.Controls
             log = NLog.LogManager.GetCurrentClassLogger();
             m_list_allDfield = new List<DisplayField>();
             m_list_allDPart = new List<BaseObject>();
-         
+
             m_frm_userprogress = new Frm_UserProgress();
-            
+
             //m_mythread_state = false;
 
             m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
@@ -298,10 +298,8 @@ namespace OTSIncAReportGraph.Controls
             m_frm_userprogress.SetProgressValueAndText(progress, message);
 
         }
-        private void Control_DrawDistrbutionImageAndBSE_Load(object sender, EventArgs e)
+        private void LoadUpdateDisplay()
         {
-
-
             ProgressBarUpdate(0, table["str1"].ToString());
 
 
@@ -325,18 +323,18 @@ namespace OTSIncAReportGraph.Controls
                 this.control_Ruler1.Visible = true;
                 this.control_Ruler1.SetValue(m_f_ruler_size, m_pixelSize);
             }
-
+            ReportFun.m_original_list_baseobject.Clear();
             //记录原值,用于缩放计算操作 ,此处要用克隆 ,原particle颗粒的值,在底层调用时已经赋值过了
             foreach (DisplayParticle ls_dp in m_list_allDPart)
             {
                 ls_dp.SetPaintState(PaintState.NORMALPAINT);
                 DisplayParticle old_dp = ls_dp.Clone() as DisplayParticle;
-                ReportFun. m_original_list_baseobject.Add(old_dp);
+                ReportFun.m_original_list_baseobject.Add(old_dp);
             }
 
             //加载时将背景rect设置与整个窗体一边大小
             m_old_backRect = m_backRect;
-
+            ReportFun.m_original_list_dfield.Clear();
             ////赋值给old保存原值
             for (int i = 0; i < m_list_allDfield.Count; i++)
             {
@@ -345,18 +343,25 @@ namespace OTSIncAReportGraph.Controls
                     m_list_allDfield[i].Show_Rect.Y,
                     m_list_allDfield[i].Show_Rect.Width,
                     m_list_allDfield[i].Show_Rect.Height);
-               ReportFun. m_original_list_dfield.Add(df);
+                ReportFun.m_original_list_dfield.Add(df);
             }
 
-      
+
 
             ProgressBarUpdate(100, table["str2"].ToString());
 
-            
+
 
             //加载完成,关闭进度条
-            m_frm_userprogress.Close();
-            
+            m_frm_userprogress.Visible = false;
+            //m_frm_userprogress.Close();
+        }
+        private void Control_DrawDistrbutionImageAndBSE_Load(object sender, EventArgs e)
+        {
+            LoadUpdateDisplay();
+
+
+
         }
         /// <summary>
         /// 获取组整个获取分布图和排序图图像数据的底层数据组建方式,的总过程
@@ -425,7 +430,9 @@ namespace OTSIncAReportGraph.Controls
             string str34 = "field...";
 
             var otsLeftBottomPoint = ReportFun.GetOTSCoordLeftBottomPoint(list_point);
-    
+
+            m_list_allDfield.Clear();
+            m_list_allDPart.Clear();
             for (int i = 0; i < fieldlist.Count(); i++)
             {
                 ProgressBarUpdate(20 + (int)(ls_int_progresscalc * (i + 1)), str32 + i.ToString() + str33 + resultFile.List_OTSField.Count.ToString() + str34);
@@ -2051,9 +2058,12 @@ namespace OTSIncAReportGraph.Controls
                if (ReportFun.DeleteParticlesFromLibrary(m_mouseOver_dparticle.ParticleId, m_mouseOver_dparticle.FieldId))
                 {
                     MessageBox.Show("Deleted successfully");
+
+                    
                     FieldData fieldData = new FieldData(resultFile.FilePath);
                     List<Field> fieldlist = fieldData.GetFieldList();
                     m_ReportApp.m_rstDataMgr.CurResultFile.List_OTSField = fieldlist;
+                    LoadUpdateDisplay();
                 }
                else
                 {