浏览代码

优化导出图形类型修改功能

zhangjiaxin 11 月之前
父节点
当前提交
c8bbbc3839

+ 7 - 0
Bin/x64/Debug/Config/ProData/DefaultTriTemplateFile.tpf

@@ -8,4 +8,11 @@
   <Member TemplateId="6" TemplateName="Mn.Ni.Co" Element="Ac.Ni.Ac" Group="Mn-Ac.Ni-Ni.Co-Ac" />
   <Member TemplateId="20210913145438" TemplateName="CaO.CaS.Al₂O₃" Element="Ca.S,Ca.Al" Group="CaO-Ca.CaS-S,Ca.Al₂O₃-Al" />
   <Member TemplateId="20211223164219" TemplateName="MnS.CaS.Al₂O₃" Element="Mn.Ca.Al" Group="MnS-Mn.CaS-Ca.Al₂O₃-Al" />
+  <Member TemplateId="20250115145721" TemplateName="MnS.SiOX.Al2O3" Element="Mn.Si,O.Al" Group="MnS-Mn.SiOX-Si,O.Al2O3-Al" />
+  <Member TemplateId="20250115145804" TemplateName="MnO.S.Al2O3" Element="Mn.S.Al" Group="MnO-Mn.S-S.Al2O3-Al" />
+  <Member TemplateId="20250115150652" TemplateName="Si.Ca.Al" Element="Si.Ca.Al" Group="Si-Si.Ca-Ca.Al-Al" />
+  <Member TemplateId="20250115150735" TemplateName="Mg.Ca.Al" Element="Mg.Ca.Al" Group="Mg-Mg.Ca-Ca.Al-Al" />
+  <Member TemplateId="20250115150834" TemplateName="S.Ca.Al" Element="S.Ca.Al" Group="S-S.Ca-Ca.Al-Al" />
+  <Member TemplateId="20250115151041" TemplateName="S.Si.Al" Element="S.Si.Al" Group="S-S.Si-Si.Al-Al" />
+  <Member TemplateId="20250115151124" TemplateName="S.Mn.Al" Element="S.Mn.Al" Group="S-S.Mn-Mn.Al-Al" />
 </XMLData>

+ 21 - 12
Bin/x64/Debug/Config/ReportTemplate/Inca_Template/ReportTemplateConfig.xml

@@ -1,9 +1,9 @@
 <XmlConfig>
   <M_SY>
     <str_tb_ZBT>夹杂物报告</str_tb_ZBT>
-    <str_tb_FBT>XXX有限公司</str_tb_FBT>
-    <str_tb_YPBH>
-    </str_tb_YPBH>
+    <str_tb_FBT>
+    </str_tb_FBT>
+    <str_tb_YPBH>1</str_tb_YPBH>
     <str_tb_CKBZ>
     </str_tb_CKBZ>
     <b_ck_ypsm>True</b_ck_ypsm>
@@ -20,7 +20,7 @@
     <str_tb_ymwb>锂电异物分析报告</str_tb_ymwb>
     <str_tb_KHH>Copi0000123012</str_tb_KHH>
     <b_ck_ym>True</b_ck_ym>
-    <str_tb_yjwb>OTS Result</str_tb_yjwb>
+    <str_tb_yjwb>Inclusion Result</str_tb_yjwb>
   </M_YMYJ>
   <M_KLFXJG>
     <b_ck_klcc_xsmk>True</b_ck_klcc_xsmk>
@@ -33,10 +33,13 @@
     <index_cb_jzwfl_ljb>0</index_cb_jzwfl_ljb>
     <index_cb_jzwfl_klfw>0</index_cb_jzwfl_klfw>
     <str_cb_klcc_jsfs>ECD</str_cb_klcc_jsfs>
-    <b_ck_klcc_xsddt>False</b_ck_klcc_xsddt>
-    <b_ck_klcc_dfl>True</b_ck_klcc_dfl>
-    <b_ck_klcc_xfl>True</b_ck_klcc_xfl>
+    <b_ck_klcc_xsddt>True</b_ck_klcc_xsddt>
+    <b_ck_klcc_dfl>False</b_ck_klcc_dfl>
+    <b_ck_klcc_xfl>False</b_ck_klcc_xfl>
     <str_cb_klcc_ljb>lj.psf</str_cb_klcc_ljb>
+    <GraphicSelection>2</GraphicSelection>
+    <ParticleSizeGraphicSelection>0</ParticleSizeGraphicSelection>
+    <INCAGraphicSelection>1</INCAGraphicSelection>
   </M_KLFXJG>
   <M_YSFXJG>
     <b_ck_ysfx_xsmk>True</b_ck_ysfx_xsmk>
@@ -73,12 +76,18 @@
     <index_cb_syxt_klfw>0</index_cb_syxt_klfw>
     <str_cb_syxt_mhxssl>2</str_cb_syxt_mhxssl>
     <list_lbv_syxt_mblb>
-      <MB0>MgO.CaO.Al₂O₃</MB0>
-      <MB1>CaO.SiO₂.Al₂O₃</MB1>
+      <MB0>Si.Ca.Al</MB0>
+      <MB1>Mg.Ca.Al</MB1>
+      <MB2>S.Ca.Al</MB2>
+      <MB3>S.Si.Al</MB3>
+      <MB4>S.Mn.Al</MB4>
     </list_lbv_syxt_mblb>
     <list_lbv_syxt_mblb_index>
-      <MBIndex0>0</MBIndex0>
-      <MBIndex1>2</MBIndex1>
+      <MBIndex0>10</MBIndex0>
+      <MBIndex1>11</MBIndex1>
+      <MBIndex2>12</MBIndex2>
+      <MBIndex3>13</MBIndex3>
+      <MBIndex4>14</MBIndex4>
     </list_lbv_syxt_mblb_index>
     <str_cb_syxt_ljb>lj.psf</str_cb_syxt_ljb>
   </M_SYXT>
@@ -123,7 +132,7 @@
     <str_kllb_DeleteClass>misc</str_kllb_DeleteClass>
     <list_str_kllb_DeleteClass>
     </list_str_kllb_DeleteClass>
-    <list_int_kllb_number>18</list_int_kllb_number>
+    <list_int_kllb_number>20</list_int_kllb_number>
     <list_str_kllb_DeleteClass_Serial>
     </list_str_kllb_DeleteClass_Serial>
   </M_KLLBXX>

+ 2 - 0
Bin/x64/Debug/Config/ReportTemplate/TCleannessA_Template/ReportTemplateConfig.xml

@@ -35,6 +35,8 @@
     <b_ck_klcc_dfl>True</b_ck_klcc_dfl>
     <b_ck_klcc_xfl>True</b_ck_klcc_xfl>
     <str_cb_klcc_ljb>j4.psf</str_cb_klcc_ljb>
+    <ParticleSizeGraphicSelection>0</ParticleSizeGraphicSelection>
+    <INCAGraphicSelection>0</INCAGraphicSelection>
   </M_KLFXJG>
   <M_YSFXJG>
     <b_ck_ysfx_xsmk>True</b_ck_ysfx_xsmk>

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSReportMgrParam.rpf

@@ -3,7 +3,7 @@
   <Member RegName="Scale" strValue="1000" />
   <Member RegName="DefaultComputedColName" strValue="Area,EquivalentCircleDiameter,MaxDiameter,MinDiameter,DiameterRatio,FerretDiameter,PERP,PERI,INSCR,MEAN,ELONG,ASPECT_ELONG,Orientation" />
   <Member RegName="ElementsColName" strValue="C,O,Al,Fe,F,Ti,Na,Mn,Mg" />
-  <Member RegName="PartSizeFile" name="lj.psf" />
+  <Member RegName="PartSizeFile" name="shanghai.psf" />
   <Member RegName="TRIO_CHART_TYPE" strValue="CaO.SiO₂.Al₂O₃" />
   <Member RegName="SIZE_CAL_METHOD_TYPE" strValue="ECD" />
 </XMLData>

+ 18 - 174
OTSIncAReportApp/1-UI/OTSReportExport/DataIntegration/ParticleAnalysis.cs

@@ -33,15 +33,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             {
                 ls_partsize_dt.Columns.Add("c" + (i + 1).ToString());
             }
-            //ls_partsize_dt.Columns.Add("c1");
-            //ls_partsize_dt.Columns.Add("c2");
-            //ls_partsize_dt.Columns.Add("c3");
-            //ls_partsize_dt.Columns.Add("c4");
-            //ls_partsize_dt.Columns.Add("c5");
-            //ls_partsize_dt.Columns.Add("c6");
-            //ls_partsize_dt.Columns.Add("c7");
-            //ls_partsize_dt.Columns.Add("c8");
-            //ls_partsize_dt.Columns.Add("c9");
+       
             DataTable ls_Particel_dt = new DataTable();
             ls_Particel_dt.TableName = "Particel";
             DataRow dr = ls_partsize_dt.NewRow();
@@ -61,17 +53,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             }
             ls_partsize_dt.Rows.Add(dr);
 
-            //DataTable ls_Particel_dt = new DataTable();
-            //ls_Particel_dt.TableName = "Particel";
-            //ls_Particel_dt.Columns.Add("c1", typeof(double));
-            //ls_Particel_dt.Columns.Add("c2", typeof(double));
-            //ls_Particel_dt.Columns.Add("c3", typeof(double));
-            //ls_Particel_dt.Columns.Add("c4", typeof(double));
-            //ls_Particel_dt.Columns.Add("c5", typeof(double));
-            //ls_Particel_dt.Columns.Add("c6", typeof(double));
-            //ls_Particel_dt.Columns.Add("c7", typeof(double));
-            //ls_Particel_dt.Columns.Add("c8", typeof(double));
-            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -142,18 +123,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             }
 
             DataRow dr = ls_partsize_dt.NewRow();
-            //for (int i = 1; i < 10; i++)
-            //{
-            //    if (colid.Count < i)
-            //    {
-            //        dr["c" + i.ToString()] = "";
-            //    }
-            //    else
-            //    {
-            //        dr["c" + i.ToString()] = colid[i - 1];
-            //    }
-            //}
-            //ls_partsize_dt.Rows.Add(dr);
+            
             DataTable ls_Particel_dt = new DataTable();
             ls_Particel_dt.TableName = "Particel";
             int colidCount = 1;
