Browse Source

优化 报告 选择颗粒菜单

cxs 1 year ago
parent
commit
2a2466688f

+ 0 - 56
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_DrawDistrbutionImageAndBSE.cs

@@ -2049,62 +2049,6 @@ namespace OTSIncAReportGraph.Controls
             return x;
         }
 
-        private void ImportSTDDb_Click(object sender, EventArgs e)
-        {
-            //Dictionary<string, object> sampleMembers = ((Dictionary<string, object>)((Dictionary<string, object>)resultFile.ResultInfo["Sample"])["Members"]);
-            string STDName = resultFile.GetSTDName();
-            string ResultDbPath = resultFile.GetResultDBPath();
-            if (STDName.ToLower().Split('.')[0] == "nostddb")
-            {
-                OpenFileDialog openFileDialog = new OpenFileDialog();
-                openFileDialog.Filter = "(*.db)|*.db";
-                openFileDialog.RestoreDirectory = true;
-                openFileDialog.FilterIndex = 1;
-                openFileDialog.Title = "Please choose a STD to add the rule!";
-                if (openFileDialog.ShowDialog() == DialogResult.OK)
-                {
-                    try
-                    {
-                        string arguments = openFileDialog.FileName;
-                        foreach (DisplayParticle item in m_list_allDPart)
-                        {
-                            DisplayParticle dp = item;
-
-                            if (imageDisHelper.WhetherInRange(dp, m_mouse_now_point))
-                            {
-                                arguments += " " + ResultDbPath + " " + dp.FieldId + " " + dp.ParticleId + " " + dp.XRayId;
-                                break;
-                            }
-                        }
-
-                        System.Diagnostics.Process p = System.Diagnostics.Process.Start(".\\OTSPartA_STDEditor.exe", arguments);
-                        p.WaitForExit();
-                    }
-                    catch (Exception ex)
-                    {
-                        log.Error("OTSPartA_STDEditor:" + ex.ToString());
-                    }
-                }
-            }
-            else
-            {
-                string arguments = ".\\Config\\SysData\\" + STDName.Split('.')[0] + ".db";
-                foreach (DisplayParticle item in m_list_allDPart)
-                {
-                    DisplayParticle dp = item;
-
-                    if (imageDisHelper.WhetherInRange(dp, m_mouse_now_point))
-                    {
-                        arguments += " " + ResultDbPath + " " + dp.FieldId + " " + dp.ParticleId + " " + dp.XRayId;
-                        break;
-                    }
-                }
-
-                System.Diagnostics.Process p = System.Diagnostics.Process.Start(".\\OTSPartA_STDEditor.exe", arguments);
-                p.WaitForExit();
-            }
-        }
-
         private void 显示国标信息ToolStripMenuItem_Click(object sender, EventArgs e)
         {
             Cursor = Cursors.WaitCursor;

+ 9 - 4
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -254,10 +254,6 @@ namespace OTSIncAReportGrids
             cbB_PageSize.Items.Add("5000");
             cbB_PageSize.Items.Add("All");
             cbB_PageSize.SelectedIndex = 0;
-            if (m_ReportApp.im_Control_DrawDistrbutionImageAndBSE != null)
-            {
-                ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = true;
-            }
         }
 
         #region 自定义方法
@@ -337,6 +333,7 @@ namespace OTSIncAReportGrids
                 particlesAll = dtUelect.Copy();
                 btn_Sel.Enabled = false;
                 ToolStripMenuItem_Removeparticlesfromtheselectparticleslist.Visible = true;
+                ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
             }
             else
             {
@@ -351,6 +348,7 @@ namespace OTSIncAReportGrids
                     {
                         RemoveMergeParticles(ref particlesAll, mergeParticles);
                     }
+                    ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = true;
                 }                                              
                 if (sel == (int)SelItem.otherParticles)
                 {
@@ -360,14 +358,17 @@ namespace OTSIncAReportGrids
                     {
                         RemoveMergeParticles(ref particlesAll, mergeParticles);
                     }
+                    ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
                 }
                 if (sel == (int)SelItem.MergeParticles)
                 {
                     particlesAll = Particledata.GetInfoForPartucleDevidePage_mergeParticles(condition);
+                    ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
                 }
                 if (sel == (int)SelItem.allParticles)
                 {
                     particlesAll = Particledata.GetInfoForPartucleDevidePage_allParticles(condition);
+                    ToolStripMenuItem_Addparticlestotheselectparticleslist.Visible = false;
                 }
                 particlesAll.Columns.Add("Hardness");
                 particlesAll.Columns.Add("Density");
@@ -581,6 +582,7 @@ namespace OTSIncAReportGrids
             return bmap;
         }
 
+
         private void BindDataGridView()
         {
             dgV_ParticlesDevidePage.Visible = false;
@@ -1183,6 +1185,9 @@ namespace OTSIncAReportGrids
         }
         #endregion
 
+
+
+
         private void ToolStripMenuItem_exportzoomimagefile_Click(object sender, EventArgs e)
         {
             //导出放大图像

+ 5 - 1
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/frmReportConditionChoose.cs

@@ -126,7 +126,6 @@ namespace OTSIncAReportApp
             string InclusionAreaRatio = resTable["inclusionarearatio"].ToString();//夹杂物面积比
             #endregion
 
-
             //测量结果数据源
             List<string> list_source_str = m_rstDataMgr.GetSampleListName();
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE, resultData, OTS_ITEM_TYPES.COMBO, false, "Select Measurement Result", list_source_str[m_rstDataMgr.GetWorkingResultId()], list_source_str, m_rstDataMgr.GetWorkingResultId());
@@ -185,6 +184,11 @@ namespace OTSIncAReportApp
             {
                 stdlistname.Remove("Invalid");
             }
+
+            if (stdlistname.Contains("LowCounts"))
+            {
+                stdlistname.Remove("LowCounts");
+            }
             AddGridData(OTS_REPORT_PROP_GRID_ITEMS.STD_ID, "ClassifyId", OTS_ITEM_TYPES.COMBO, false, "std list", stdlistname[0], stdlistname, null);
 
             //颗粒列表数据类型