@@ -171,19 +141,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 }
             }
 
-
-            //DataTable ls_Particel_dt = new DataTable();
-            //ls_Particel_dt.TableName = "Particel";
-
-            //ls_Particel_dt.Columns.Add("c1", typeof(double));
-            //ls_Particel_dt.Columns.Add("c2", typeof(double));
-            //ls_Particel_dt.Columns.Add("c3", typeof(double));
-            //ls_Particel_dt.Columns.Add("c4", typeof(double));
-            //ls_Particel_dt.Columns.Add("c5", typeof(double));
-            //ls_Particel_dt.Columns.Add("c6", typeof(double));
-            //ls_Particel_dt.Columns.Add("c7", typeof(double));
-            //ls_Particel_dt.Columns.Add("c8", typeof(double));
-            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -240,16 +197,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
             }
 
-            //ls_partsize_dt.Columns.Add("c1");
-            //ls_partsize_dt.Columns.Add("c2");
-            //ls_partsize_dt.Columns.Add("c3");
-            //ls_partsize_dt.Columns.Add("c4");
-            //ls_partsize_dt.Columns.Add("c5");
-            //ls_partsize_dt.Columns.Add("c6");
-            //ls_partsize_dt.Columns.Add("c7");
-            //ls_partsize_dt.Columns.Add("c8");
-            //ls_partsize_dt.Columns.Add("c9");
-
             DataRow dr = ls_partsize_dt.NewRow();
 
             DataTable ls_Particel_dt = new DataTable();
@@ -270,17 +217,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             }
             ls_partsize_dt.Rows.Add(dr);
 
-
-            
-            //ls_Particel_dt.Columns.Add("c1", typeof(double));
-            //ls_Particel_dt.Columns.Add("c2", typeof(double));
-            //ls_Particel_dt.Columns.Add("c3", typeof(double));
-            //ls_Particel_dt.Columns.Add("c4", typeof(double));
-            //ls_Particel_dt.Columns.Add("c5", typeof(double));
-            //ls_Particel_dt.Columns.Add("c6", typeof(double));
-            //ls_Particel_dt.Columns.Add("c7", typeof(double));
-            //ls_Particel_dt.Columns.Add("c8", typeof(double));
-            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -363,15 +299,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             {
                 ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
             }
-            //ls_partsize_dt.Columns.Add("c1");
-            //ls_partsize_dt.Columns.Add("c2");
-            //ls_partsize_dt.Columns.Add("c3");
-            //ls_partsize_dt.Columns.Add("c4");
-            //ls_partsize_dt.Columns.Add("c5");
-            //ls_partsize_dt.Columns.Add("c6");
-            //ls_partsize_dt.Columns.Add("c7");
-            //ls_partsize_dt.Columns.Add("c8");
-            //ls_partsize_dt.Columns.Add("c9");
+           
 
             DataTable ls_Particel_dt = new DataTable();
             ls_Particel_dt.TableName = "Particel";
@@ -392,18 +320,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             }
             ls_partsize_dt.Rows.Add(dr);
 
-
-          
-
-            //ls_Particel_dt.Columns.Add("c1", typeof(double));
-            //ls_Particel_dt.Columns.Add("c2", typeof(double));
-            //ls_Particel_dt.Columns.Add("c3", typeof(double));
-            //ls_Particel_dt.Columns.Add("c4", typeof(double));
-            //ls_Particel_dt.Columns.Add("c5", typeof(double));
-            //ls_Particel_dt.Columns.Add("c6", typeof(double));
-            //ls_Particel_dt.Columns.Add("c7", typeof(double));
-            //ls_Particel_dt.Columns.Add("c8", typeof(double));
-            //ls_Particel_dt.Columns.Add("c9", typeof(double));
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total", typeof(double));
             ls_Particel_dt.Columns.Add("TypeId");
@@ -491,13 +407,10 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
+                    colid.Add("≥" + d1.ToString() );
                 }
             }
 
-            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            //colid.Add(d.ToString() + "~MAX");
             ParticleData fielddata = new ParticleData(m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.GetWorkingResultId()].FilePath);
 
 
@@ -508,49 +421,21 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             {
                 ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
             }
-            //ls_partsize_dt.Columns.Add("c1");
-            //ls_partsize_dt.Columns.Add("c2");
-            //ls_partsize_dt.Columns.Add("c3");
-            //ls_partsize_dt.Columns.Add("c4");
-            //ls_partsize_dt.Columns.Add("c5");
-            //ls_partsize_dt.Columns.Add("c6");
-            //ls_partsize_dt.Columns.Add("c7");
-            //ls_partsize_dt.Columns.Add("c8");
-            //ls_partsize_dt.Columns.Add("c9");
-            //ls_partsize_dt.Columns.Add("c10");
+ 
             DataRow dr = ls_partsize_dt.NewRow();
             DataTable ls_Particel_dt = new DataTable();
             ls_Particel_dt.TableName = "Particel";
             int colidCount = 1;
             for (int i = 0; i < colid.Count; i++)
             {
-                //if (colid.Count < i)
-                //{
-                //    dr["c" + i.ToString()] = "";
-                //}
-                //else
-                //{
+   
                     dr["c" + (i+1).ToString()] = colid[i];
-                //}
+          
 
                 ls_Particel_dt.Columns.Add("c"+ (i + 1).ToString());
                 colidCount++;
             }
             ls_partsize_dt.Rows.Add(dr);
-
-
-            
-
-            
-            //ls_Particel_dt.Columns.Add("c2");
-            //ls_Particel_dt.Columns.Add("c3");
-            //ls_Particel_dt.Columns.Add("c4");
-            //ls_Particel_dt.Columns.Add("c5");
-            //ls_Particel_dt.Columns.Add("c6");
-            //ls_Particel_dt.Columns.Add("c7");
-            //ls_Particel_dt.Columns.Add("c8");
-            //ls_Particel_dt.Columns.Add("c9");
-            //ls_Particel_dt.Columns.Add("c10");
             ls_Particel_dt.Columns.Add("Name");
             ls_Particel_dt.Columns.Add("total");
             ls_Particel_dt.Columns.Add("TypeId");
@@ -610,13 +495,11 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
+                
+                    colid.Add("≥" + d1.ToString());
                 }
             }
-            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            //colid.Add(d.ToString() + "~MAX");
-
+ 
             DataTable ls_partsize_dt = new DataTable();
             ls_partsize_dt.TableName = "PartSize";
 
@@ -624,30 +507,13 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             {
                 ls_partsize_dt.Columns.Add("c"+(i+1).ToString());
             }
-            //ls_partsize_dt.Columns.Add("c1");
-            //ls_partsize_dt.Columns.Add("c2");
-            //ls_partsize_dt.Columns.Add("c3");
-            //ls_partsize_dt.Columns.Add("c4");
-            //ls_partsize_dt.Columns.Add("c5");
-            //ls_partsize_dt.Columns.Add("c6");
-            //ls_partsize_dt.Columns.Add("c7");
-            //ls_partsize_dt.Columns.Add("c8");
-            //ls_partsize_dt.Columns.Add("c9");
-            //ls_partsize_dt.Columns.Add("c10");
-            //ls_partsize_dt.Columns.Add("c11");
-            //ls_partsize_dt.Columns.Add("c12");
-
+            
             DataRow dr = ls_partsize_dt.NewRow();
             for (int i = 0; i < colid.Count; i++)
             {
-                //if (colid.Count < i)
-                //{
-                //    dr["c" + i.ToString()] = "";
-                //}
-                //else
-                //{
+               
                     dr["c" + (i+1).ToString()] = colid[i];
-                //}
+             
             }
             ls_partsize_dt.Rows.Add(dr);
 
@@ -659,7 +525,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
             dt_Class.Clear();
             dt_Class.TableName = "Particel";
             dt_Class.Columns.Remove("Name");
-            //dt_Class.Columns.Remove("TypeId");
 
             for (int i = 0; i < ClassName.Count; i++)
             {
@@ -702,7 +567,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                   
                 }
                 dt_2.Columns.Remove("Name");
-                //dt_2.Columns.Remove("TypeId");
                 dt_2.Rows[0]["Class"] = ClassName[i];
                 dt_Class.Rows.Add(dt_2.Rows[0].ItemArray);
             }
@@ -757,8 +621,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                     dt.Rows.Add(dt_1_sort.Rows[a].ItemArray);
                 }
             }
-            //dt.Columns.Remove("TypeId");
-
+   
             return dt;
 
         }
@@ -791,18 +654,15 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                  m_otsreport_export.m_ReportApp.m_rstDataMgr.m_RptConfigFile.PartSizeFile;
             DataSet ds = OTSIncAReportApp.DataOperation.DataAccess.XMLoperate.GetXml(path1);
             string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
-            for (int i = 0; i < sizestr.Split(',').Length /*- 1*/; i++)
+            for (int i = 0; i < sizestr.Split(',').Length ; i++)
             {
                 if (sizestr.Split(',')[i].Length > 0)
                 {
                     double d1 = Convert.ToDouble(sizestr.Split(',')[i]);
-                    //double d2 = Convert.ToDouble(sizestr.Split(',')[i + 1]);
-                    colid.Add("≥" + d1.ToString() /*+ "~" + d2.ToString()*/);
+                    colid.Add("≥" + d1.ToString() );
                 }
             }
-            //double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
-            //colid.Add(d.ToString() + "~MAX");
-
+          
             for (int i = 0; i < colid.Count; i++)
             {
                 m_bt_DBData.Columns.Add(colid[i].ToString());
@@ -855,11 +715,7 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                         d2 = colid[a+1].Split('≥')[1];
                     }
                     string d1 = colid[a].Split('≥')[1];
-                    //string d2 = colid[a].Split('~')[1];
-                    //if (d2 == "MAX")
-                    //{
-                    //    d2 = "999";
-                    //}
+                    
                     DataRow[] datas = dtp.Select(getWhere(d2, d1, po, dt.Rows[i]["TypeId"].ToString()));
                     dr[colid[a]] = datas.Count();
                 }
@@ -935,18 +791,6 @@ namespace OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration
                 }
             }
 
-            //for (int i = 0; i < m_bt_DBData.Rows.Count; i++)
-            //{
-            //    for (int a = 0; a < m_mbszclass.list_str_MainPriority.Count; a++)
-            //    {
-            //        if (m_bt_DBData.Rows[i]["TypeName"].ToString() == m_mbszclass.list_str_MainPriority[a])
-            //        {
-            //            datass.Rows.Add(m_bt_DBData.Rows[i].ItemArray);
-            //            continue;
-            //        }
-            //    }
-            //}
-
             return datass;
         }
 

+ 15 - 10
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Export.cs

@@ -261,7 +261,14 @@ namespace OTSIncAReportApp
                 /// </summary>
                 public int index_cb_jzwfl_xstx { get; set; }
 
-           
+                /// <summary>
+                /// 颗粒尺寸图形选择(饼、柱、线)
+                /// </summary>
+                public int ParticleSizeGraphicSelection { get; set; }
+                /// <summary>
+                /// 夹杂物分类图形选择(饼、柱、线)
+                /// </summary>
+                public int INCAGraphicSelection { get; set; }
 
                 /// <summary>
                 ///夹杂物分类图 计算方式 选择索引
@@ -775,7 +782,7 @@ namespace OTSIncAReportApp
                     richTextBox1.SelectionStart = 0; // 设置选择开始位置 
                     richTextBox1.AppendText(table["particle_size"].ToString() + "\n");
                     richTextBox1.AppendText(table["loading"].ToString() + Math.Round(d1, length).ToString() + "%\n");
-                    DEVReport.setParticleSizeTable(m_mbszclass.M_KLFXJG.b_ck_klcc_dfl, m_mbszclass.M_KLFXJG.b_ck_klcc_xfl, m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt);
+                    DEVReport.setParticleSizeTable(m_mbszclass);
                     richTextBox1.ScrollToCaret();
                 }
             }
@@ -841,14 +848,8 @@ namespace OTSIncAReportApp
                         richTextBox1.AppendText(table["inclusion_chart"].ToString() + "\n");
                         richTextBox1.AppendText(table["loading"].ToString() + Math.Round(d1, length).ToString() + "%\n");
                         DEVReport.XRPageBreak();
-                        if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl)
-                        {
-                            DEVReport.set_incaPIC_classify();
-                        }
-                        if (m_mbszclass.M_KLFXJG.b_ck_klcc_xfl)
-                        {
-                            DEVReport.set_incaPIC_subdivision();
-                        }
+                        DEVReport.set_incaPIC_classify(m_mbszclass);
+                        DEVReport.set_incaPIC_subdivision(m_mbszclass);
                         richTextBox1.ScrollToCaret();
                     }
                 }
@@ -975,6 +976,10 @@ namespace OTSIncAReportApp
             m_mbszclass.M_YSFXJG.index_cb_yxfx_jsfs = Convert.ToInt32(xmlutil.Read("M_YSFXJG", "index_cb_yxfx_jsfs"));    //计算方式
             m_mbszclass.M_YSFXJG.index_cb_ysfx_klfw = Convert.ToInt32(xmlutil.Read("M_YSFXJG", "index_cb_ysfx_klfw"));    //颗粒范围
             m_mbszclass.M_YSFXJG.str_tb_ysfx_xsys = xmlutil.Read("M_YSFXJG", "str_tb_ysfx_xsys");        //显示元素
+
+            m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection= Convert.ToInt32(xmlutil.Read("M_KLFXJG", "ParticleSizeGraphicSelection"));
+
+            m_mbszclass.M_KLFXJG.INCAGraphicSelection = Convert.ToInt32(xmlutil.Read("M_KLFXJG", "INCAGraphicSelection"));
             m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Clear();
             for (int i = 0; i < 100; i++)                              //取得所有元素列表
             {

+ 22 - 11
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_CleannessA.Designer.cs

@@ -74,6 +74,7 @@
             this.button3 = new System.Windows.Forms.Button();
             this.textBox_zypxss = new System.Windows.Forms.TextBox();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.comboBox2 = new System.Windows.Forms.ComboBox();
             this.cb_TccleanlinessA = new System.Windows.Forms.CheckBox();
             this.label2 = new System.Windows.Forms.Label();
             this.button7 = new System.Windows.Forms.Button();
@@ -293,7 +294,7 @@
             // ck_klcc_xsddt
             // 
             this.ck_klcc_xsddt.AutoSize = true;
-            this.ck_klcc_xsddt.Location = new System.Drawing.Point(18, 81);
+            this.ck_klcc_xsddt.Location = new System.Drawing.Point(42, 106);
             this.ck_klcc_xsddt.Margin = new System.Windows.Forms.Padding(2);
             this.ck_klcc_xsddt.Name = "ck_klcc_xsddt";
             this.ck_klcc_xsddt.Size = new System.Drawing.Size(84, 16);
@@ -304,7 +305,7 @@
             // checkBox2
             // 
             this.checkBox2.AutoSize = true;
-            this.checkBox2.Location = new System.Drawing.Point(18, 137);
+            this.checkBox2.Location = new System.Drawing.Point(276, 106);
             this.checkBox2.Margin = new System.Windows.Forms.Padding(2);
             this.checkBox2.Name = "checkBox2";
             this.checkBox2.Size = new System.Drawing.Size(84, 16);
@@ -316,7 +317,7 @@
             // checkBox1
             // 
             this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(18, 109);
+            this.checkBox1.Location = new System.Drawing.Point(159, 106);
             this.checkBox1.Margin = new System.Windows.Forms.Padding(2);
             this.checkBox1.Name = "checkBox1";
             this.checkBox1.Size = new System.Drawing.Size(84, 16);
@@ -328,7 +329,7 @@
             // ck_klcc_xsmk
             // 
             this.ck_klcc_xsmk.AutoSize = true;
-            this.ck_klcc_xsmk.Location = new System.Drawing.Point(18, 53);
+            this.ck_klcc_xsmk.Location = new System.Drawing.Point(18, 64);
             this.ck_klcc_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_klcc_xsmk.Name = "ck_klcc_xsmk";
             this.ck_klcc_xsmk.Size = new System.Drawing.Size(72, 16);
@@ -339,7 +340,7 @@
             // 
             // tb_ysfx_xsys
             // 
-            this.tb_ysfx_xsys.Location = new System.Drawing.Point(251, 173);
+            this.tb_ysfx_xsys.Location = new System.Drawing.Point(223, 144);
             this.tb_ysfx_xsys.Margin = new System.Windows.Forms.Padding(2);
             this.tb_ysfx_xsys.Name = "tb_ysfx_xsys";
             this.tb_ysfx_xsys.ReadOnly = true;
@@ -348,7 +349,7 @@
             // 
             // button4
             // 
-            this.button4.Location = new System.Drawing.Point(593, 173);
+            this.button4.Location = new System.Drawing.Point(565, 144);
             this.button4.Margin = new System.Windows.Forms.Padding(2);
             this.button4.Name = "button4";
             this.button4.Size = new System.Drawing.Size(72, 20);
@@ -360,7 +361,7 @@
             // ck_ysfx_xsmk
             // 
             this.ck_ysfx_xsmk.AutoSize = true;
-            this.ck_ysfx_xsmk.Location = new System.Drawing.Point(18, 173);
+            this.ck_ysfx_xsmk.Location = new System.Drawing.Point(18, 146);
             this.ck_ysfx_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_ysfx_xsmk.Name = "ck_ysfx_xsmk";
             this.ck_ysfx_xsmk.Size = new System.Drawing.Size(72, 16);
@@ -402,7 +403,7 @@
             // ck_kllb_fjzt
             // 
             this.ck_kllb_fjzt.AutoSize = true;
-            this.ck_kllb_fjzt.Location = new System.Drawing.Point(18, 339);
+            this.ck_kllb_fjzt.Location = new System.Drawing.Point(18, 329);
             this.ck_kllb_fjzt.Name = "ck_kllb_fjzt";
             this.ck_kllb_fjzt.Size = new System.Drawing.Size(96, 16);
             this.ck_kllb_fjzt.TabIndex = 57;
@@ -423,7 +424,7 @@
             this.groupBox_px.Controls.Add(this.ParticleList_2);
             this.groupBox_px.Controls.Add(this.ParticleList_1);
             this.groupBox_px.Controls.Add(this.comboBox_p1);
-            this.groupBox_px.Location = new System.Drawing.Point(152, 214);
+            this.groupBox_px.Location = new System.Drawing.Point(135, 204);
             this.groupBox_px.Name = "groupBox_px";
             this.groupBox_px.Size = new System.Drawing.Size(513, 125);
             this.groupBox_px.TabIndex = 54;
@@ -523,7 +524,7 @@
             // ck_kllb_xsmk
             // 
             this.ck_kllb_xsmk.AutoSize = true;
-            this.ck_kllb_xsmk.Location = new System.Drawing.Point(18, 209);
+            this.ck_kllb_xsmk.Location = new System.Drawing.Point(18, 195);
             this.ck_kllb_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_kllb_xsmk.Name = "ck_kllb_xsmk";
             this.ck_kllb_xsmk.Size = new System.Drawing.Size(72, 16);
@@ -583,6 +584,7 @@
             // 
             // groupBox3
             // 
+            this.groupBox3.Controls.Add(this.comboBox2);
             this.groupBox3.Controls.Add(this.cb_TccleanlinessA);
             this.groupBox3.Controls.Add(this.groupBox_px);
             this.groupBox3.Controls.Add(this.label2);
@@ -602,6 +604,14 @@
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "模块设定";
             // 
+            // comboBox2
+            // 
+            this.comboBox2.FormattingEnabled = true;
+            this.comboBox2.Location = new System.Drawing.Point(404, 104);
+            this.comboBox2.Name = "comboBox2";
+            this.comboBox2.Size = new System.Drawing.Size(121, 20);
+            this.comboBox2.TabIndex = 72;
+            // 
             // cb_TccleanlinessA
             // 
             this.cb_TccleanlinessA.AutoSize = true;
@@ -616,7 +626,7 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(150, 176);
+            this.label2.Location = new System.Drawing.Point(133, 147);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(83, 12);
             this.label2.TabIndex = 68;
@@ -809,5 +819,6 @@
         private System.Windows.Forms.TextBox textBox1;
         private System.Windows.Forms.GroupBox groupBox6;
         private System.Windows.Forms.CheckBox cb_TccleanlinessA;
+        private System.Windows.Forms.ComboBox comboBox2;
     }
 }

+ 17 - 4
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_CleannessA.cs

@@ -86,7 +86,12 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         /// </summary>
         private void BindControl()
         {
-           
+            comboBox2.Items.Clear();
+            comboBox2.Items.Add("饼状图");
+            comboBox2.Items.Add("柱状图");
+            comboBox2.Items.Add("线状图");
+
+
             #region 元素选择
             string[] PeriodicTable = { "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hq", "TI", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Mc", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds", "Rg", "Unb" };
            
@@ -181,6 +186,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_klfw.ToString(), "M_KLFXJG", "index_cb_jzwfl_klfw");//颗粒范围
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_dfl.ToString(), "M_KLFXJG", "b_ck_klcc_dfl");//大分类是否显示
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xfl.ToString(), "M_KLFXJG", "b_ck_klcc_xfl");//小分类是否显示
+
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection.ToString(), "M_KLFXJG", "ParticleSizeGraphicSelection");
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.INCAGraphicSelection.ToString(), "M_KLFXJG", "INCAGraphicSelection");
                 //元素分析结果
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk.ToString(), "M_YSFXJG", "b_ck_ysfx_xsmk");    //是否显示模块
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yxfx_jsfs.ToString(), "M_YSFXJG", "index_cb_yxfx_jsfs");    //计算方式
@@ -380,11 +388,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             m_OTSReport_Export.m_mbszclass.M_SY.str_tb_CKBZ = tb_CKBZ.Text;
             m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_yjwb = tb_yjwb.Text;
             //ResultFile resfile = m_OTSReport_Export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_OTSReport_Export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
-            m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName = comboBox1.Text;
-
+            
+            
             //VDA19
             m_OTSReport_Export.m_mbszclass.M_VDA19.IsVDA19 = cb_TccleanlinessA.Checked;
 
+            m_OTSReport_Export.m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection = comboBox2.SelectedIndex;
+            m_OTSReport_Export.m_mbszclass.M_KLFXJG.INCAGraphicSelection = 0;
+
+
             //颗粒分析结果
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk = ck_klcc_xsmk.Checked;
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt = ck_klcc_xsddt.Checked;
@@ -439,7 +451,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //颗粒分析结果
             ck_klcc_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk;
             ck_klcc_xsddt.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt;
-        
+
+            comboBox2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection;
             //是否显示大分类
             checkBox1.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_dfl;
             //是否显示小分类

+ 67 - 31
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_INCA.Designer.cs

@@ -82,9 +82,12 @@
             this.textBox1 = new System.Windows.Forms.TextBox();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
             this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.button3 = new System.Windows.Forms.Button();
             this.label_delete_Class = new System.Windows.Forms.Label();
             this.delete_Class = new System.Windows.Forms.TextBox();
-            this.button3 = new System.Windows.Forms.Button();
+            this.ck_klcc_xsddt = new System.Windows.Forms.CheckBox();
+            this.comboBox1 = new System.Windows.Forms.ComboBox();
+            this.comboBox2 = new System.Windows.Forms.ComboBox();
             this.groupBox1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.numericMin)).BeginInit();
@@ -134,7 +137,7 @@
             // 
             // button1
             // 
-            this.button1.Location = new System.Drawing.Point(841, 662);
+            this.button1.Location = new System.Drawing.Point(835, 670);
             this.button1.Margin = new System.Windows.Forms.Padding(2);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(70, 30);
@@ -294,7 +297,7 @@
             // checkBox2
             // 
             this.checkBox2.AutoSize = true;
-            this.checkBox2.Location = new System.Drawing.Point(16, 71);
+            this.checkBox2.Location = new System.Drawing.Point(271, 55);
             this.checkBox2.Margin = new System.Windows.Forms.Padding(2);
             this.checkBox2.Name = "checkBox2";
             this.checkBox2.Size = new System.Drawing.Size(84, 16);
@@ -306,7 +309,7 @@
             // checkBox1
             // 
             this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(16, 46);
+            this.checkBox1.Location = new System.Drawing.Point(151, 55);
             this.checkBox1.Margin = new System.Windows.Forms.Padding(2);
             this.checkBox1.Name = "checkBox1";
             this.checkBox1.Size = new System.Drawing.Size(84, 16);
@@ -318,7 +321,7 @@
             // ck_klcc_xsmk
             // 
             this.ck_klcc_xsmk.AutoSize = true;
-            this.ck_klcc_xsmk.Location = new System.Drawing.Point(16, 21);
+            this.ck_klcc_xsmk.Location = new System.Drawing.Point(16, 28);
             this.ck_klcc_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_klcc_xsmk.Name = "ck_klcc_xsmk";
             this.ck_klcc_xsmk.Size = new System.Drawing.Size(72, 16);
@@ -329,7 +332,7 @@
             // 
             // tb_ysfx_xsys
             // 
-            this.tb_ysfx_xsys.Location = new System.Drawing.Point(260, 119);
+            this.tb_ysfx_xsys.Location = new System.Drawing.Point(229, 117);
             this.tb_ysfx_xsys.Margin = new System.Windows.Forms.Padding(2);
             this.tb_ysfx_xsys.Name = "tb_ysfx_xsys";
             this.tb_ysfx_xsys.ReadOnly = true;
@@ -338,7 +341,7 @@
             // 
             // button4
             // 
-            this.button4.Location = new System.Drawing.Point(510, 119);
+            this.button4.Location = new System.Drawing.Point(479, 117);
             this.button4.Margin = new System.Windows.Forms.Padding(2);
             this.button4.Name = "button4";
             this.button4.Size = new System.Drawing.Size(72, 20);
@@ -350,7 +353,7 @@
             // ck_ysfx_xsmk
             // 
             this.ck_ysfx_xsmk.AutoSize = true;
-            this.ck_ysfx_xsmk.Location = new System.Drawing.Point(16, 122);
+            this.ck_ysfx_xsmk.Location = new System.Drawing.Point(16, 119);
             this.ck_ysfx_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_ysfx_xsmk.Name = "ck_ysfx_xsmk";
             this.ck_ysfx_xsmk.Size = new System.Drawing.Size(72, 16);
@@ -363,7 +366,7 @@
             this.lbv_syxt_mblb.CheckBoxes = true;
             this.lbv_syxt_mblb.FullRowSelect = true;
             this.lbv_syxt_mblb.HideSelection = false;
-            this.lbv_syxt_mblb.Location = new System.Drawing.Point(161, 168);
+            this.lbv_syxt_mblb.Location = new System.Drawing.Point(130, 166);
             this.lbv_syxt_mblb.Margin = new System.Windows.Forms.Padding(2);
             this.lbv_syxt_mblb.Name = "lbv_syxt_mblb";
             this.lbv_syxt_mblb.Size = new System.Drawing.Size(236, 121);
@@ -375,7 +378,7 @@
             // label33
             // 
             this.label33.AutoSize = true;
-            this.label33.Location = new System.Drawing.Point(159, 154);
+            this.label33.Location = new System.Drawing.Point(128, 152);
             this.label33.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label33.Name = "label33";
             this.label33.Size = new System.Drawing.Size(101, 12);
@@ -419,7 +422,7 @@
             // ck_kllb_fjzt
             // 
             this.ck_kllb_fjzt.AutoSize = true;
-            this.ck_kllb_fjzt.Location = new System.Drawing.Point(16, 411);
+            this.ck_kllb_fjzt.Location = new System.Drawing.Point(16, 412);
             this.ck_kllb_fjzt.Name = "ck_kllb_fjzt";
             this.ck_kllb_fjzt.Size = new System.Drawing.Size(96, 16);
             this.ck_kllb_fjzt.TabIndex = 57;
@@ -440,7 +443,7 @@
             this.groupBox_px.Controls.Add(this.ParticleList_2);
             this.groupBox_px.Controls.Add(this.ParticleList_1);
             this.groupBox_px.Controls.Add(this.comboBox_p1);
-            this.groupBox_px.Location = new System.Drawing.Point(161, 296);
+            this.groupBox_px.Location = new System.Drawing.Point(130, 298);
             this.groupBox_px.Name = "groupBox_px";
             this.groupBox_px.Size = new System.Drawing.Size(421, 109);
             this.groupBox_px.TabIndex = 54;
@@ -539,7 +542,7 @@
             // ck_kllb_xsmk
             // 
             this.ck_kllb_xsmk.AutoSize = true;
-            this.ck_kllb_xsmk.Location = new System.Drawing.Point(16, 296);
+            this.ck_kllb_xsmk.Location = new System.Drawing.Point(16, 298);
             this.ck_kllb_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_kllb_xsmk.Name = "ck_kllb_xsmk";
             this.ck_kllb_xsmk.Size = new System.Drawing.Size(72, 16);
@@ -550,7 +553,7 @@
             // 
             // button6
             // 
-            this.button6.Location = new System.Drawing.Point(767, 662);
+            this.button6.Location = new System.Drawing.Point(761, 670);
             this.button6.Margin = new System.Windows.Forms.Padding(2);
             this.button6.Name = "button6";
             this.button6.Size = new System.Drawing.Size(70, 30);
@@ -562,7 +565,7 @@
             // ck_jzwzb_surface
             // 
             this.ck_jzwzb_surface.AutoSize = true;
-            this.ck_jzwzb_surface.Location = new System.Drawing.Point(16, 96);
+            this.ck_jzwzb_surface.Location = new System.Drawing.Point(16, 86);
             this.ck_jzwzb_surface.Name = "ck_jzwzb_surface";
             this.ck_jzwzb_surface.Size = new System.Drawing.Size(84, 16);
             this.ck_jzwzb_surface.TabIndex = 0;
@@ -591,6 +594,9 @@
             // 
             // groupBox3
             // 
+            this.groupBox3.Controls.Add(this.comboBox2);
+            this.groupBox3.Controls.Add(this.comboBox1);
+            this.groupBox3.Controls.Add(this.ck_klcc_xsddt);
             this.groupBox3.Controls.Add(this.button8);
             this.groupBox3.Controls.Add(this.label2);
             this.groupBox3.Controls.Add(this.groupBox_px);
@@ -608,14 +614,14 @@
             this.groupBox3.Controls.Add(this.ck_klcc_xsmk);
             this.groupBox3.Location = new System.Drawing.Point(282, 117);
             this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Size = new System.Drawing.Size(703, 434);
+            this.groupBox3.Size = new System.Drawing.Size(703, 444);
             this.groupBox3.TabIndex = 78;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "模块设定";
             // 
             // button8
             // 
-            this.button8.Location = new System.Drawing.Point(596, 119);
+            this.button8.Location = new System.Drawing.Point(565, 117);
             this.button8.Margin = new System.Windows.Forms.Padding(2);
             this.button8.Name = "button8";
             this.button8.Size = new System.Drawing.Size(72, 20);
@@ -627,7 +633,7 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(159, 123);
+            this.label2.Location = new System.Drawing.Point(128, 121);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(89, 12);
             this.label2.TabIndex = 67;
@@ -636,7 +642,7 @@
             // ck_syxt_xsmk
             // 
             this.ck_syxt_xsmk.AutoSize = true;
-            this.ck_syxt_xsmk.Location = new System.Drawing.Point(16, 153);
+            this.ck_syxt_xsmk.Location = new System.Drawing.Point(16, 150);
             this.ck_syxt_xsmk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_syxt_xsmk.Name = "ck_syxt_xsmk";
             this.ck_syxt_xsmk.Size = new System.Drawing.Size(60, 16);
@@ -646,7 +652,7 @@
             // 
             // button7
             // 
-            this.button7.Location = new System.Drawing.Point(915, 662);
+            this.button7.Location = new System.Drawing.Point(909, 670);
             this.button7.Margin = new System.Windows.Forms.Padding(2);
             this.button7.Name = "button7";
             this.button7.Size = new System.Drawing.Size(70, 30);
@@ -658,7 +664,7 @@
             // groupBox5
             // 
             this.groupBox5.Controls.Add(this.textBox1);
-            this.groupBox5.Location = new System.Drawing.Point(282, 559);
+            this.groupBox5.Location = new System.Drawing.Point(282, 567);
             this.groupBox5.Name = "groupBox5";
             this.groupBox5.Size = new System.Drawing.Size(703, 98);
             this.groupBox5.TabIndex = 68;
@@ -680,7 +686,7 @@
             this.groupBox6.Controls.Add(this.button1217);
             this.groupBox6.Location = new System.Drawing.Point(13, 432);
             this.groupBox6.Name = "groupBox6";
-            this.groupBox6.Size = new System.Drawing.Size(263, 225);
+            this.groupBox6.Size = new System.Drawing.Size(263, 233);
             this.groupBox6.TabIndex = 69;
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "图标选择";
@@ -697,6 +703,16 @@
             this.groupBox2.TabStop = false;
             this.groupBox2.Text = "排除分类";
             // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(111, 12);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(44, 23);
+            this.button3.TabIndex = 64;
+            this.button3.Text = "...";
+            this.button3.UseVisualStyleBackColor = true;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
             // label_delete_Class
             // 
             this.label_delete_Class.AutoSize = true;
@@ -714,21 +730,38 @@
             this.delete_Class.Size = new System.Drawing.Size(691, 49);
             this.delete_Class.TabIndex = 62;
             // 
-            // button3
+            // ck_klcc_xsddt
             // 
-            this.button3.Location = new System.Drawing.Point(111, 12);
-            this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(44, 23);
-            this.button3.TabIndex = 64;
-            this.button3.Text = "...";
-            this.button3.UseVisualStyleBackColor = true;
-            this.button3.Click += new System.EventHandler(this.button3_Click);
+            this.ck_klcc_xsddt.AutoSize = true;
+            this.ck_klcc_xsddt.Location = new System.Drawing.Point(31, 55);
+            this.ck_klcc_xsddt.Margin = new System.Windows.Forms.Padding(2);
+            this.ck_klcc_xsddt.Name = "ck_klcc_xsddt";
+            this.ck_klcc_xsddt.Size = new System.Drawing.Size(84, 16);
+            this.ck_klcc_xsddt.TabIndex = 69;
+            this.ck_klcc_xsddt.Text = "颗粒堆叠图";
+            this.ck_klcc_xsddt.UseVisualStyleBackColor = true;
+            // 
+            // comboBox1
+            // 
+            this.comboBox1.FormattingEnabled = true;
+            this.comboBox1.Location = new System.Drawing.Point(403, 53);
+            this.comboBox1.Name = "comboBox1";
+            this.comboBox1.Size = new System.Drawing.Size(121, 20);
+            this.comboBox1.TabIndex = 70;
+            // 
+            // comboBox2
+            // 
+            this.comboBox2.FormattingEnabled = true;
+            this.comboBox2.Location = new System.Drawing.Point(130, 84);
+            this.comboBox2.Name = "comboBox2";
+            this.comboBox2.Size = new System.Drawing.Size(121, 20);
+            this.comboBox2.TabIndex = 71;
             // 
             // OTSReport_Template_INCA
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(995, 699);
+            this.ClientSize = new System.Drawing.Size(995, 704);
             this.Controls.Add(this.groupBox2);
             this.Controls.Add(this.groupBox5);
             this.Controls.Add(this.groupBox6);
@@ -826,5 +859,8 @@
         private System.Windows.Forms.Label label_delete_Class;
         private System.Windows.Forms.TextBox delete_Class;
         private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.CheckBox ck_klcc_xsddt;
+        private System.Windows.Forms.ComboBox comboBox1;
+        private System.Windows.Forms.ComboBox comboBox2;
     }
 }

+ 19 - 63
OTSIncAReportApp/1-UI/OTSReportExport/OTSReport_Template_INCA.cs

@@ -1,4 +1,5 @@
 
+using DevExpress.Utils.Extensions;
 using NPOI.Util;
 using OTSIncAReportApp._1_UI.OTSReportExport;
 using OTSIncAReportApp._1_UI.OTSTemplateDesigner;
@@ -25,8 +26,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         public string FileName = "";
         private string fileName = "";
         Hashtable table;
-        //private string CurrentDatabase = "";
-        //private bool SwitchCategories = false;
         ParticleData fielddata;
 
         private List<string> DeleteClass_Serial = new List<string>();
@@ -50,8 +49,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             BindControl();
             //读取默认值
             LoadControls();
-          
-
             fielddata = new ParticleData(m_OTSReport_Export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_OTSReport_Export.m_ReportApp.m_rstDataMgr.GetWorkingResultId()].FilePath);
             DeleteClass_Serial = m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass_Serial;
         }
@@ -61,7 +58,16 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         /// </summary>
         private void BindControl()
         {
-          
+
+            comboBox1.Items.Clear();
+            comboBox1.Items.Add("饼状图");
+            comboBox1.Items.Add("柱状图");
+            comboBox1.Items.Add("线状图");
+
+            comboBox2.Items.Clear();
+            comboBox2.Items.Add("饼状图");
+            comboBox2.Items.Add("柱状图");
+            comboBox2.Items.Add("线状图");
             #region 元素选择
             string[] PeriodicTable = { "H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb", "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hq", "TI", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th", "Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm", "Mc", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds", "Rg", "Unb" };
             //comboBox_PeriodicTable.Items.AddRange(PeriodicTable);
@@ -69,9 +75,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             sc.AddRange(PeriodicTable);
          
             #endregion
-        
-           
-      
             #region 三元相图
            
         
@@ -154,9 +157,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SY.str_tb_YPBH.ToString(), "M_SY", "str_tb_YPBH");
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SY.str_tb_CKBZ.ToString(), "M_SY", "str_tb_CKBZ");
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SY.b_ck_ypsm.ToString(), "M_SY", "b_ck_ypsm");
-                
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SY.LOGName.ToString(), "M_SY", "LOGName");
-
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName.ToString(), "M_SY", "StandardLibraryName");
                 //页眉页脚
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_ymwb.ToString(), "M_YMYJ", "str_tb_ymwb");
@@ -166,7 +167,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 //颗粒分析结果
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk.ToString(), "M_KLFXJG", "b_ck_klcc_xsmk");//是否显示模块
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt.ToString(), "M_KLFXJG", "b_ck_klcc_xsddt");
-              
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_klfw.ToString(), "M_KLFXJG", "index_cb_klcc_klfw");//颗粒范围
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_cb_jzwfl_xsmk.ToString(), "M_KLFXJG", "b_cb_jzwfl_xsmk");//是否显示该模块
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx.ToString(), "M_KLFXJG", "index_cb_jzwfl_xstx");//选择图像
@@ -175,6 +175,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_klfw.ToString(), "M_KLFXJG", "index_cb_jzwfl_klfw");//颗粒范围
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_dfl.ToString(), "M_KLFXJG", "b_ck_klcc_dfl");//大分类是否显示
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xfl.ToString(), "M_KLFXJG", "b_ck_klcc_xfl");//小分类是否显示
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection.ToString(), "M_KLFXJG", "ParticleSizeGraphicSelection");
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLFXJG.INCAGraphicSelection.ToString(), "M_KLFXJG", "INCAGraphicSelection");
                 //元素分析结果
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk.ToString(), "M_YSFXJG", "b_ck_ysfx_xsmk");    //是否显示模块
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yxfx_jsfs.ToString(), "M_YSFXJG", "index_cb_yxfx_jsfs");    //计算方式
@@ -184,7 +186,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys[i].ToString(), "M_YSFXJG", "list_str_tb_ysfx_xsys", "YS" + i.ToString());
                 }
-
                 //然后判断一下xml中是否还存在之前比现有长度长的节点存在,存在则删除,防止后面再进行读取
                 for (int i = m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Count; i < 1000; i++)
                 {
@@ -208,7 +209,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_yscf_ysxx[i].ToString(), "M_YSFXJG", "list_str_tb_yscf_ysxx", "YS" + i.ToString());
                 }
-
                 //然后判断一下xml中是否还存在之前比现有长度长的节点存在,存在则删除,防止后面再进行读取
                 for (int i = m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_yscf_ysxx.Count; i < 1000; i++)
                 {
@@ -246,12 +246,10 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                         break;
                     }
                 }
-
                 for (int i = 0; i < m_OTSReport_Export.m_mbszclass.M_SYXT.list_lbv_syxt_mblb_index.Count; i++)                              //三元相图模板 list 索引
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SYXT.list_lbv_syxt_mblb_index[i].ToString(), "M_SYXT", "list_lbv_syxt_mblb_index", "MBIndex" + i.ToString());
                 }
-
                 //然后判断一下xml中是否还存在之前比现有长度长的节点存在,存在则删除,防止后面再进行读取
                 for (int i = m_OTSReport_Export.m_mbszclass.M_SYXT.list_lbv_syxt_mblb_index.Count; i < 1000; i++)
                 {
@@ -276,7 +274,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_tb_lllb_sxys[i].ToString(), "M_KLLBXX", "list_str_tb_lllb_sxys", "YS" + i.ToString());
                 }
-
                 //然后判断一下xml中是否还存在之前比现有长度长的节点存在,存在则删除,防止后面再进行读取
                 for (int i = m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_tb_lllb_sxys.Count; i < 1000; i++)
                 {
@@ -291,7 +288,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                         break;
                     }
                 }
-
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString(), "M_KLLBXX", "str_cb_kllb_sort_p1");//颗粒排序表列第一个可选参数(string)
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p1.ToString(), "M_KLLBXX", "index_cb_kllb_sort_p1");//颗粒排序表列第一个可选参数(index)
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p2.ToString(), "M_KLLBXX", "str_cb_kllb_sort_p2");//颗粒排序表列第二个可选参数(string)
@@ -318,8 +314,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                         break;
                     }
                 }
-                //xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass.ToString(), "M_KLLBXX", "str_kllb_DeleteClass");
-
                 for (int i = 0; i < m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Count; i++)                              //去除元素列表
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass[i].ToString(), "M_KLLBXX", "list_str_kllb_DeleteClass", "YS" + i.ToString());
@@ -338,7 +332,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                         break;
                     }
                 }
-
                 for (int i = 0; i < m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass_Serial.Count; i++)                              //去除元素列表
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass_Serial[i].ToString(), "M_KLLBXX", "list_str_kllb_DeleteClass_Serial", "YS" + i.ToString());
@@ -367,10 +360,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 {
                     xmlutil.Write(m_OTSReport_Export.m_mbszclass.list_str_MainPriority[i].ToString(), "whole", "list_str_MainPriority", "YS" + i.ToString());
                 }
-                
-                
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_ljb, "M_SYXT", "str_cb_syxt_ljb");
-
                 //备注
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_DZ.Notes, "M_DZ", "Notes");
             }
@@ -379,32 +369,14 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         private void SaveTemplateParameters()
         {
             m_OTSReport_Export.m_mbszclass.M_DZ.Notes = textBox1.Text;
-
             string[] after = tb_ysfx_xsys.Text.Split(new char[] { ',' });
             m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Clear();
             for (int i = 0; i < after.Length; i++)
             {
                 m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Add(after[i]);
             }
-            //拆分,物质分类
-            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Clear();
-            //for (int i = 0; i < delete_Class.Text.Split(',').Length; i++)
-            //{
-            //    if (delete_Class.Text.Split(',')[i] != "")
-            //        m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Add(delete_Class.Text.Split(',')[i]);
-            //}
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass_Serial.Clear();
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass_Serial = DeleteClass_Serial.Copy();
-
-            //主要优先显示
-            //m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Clear();
-            //string[] MainPriority = textBox_zypxss.Text.Split(new char[] { ',' });
-            //for (int i = 0; i < MainPriority.Length; i++)
-            //{
-            //    if (textBox_zypxss.Text.Split(',')[i] != "")
-            //        m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Add(MainPriority[i]);
-            //}
-
             m_OTSReport_Export.m_mbszclass.M_SY.LOGName = fileName;
             //首页
             m_OTSReport_Export.m_mbszclass.M_SY.str_tb_ZBT = tb_ZBT.Text;
@@ -412,23 +384,20 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             m_OTSReport_Export.m_mbszclass.M_SY.str_tb_YPBH = tb_YPBH.Text;
             m_OTSReport_Export.m_mbszclass.M_SY.str_tb_CKBZ = tb_CKBZ.Text;
             m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_yjwb = tb_yjwb.Text;
-
-            //ResultFile resfile = m_OTSReport_Export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_OTSReport_Export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
-            //m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName = comboBox1.Text;
             //颗粒分析结果
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk = ck_klcc_xsmk.Checked;
-            m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt = false;
+            m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt = ck_klcc_xsddt.Checked;
             //是否显示大分类
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_dfl = checkBox1.Checked;
             //是否显示小分类
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xfl = checkBox2.Checked;
-           
+            m_OTSReport_Export.m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection = comboBox1.SelectedIndex;
+            m_OTSReport_Export.m_mbszclass.M_KLFXJG.INCAGraphicSelection=comboBox2.SelectedIndex;
             // 元素分析结果
             m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk = ck_ysfx_xsmk.Checked;
             m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_tb_ysfx_xsys = tb_ysfx_xsys.Text;//显示元素
             //三元相图
             m_OTSReport_Export.m_mbszclass.M_SYXT.b_ck_syxt_xsmk = ck_syxt_xsmk.Checked;
-          
             //获取勾选的项
             m_OTSReport_Export.m_mbszclass.M_SYXT.list_lbv_syxt_mblb.Clear();
             m_OTSReport_Export.m_mbszclass.M_SYXT.list_lbv_syxt_mblb_index.Clear();
@@ -453,22 +422,14 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2 = comboBox_p2.SelectedIndex;
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p3 = comboBox_p3.Text;//颗粒列表行第三个字段的可选参数
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3 = comboBox_p3.SelectedIndex;
-           
             //夹杂物占比
             m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface = ck_jzwzb_surface.Checked;//夹杂物占比表
- 
             //去除信息
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_qcys = tb_RemoveElements.Text;//去除不要的物质元素
-            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass = delete_Class.Text;//去除不要的物质分类
-            //m_OTSReport_Export.m_mbszclass.str_MainPriority = textBox_zypxss.Text;//主要排序
-   
-        
         }
 
         private void LoadControls()
         {
-           
-          
             //首页
             tb_ZBT.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_ZBT;
             tb_FBT.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_FBT;
@@ -479,17 +440,18 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             tb_yjwb.Text = m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_yjwb;
             //颗粒分析结果
             ck_klcc_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk;
-        
+            ck_klcc_xsddt.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt;
             //是否显示大分类
             checkBox1.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_dfl;
             //是否显示小分类
             checkBox2.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xfl;
+            comboBox1.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection;
+            comboBox2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.INCAGraphicSelection;
             //元素分析结果
             ck_ysfx_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk;
             tb_ysfx_xsys.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_tb_ysfx_xsys;//显示元素
             //三元相图
             ck_syxt_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_SYXT.b_ck_syxt_xsmk;
-           
             //获取勾选的项
             for (int i = 0; i < lbv_syxt_mblb.Items.Count; i++)
             {
@@ -510,7 +472,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             comboBox_p1.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p1;
             comboBox_p2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2;
             comboBox_p3.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3;
-
             string str = "";
             for (int i = 0; i < m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass.Count; i++)
             {
@@ -523,15 +484,10 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     str = str + "," + m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_DeleteClass[i];
                 }
             }
-
             delete_Class.Text = str;
-            //textBox_zypxss.Text = m_OTSReport_Export.m_mbszclass.str_MainPriority;
-          
             //夹杂物占比
             ck_jzwzb_surface.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface;//夹杂物占比表
-        
             numericMin.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_int_kllb_number.ToString();
-
             textBox1.Text = m_OTSReport_Export.m_mbszclass.M_DZ.Notes;
             LoadingIcon();
         }

+ 267 - 151
OTSIncAReportApp/1-UI/OTSReportExport/Template/DataTemplate.cs

@@ -933,7 +933,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
         /// </summary>
         /// <param name="a_pieSeriesClass">大分类</param>
         /// <param name="a_pieSeries">小分类</param>
-        public void setParticleSizeTable(bool a_pieSeriesClass, bool a_pieSeries, bool isStacking)
+        public void setParticleSizeTable(c_TemplateClass m_mbszclass)
         {
             //if (m_ReportApp.m_RptConfigFile.Systype != OTS_SysType_ID.IncA)
 
@@ -1002,18 +1002,48 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             }
             
 
-            if (isStacking)
+            if (m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt)
             {
                 HistogramChart(particleList);
             }
 
-            if (a_pieSeriesClass || a_pieSeries)
+            if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl || m_mbszclass.M_KLFXJG.b_ck_klcc_xfl)
             {
                 XRPageBreak();
             }
             xrChart_ParticelSizeCalss.Visible = false;
-            #region 大分类chart图
-            if (a_pieSeriesClass&& chartmax.Rows.Count>0)
+
+            ViewType viewType;
+            DefaultBoolean VisDefaultBoolean;
+            string Pat;
+            string CPat;
+            if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection==0)
+            {
+                viewType = ViewType.Pie;
+                Pat = "{A}";
+                CPat = "{A}";
+                VisDefaultBoolean = DefaultBoolean.True;
+            }
+            else if(m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 1)
+            {
+                viewType = ViewType.Bar;
+                Pat = "{V}";
+                CPat = "{V}";
+                VisDefaultBoolean = DefaultBoolean.False;
+            }
+            else /*if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 2)*/
+            {
+                viewType = ViewType.Line;
+                Pat = "{V}";
+                CPat = "{V}";
+                VisDefaultBoolean = DefaultBoolean.False;
+            }
+
+
+
+
+                #region 大分类chart图
+                if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl && chartmax.Rows.Count>0)
             {
                 xrChart_ParticelSizeCalss.Visible = true;
                 xrLabel_size_IconQuestion_Class.Visible = true;
@@ -1021,29 +1051,23 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 NeueStartposition = xrLabel_size_IconQuestion_Class.LocationF.Y + xrLabel_size_IconQuestion_Class.SizeF.Height + 10;
 
                 // 实例化饼图对象
-                Series pieSeriesClass = new Series("尺寸分类", ViewType.Pie);
-                pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
-                // 项目名称
-                pieSeriesClass.ArgumentDataMember = "name";
-                pieSeriesClass.ValueScaleType = ScaleType.Numerical;
-                //取值字段
-                pieSeriesClass.ValueDataMembers.AddRange(new string[] { "quantity" });
-                (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
-                
-                //设置数据源
-                pieSeriesClass.DataSource = chartmax;
-                pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
+                Series pieSeriesClass = new Series("尺寸分类", viewType);
 
-                pieSeriesClass.Label.TextPattern = "{A}";
-                // 饼图空间添加 新建的饼图对象
+                for (int i=0;i< chartmax.Rows.Count;i++)
+                {
+                    string name = chartmax.Rows[i]["name"].ToString();
+                    double Cunt = Convert.ToDouble(chartmax.Rows[i]["quantity"]);
+                    pieSeriesClass.Points.Add(new SeriesPoint(name, Cunt));
+                }
+                pieSeriesClass.LabelsVisibility = DefaultBoolean.True;
+                pieSeriesClass.Label.TextPattern = Pat;
+                if(m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
+                {
+                    pieSeriesClass.LabelsVisibility = DefaultBoolean.False;
+                }
                 xrChart_ParticelSizeCalss.Series.Add(pieSeriesClass);
-
-                
-                //右上角分组视图
-                this.xrChart_ParticelSizeCalss.Legend.MarkerSize = new System.Drawing.Size(20, 20);
-                this.xrChart_ParticelSizeCalss.Legend.TextOffset = 5;
-                this.xrChart_ParticelSizeCalss.Legend.VerticalIndent = 5;
-                this.xrChart_ParticelSizeCalss.Legend.Border.Color = Color.Red;//红色边框
+                xrChart_ParticelSizeCalss.Legend.Visibility = VisDefaultBoolean;
+           
                 xrChart_ParticelSizeCalss.LocationF = new PointF(30f, NeueStartposition);
                 NeueStartposition = xrChart_ParticelSizeCalss.LocationF.Y + xrChart_ParticelSizeCalss.SizeF.Height+1 ;
             }
@@ -1051,7 +1075,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
             #region 细分chart图
 
             xrChart_ParticelSizeSubdivision.Visible = false;
-            if (a_pieSeries && surface_dt2.Rows.Count>0)
+            if (m_mbszclass.M_KLFXJG.b_ck_klcc_xfl && surface_dt2.Rows.Count>0)
             {
                 DataTable data = surface_dt2.Clone();
                 for (int i=0;i< surface_dt2.Rows.Count;i++)
@@ -1068,31 +1092,24 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
                 xrLabel_size_IconQuestion_Subdivision.Visible = true;
                 xrLabel_size_IconQuestion_Subdivision.LocationF = new PointF(xrLabel_size_IconQuestion_Subdivision.LocationF.X, NeueStartposition);
                 NeueStartposition = xrLabel_size_IconQuestion_Subdivision.LocationF.Y + xrLabel_size_IconQuestion_Subdivision.SizeF.Height + 1;
-                // 实例化饼图对象
-                Series pieSeries = new Series("颗粒尺寸细化分类", ViewType.Pie);
-                pieSeries.ArgumentScaleType = ScaleType.Qualitative;
-                // 项目名称
-                pieSeries.ArgumentDataMember = "Name";
-                pieSeries.ValueScaleType = ScaleType.Numerical;
-                //取值字段
-                pieSeries.ValueDataMembers.AddRange(new string[] { "total" });
-                (pieSeries.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
-                //显示百分比
-                //pieSeries.PointOptions.PointView = PointView.ArgumentAndValues;
-                //pieSeries.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
-                //设置数据源
-                pieSeries.DataSource = dt_subdivde_dt;
-                pieSeries.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
-                // 饼图空间添加 新建的饼图对象
-
-
-                pieSeries.Label.TextPattern = "{A}";
+
+                Series pieSeries = new Series("颗粒尺寸细化分类", viewType);
+
+                for (int i = 0; i < dt_subdivde_dt.Rows.Count; i++)
+                {
+                    string name = dt_subdivde_dt.Rows[i]["name"].ToString();
+                    double Cunt = Convert.ToDouble(dt_subdivde_dt.Rows[i]["total"]);
+                    pieSeries.Points.Add(new SeriesPoint(name, Cunt));
+                }
+                pieSeries.LabelsVisibility = DefaultBoolean.True;
+                pieSeries.Label.TextPattern = CPat;
+                if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
+                {
+                    pieSeries.LabelsVisibility = DefaultBoolean.False;
+                }
                 xrChart_ParticelSizeSubdivision.Series.Add(pieSeries);
-                //右上角分组视图
-                this.xrChart_ParticelSizeSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
-                this.xrChart_ParticelSizeSubdivision.Legend.TextOffset = 5;
-                this.xrChart_ParticelSizeSubdivision.Legend.VerticalIndent = 5;
-                this.xrChart_ParticelSizeSubdivision.Legend.Border.Color = Color.Red;//红色边框
+                xrChart_ParticelSizeSubdivision.Legend.Visibility = VisDefaultBoolean;
+           
                 xrChart_ParticelSizeSubdivision.LocationF = new PointF(30f, NeueStartposition);
                 NeueStartposition = xrChart_ParticelSizeSubdivision.LocationF.Y + xrChart_ParticelSizeSubdivision.SizeF.Height + 10;
             }
@@ -1487,123 +1504,222 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
         /// 设置插入夹杂物面积比图像
         /// </summary>
         /// <param name="TemplateClass"></param>
-        public void set_incaPIC_classify()
+        public void set_incaPIC_classify(c_TemplateClass m_mbszclass)
         {
-            InclusionProportion inclusionProportion = new InclusionProportion();
-            DataTable data = inclusionProportion.Get_incaPIC_classify(dev_sczs_text.Text, TemplateClass, m_otsreport_export);
-            if (data.Rows.Count == 0)
+            ViewType viewType;
+            DefaultBoolean VisDefaultBoolean;
+            string Pat;
+            string CPat;
+            if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 0)
             {
-                return;
+                viewType = ViewType.Pie;
+                Pat = "{A}";
+                CPat = "{A}";
+                VisDefaultBoolean = DefaultBoolean.True;
+            }
+            else if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 1)
+            {
+                viewType = ViewType.Bar;
+                Pat = "{V}";
+                CPat = "{V}";
+                VisDefaultBoolean = DefaultBoolean.False;
+            }
+            else /*if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 2)*/
+            {
+                viewType = ViewType.Line;
+                Pat = "{V}";
+                CPat = "{V}";
+                VisDefaultBoolean = DefaultBoolean.False;
             }
 
-            xrLabel_inca_pic_class.Visible = true;
-            xrLabel_inca_pic_class.LocationF = new PointF(xrLabel_inca_pic_class.LocationF.X, NeueStartposition);
-            NeueStartposition = xrLabel_inca_pic_class.LocationF.Y + xrLabel_inca_pic_class.SizeF.Height + 1;
-            
-            for (int i = 0; i < data.Rows.Count; i++)
+
+            if (m_mbszclass.M_KLFXJG.b_ck_klcc_dfl)
             {
-                if (data.Rows[i]["Class"].ToString() == "Other")
+                InclusionProportion inclusionProportion = new InclusionProportion();
+                DataTable data = inclusionProportion.Get_incaPIC_classify(dev_sczs_text.Text, TemplateClass, m_otsreport_export);
+                if (data.Rows.Count == 0)
+                {
+                    return;
+                }
+
+                xrLabel_inca_pic_class.Visible = true;
+                xrLabel_inca_pic_class.LocationF = new PointF(xrLabel_inca_pic_class.LocationF.X, NeueStartposition);
+                NeueStartposition = xrLabel_inca_pic_class.LocationF.Y + xrLabel_inca_pic_class.SizeF.Height + 1;
+
+                for (int i = 0; i < data.Rows.Count; i++)
                 {
-                    data.Rows[i].Delete();
+                    if (data.Rows[i]["Class"].ToString() == "Other")
+                    {
+                        data.Rows[i].Delete();
+                    }
+                }
+                data.AcceptChanges();
+                DataView dv = data.DefaultView;
+                dv.Sort = "Cunt DESC";
+                DataTable dt_data = dv.ToTable();
+                for (int i = 0; i < dt_data.Rows.Count; i++)
+                {
+                    dt_data.Rows[i]["Class"] = subscript.Getsubscriptstring(dt_data.Rows[i]["Class"].ToString());
+                }
+
+                // 实例化饼图对象
+                Series pieSeriesClass = new Series("夹杂物面积比分类", viewType);
+
+                for (int i = 0; i < dt_data.Rows.Count; i++)
+                {
+                    string name = dt_data.Rows[i]["Class"].ToString();
+                    double Cunt = Convert.ToDouble(dt_data.Rows[i]["Cunt"]);
+                    pieSeriesClass.Points.Add(new SeriesPoint(name, Cunt));
+                }
+                pieSeriesClass.LabelsVisibility = DefaultBoolean.True;
+                pieSeriesClass.Label.TextPattern = Pat;
+                if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
+                {
+                    pieSeriesClass.LabelsVisibility = DefaultBoolean.False;
                 }
+                xrChart_incaClass.Series.Add(pieSeriesClass);
+                xrChart_incaClass.Legend.Visibility = VisDefaultBoolean;
+
+
+                //// 实例化饼图对象
+                //Series pieSeriesClass = new Series("夹杂物面积比分类", ViewType.Pie);
+                //pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
+                //// 项目名称
+                //pieSeriesClass.ArgumentDataMember = "Class";
+                //pieSeriesClass.ValueScaleType = ScaleType.Numerical;
+                ////取值字段
+                //pieSeriesClass.ValueDataMembers.AddRange(new string[] { "Cunt" });
+                //(pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
+                ////显示百分比
+                ////pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
+                ////pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
+                ////设置数据源
+                //pieSeriesClass.DataSource = dt_data;
+                //pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
+
+                //pieSeriesClass.Label.TextPattern = "{A}";
+                //// 饼图空间添加 新建的饼图对象
+                //xrChart_incaClass.Series.Add(pieSeriesClass);
+                ////右上角分组视图
+                //this.xrChart_incaClass.Legend.MarkerSize = new System.Drawing.Size(20, 20);
+                //this.xrChart_incaClass.Legend.TextOffset = 5;
+                //this.xrChart_incaClass.Legend.VerticalIndent = 5;
+                //this.xrChart_incaClass.Legend.Border.Color = Color.Red;//红色边框
+                xrChart_incaClass.Visible = true;
+                xrChart_incaClass.LocationF = new PointF(30f, NeueStartposition);
+                NeueStartposition = xrChart_incaClass.LocationF.Y + xrChart_incaClass.SizeF.Height + 1;
             }
-            data.AcceptChanges();
-            DataView dv = data.DefaultView;
-            dv.Sort = "Cunt DESC";
-            DataTable dt_data = dv.ToTable();
-            for (int i = 0; i < dt_data.Rows.Count; i++)
-            {
-                dt_data.Rows[i]["Class"] = subscript.Getsubscriptstring(dt_data.Rows[i]["Class"].ToString());
-            }
-            // 实例化饼图对象
-            Series pieSeriesClass = new Series("夹杂物面积比分类", ViewType.Pie);
-            pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
-            // 项目名称
-            pieSeriesClass.ArgumentDataMember = "Class";
-            pieSeriesClass.ValueScaleType = ScaleType.Numerical;
-            //取值字段
-            pieSeriesClass.ValueDataMembers.AddRange(new string[] { "Cunt" });
-            (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
-            //显示百分比
-            //pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
-            //pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
-            //设置数据源
-            pieSeriesClass.DataSource = dt_data;
-            pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
-
-            pieSeriesClass.Label.TextPattern = "{A}";
-            // 饼图空间添加 新建的饼图对象
-            xrChart_incaClass.Series.Add(pieSeriesClass);
-            //右上角分组视图
-            this.xrChart_incaClass.Legend.MarkerSize = new System.Drawing.Size(20, 20);
-            this.xrChart_incaClass.Legend.TextOffset = 5;
-            this.xrChart_incaClass.Legend.VerticalIndent = 5;
-            this.xrChart_incaClass.Legend.Border.Color = Color.Red;//红色边框
-            xrChart_incaClass.Visible = true;
-            xrChart_incaClass.LocationF = new PointF(30f, NeueStartposition);
-            NeueStartposition = xrChart_incaClass.LocationF.Y + xrChart_incaClass.SizeF.Height + 1;
+       
         }
-        public void set_incaPIC_subdivision()
+        public void set_incaPIC_subdivision(c_TemplateClass m_mbszclass)
         {
-            InclusionProportion inclusionProportion = new InclusionProportion();
-            DataTable data = inclusionProportion.Get_incaPIC_subdivision(TemplateClass, m_otsreport_export);
-            if(data.Rows.Count==0)
+            ViewType viewType;
+            DefaultBoolean VisDefaultBoolean;
+            string Pat;
+            string CPat;
+            if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 0)
             {
-                return;
+                viewType = ViewType.Pie;
+                Pat = "{A}";
+                CPat = "{A}";
+                VisDefaultBoolean = DefaultBoolean.True;
             }
-            xrChart_incaSubdivision.Visible = true;
-            xrLabel_inca_pic_subdivision.Visible = true;
-            xrLabel_inca_pic_subdivision.LocationF = new PointF(xrLabel_inca_pic_subdivision.LocationF.X, NeueStartposition);
-            NeueStartposition = xrLabel_inca_pic_subdivision.LocationF.Y + xrLabel_inca_pic_subdivision.Height + 1;
-           
+            else if (m_mbszclass.M_KLFXJG.INCAGraphicSelection == 1)
+            {
+                viewType = ViewType.Bar;
+                Pat = "{V}";
+                CPat = "{V}";
+                VisDefaultBoolean = DefaultBoolean.False;
+            }
+            else /*if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 2)*/
+            {
+                viewType = ViewType.Line;
+                Pat = "{V}";
+                CPat = "{V}";
+                VisDefaultBoolean = DefaultBoolean.False;
+            }
+
+            if (m_mbszclass.M_KLFXJG.b_ck_klcc_xfl)
+            {
+                InclusionProportion inclusionProportion = new InclusionProportion();
+                DataTable data = inclusionProportion.Get_incaPIC_subdivision(TemplateClass, m_otsreport_export);
+                if (data.Rows.Count == 0)
+                {
+                    return;
+                }
+                xrChart_incaSubdivision.Visible = true;
+                xrLabel_inca_pic_subdivision.Visible = true;
+                xrLabel_inca_pic_subdivision.LocationF = new PointF(xrLabel_inca_pic_subdivision.LocationF.X, NeueStartposition);
+                NeueStartposition = xrLabel_inca_pic_subdivision.LocationF.Y + xrLabel_inca_pic_subdivision.Height + 1;
 
 
 
-            for (int i = 0; i < data.Rows.Count; i++)
-            {
-                if (data.Rows[i]["TypeName"].ToString() == "Not Identified")
+
+                for (int i = 0; i < data.Rows.Count; i++)
                 {
-                    data.Rows[i].Delete();
+                    if (data.Rows[i]["TypeName"].ToString() == "Not Identified")
+                    {
+                        data.Rows[i].Delete();
+                    }
                 }
-            }
-            data.AcceptChanges();
-
-            DataView dv = data.DefaultView;
-            dv.Sort = "con DESC";
-            DataTable dt_data = dv.ToTable();
-
-            for (int i = 0; i < dt_data.Rows.Count; i++)
-            {
-                dt_data.Rows[i]["TypeName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["TypeName"].ToString());
-                dt_data.Rows[i]["GroupName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["GroupName"].ToString());
-            }
-            // 实例化饼图对象
-            Series pieSeriesClass = new Series("夹杂物面积比细分类", ViewType.Pie);
-            pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
-            // 项目名称
-            pieSeriesClass.ArgumentDataMember = "TypeName";
-            pieSeriesClass.ValueScaleType = ScaleType.Numerical;
-            //取值字段
-            pieSeriesClass.ValueDataMembers.AddRange(new string[] { "con" });
-            (pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
-            //显示百分比
-            //pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
-            //pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
-            //设置数据源
-            pieSeriesClass.DataSource = dt_data;
-            pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
-
-            pieSeriesClass.Label.TextPattern = "{A}";
-            // 饼图空间添加 新建的饼图对象
-            xrChart_incaSubdivision.Series.Add(pieSeriesClass);
-            //右上角分组视图
-            this.xrChart_incaSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
-            this.xrChart_incaSubdivision.Legend.TextOffset = 5;
-            this.xrChart_incaSubdivision.Legend.VerticalIndent = 5;
-            this.xrChart_incaSubdivision.Legend.Border.Color = Color.Red;//红色边框
-
-            xrChart_incaSubdivision.LocationF = new PointF(30f, NeueStartposition);
-            NeueStartposition = xrChart_incaSubdivision.LocationF.Y + xrChart_incaSubdivision.Height + 1;
+                data.AcceptChanges();
+
+                DataView dv = data.DefaultView;
+                dv.Sort = "con DESC";
+                DataTable dt_data = dv.ToTable();
+
+                for (int i = 0; i < dt_data.Rows.Count; i++)
+                {
+                    dt_data.Rows[i]["TypeName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["TypeName"].ToString());
+                    dt_data.Rows[i]["GroupName"] = subscript.Getsubscriptstring(dt_data.Rows[i]["GroupName"].ToString());
+                }
+
+                // 实例化饼图对象
+                Series pieSeriesClass = new Series("夹杂物面积比细分类", viewType);
+
+                for (int i = 0; i < dt_data.Rows.Count; i++)
+                {
+                    string name = dt_data.Rows[i]["TypeName"].ToString();
+                    double Cunt = Convert.ToDouble(dt_data.Rows[i]["con"]);
+                    pieSeriesClass.Points.Add(new SeriesPoint(name, Cunt));
+                }
+                pieSeriesClass.LabelsVisibility = DefaultBoolean.True;
+                pieSeriesClass.Label.TextPattern = Pat;
+                if (m_mbszclass.M_KLFXJG.ParticleSizeGraphicSelection == 0)
+                {
+                    pieSeriesClass.LabelsVisibility = DefaultBoolean.False;
+                }
+                xrChart_incaSubdivision.Series.Add(pieSeriesClass);
+                xrChart_incaSubdivision.Legend.Visibility = VisDefaultBoolean;
+                //// 实例化饼图对象
+                //Series pieSeriesClass = new Series("夹杂物面积比细分类", ViewType.Pie);
+                //pieSeriesClass.ArgumentScaleType = ScaleType.Qualitative;
+                //// 项目名称
+                //pieSeriesClass.ArgumentDataMember = "TypeName";
+                //pieSeriesClass.ValueScaleType = ScaleType.Numerical;
+                ////取值字段
+                //pieSeriesClass.ValueDataMembers.AddRange(new string[] { "con" });
+                //(pieSeriesClass.Label as PieSeriesLabel).Position = PieSeriesLabelPosition.Inside;
+                ////显示百分比
+                ////pieSeriesClass.PointOptions.PointView = PointView.ArgumentAndValues;
+                ////pieSeriesClass.PointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
+                ////设置数据源
+                //pieSeriesClass.DataSource = dt_data;
+                //pieSeriesClass.LabelsVisibility = DevExpress.Utils.DefaultBoolean.False;
+
+                //pieSeriesClass.Label.TextPattern = "{A}";
+                //// 饼图空间添加 新建的饼图对象
+                //xrChart_incaSubdivision.Series.Add(pieSeriesClass);
+                ////右上角分组视图
+                //this.xrChart_incaSubdivision.Legend.MarkerSize = new System.Drawing.Size(20, 20);
+                //this.xrChart_incaSubdivision.Legend.TextOffset = 5;
+                //this.xrChart_incaSubdivision.Legend.VerticalIndent = 5;
+                //this.xrChart_incaSubdivision.Legend.Border.Color = Color.Red;//红色边框
+
+                xrChart_incaSubdivision.LocationF = new PointF(30f, NeueStartposition);
+                NeueStartposition = xrChart_incaSubdivision.LocationF.Y + xrChart_incaSubdivision.Height + 1;
+            }
+      
         }
 
         public static Color FromHex(string hex)