瀏覽代碼

更改报告导出模板-颗粒列表模块中可选择参数参数导出进行排序

zhangjiaxin 3 年之前
父節點
當前提交
9dea3db160

+ 5 - 3
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage.cs

@@ -1497,8 +1497,10 @@ namespace OTSIncAReportGrids
         /// <summary>
         /// 在帧图上标记颗粒的位置矩形,并保存到FIELD_FILES_MARK文件夹中
         /// </summary>
-        public void SaveMarkParticleRectangleOnFieldFile(DataTable dataTable ,out List<string> vs , out DataTable dt_FIeld)
+        public void SaveMarkParticleRectangleOnFieldFile(string str_resultPath, DataTable dataTable ,out List<string> vs , out DataTable dt_FIeld)
         {
+            Init();
+
             List<string> maxlength = new List<string>();
             for (int i=0;i< dataTable.Rows.Count;i++)
             {
@@ -1516,8 +1518,8 @@ namespace OTSIncAReportGrids
             }
             List<string> max_list = maxlength.Distinct().ToList();
 
-            string str_path_FIELD_FILES = result.FilePath + "\\FIELD_FILES\\";
-            string str_path_FIELD_FILES_MARK = result.FilePath + "\\FIELD_FILES_MARK\\";
+            string str_path_FIELD_FILES = str_resultPath + "\\FIELD_FILES\\";
+            string str_path_FIELD_FILES_MARK = str_resultPath + "\\FIELD_FILES_MARK\\";
             int intQuantity = 0;
             //List<string> vs = new List<string>();
             dt_FIeld = new DataTable();

+ 7 - 1
OTSIncAReportApp/1-UI/OTSDisplaySourceGridData/OTSSampleReportInfo/OTSSampleReportInfo.cs

@@ -179,7 +179,13 @@ namespace OTSIncAReportApp.OTSSampleReportInfo
         /// 三元相图模板
         /// </summary>
         TRIO_CHART_TYPE = 15,
-        MAX = 16
+        MAX = 16,
+        /// <summary>
+        /// 颗粒列表
+        /// </summary>
+            PARTICE_LIST=17
+
+
     };
     public enum  IMAGEGRID_DIS_TYPE
     {

+ 131 - 182
OTSIncAReportApp/1-UI/OTSTemplateDesigner/Export_ReportTemplate.cs

@@ -12,6 +12,8 @@ using System.Drawing;
 using System.IO;
 using System.Linq;
 using System.Windows.Forms;
+using System.Xml;
+using static OTSIncAReportApp.OTSReport_Export;
 
 namespace OTSIncAReportApp.OTSTemplateDesigner
 {
@@ -24,6 +26,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
         DataTable m_bt_DBData = new DataTable();
         List<string> TemplateList;
+        FieldData fieldData;
+        //测量结果
+        ResultFile result = null;
         #endregion
 
         #region 构造函数
@@ -47,6 +52,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             }
 
             m_list_dt = new List<DataTable>();
+
+           
         }
         public Export_ReportTemplate()
         {
@@ -111,17 +118,16 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         }
         #endregion
 
-        #region 一次性读取数据所需要的数据
-        private void GetSTL(out DataTable  data)
+        #region 读取标准库所需要的数据
+        private void GetSTL(string str ,out DataTable  data)
         {
             DataTable dt = new DataTable();
             dt.Columns.Add("TypeId");
             dt.Columns.Add("Hardness", typeof(double));
             dt.Columns.Add("Hardness_detailed");
-            ResultFile resfile = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
-            string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
             
-            OTSSysMgrTools.SqLiteHelper sh = new OTSSysMgrTools.SqLiteHelper("data source='" + System.IO.Directory.GetCurrentDirectory()+ "\\Config\\SysData\\"+ str_libraryName + ".db" + "'");
+            
+            OTSSysMgrTools.SqLiteHelper sh = new OTSSysMgrTools.SqLiteHelper("data source='" + System.IO.Directory.GetCurrentDirectory()+ "\\Config\\SysData\\"+ str + ".db" + "'");
             DataTable dt_stl= sh.ExecuteQuery("select * from ClassifySTD");
             for (int i=0;i< dt_stl.Rows.Count;i++)
             {
@@ -345,7 +351,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             #endregion
 
-            #region 插入-前20颗粒部份
+            #region 插入20颗粒部份
            
             for (int i_row = 0; i_row < dt_ParticlesGridDevidePage.Rows.Count; i_row++)
             {
@@ -477,7 +483,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     dt_GridDevidePage.Rows.Add(dt_ParticlesGridDevidePage.Rows[i].ItemArray);
                 }
             }
-            m_otsreport_export.m_ReportApp.im_ParticlesGridDevidePage.SaveMarkParticleRectangleOnFieldFile(dt_GridDevidePage, out vs ,out data);
+            m_otsreport_export.m_ReportApp.im_ParticlesGridDevidePage.SaveMarkParticleRectangleOnFieldFile(str_resultPath,dt_GridDevidePage, out vs ,out data);
             string str_path_FIELD_FILES_MARK = str_resultPath + "\\FIELD_FILES_MARK\\";
             DirectoryInfo theFolder = new DirectoryInfo(str_path_FIELD_FILES_MARK);
             if (theFolder.Exists)
@@ -518,7 +524,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             #endregion
 
-            #region 插入-前20颗粒外的颗粒
+            #region 插入-帧图副表部分
             for (int i_row = 0; i_row < dt_ParticlesGridDevidePage.Rows.Count; i_row++)
             {
                 if (dt_ParticlesGridDevidePage.Rows[i_row]["element"].ToString() == "")
@@ -614,7 +620,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 
             }
             #endregion
-            FrameGraphParticleTable(dt_ParticlesGridDevidePage, str_resultPath, fielddata, DT_field_dt);
+            //FrameGraphParticleTable(dt_ParticlesGridDevidePage, str_resultPath, fielddata, DT_field_dt);
             m_list_dt.Add(DT_field_dt_copy);
             m_list_dt.Add(DT_Largest_frame);
             m_list_dt.Add(DT_Largest20);
@@ -622,10 +628,8 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             return true;
         }
 
-        public bool InsertReportTemplateTable_ParticlesGridDevidePage_CleanlinessA()
+        public bool InsertReportTemplateTable_ParticlesGridDevidePage_CleanlinessA(MBSZClass m_mbszclass)
         {
-            DataTable dt_stl = new DataTable();
-            GetSTL(out dt_stl);
 
             int serialNumber = 1;
             //------------------加载模块,获取数据-------------------------------------------------
@@ -634,25 +638,35 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //根据sql条件,查询获取颗粒信息数据
             ParticleData fielddata = new ParticleData(m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()].FilePath);
             DataTable dt = InvalidRemoval(fielddata.GetIncaSurfaceData(), "TypeName");
-
-            dt.Columns.Add("Hardness", typeof(double));
-            dt.Columns.Add("Hardness_detailed");
-            for (int i=0;i<dt.Rows.Count;i++)
+            ResultFile resfile = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
+            string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
+            if (m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString()== "Hardness")
             {
-               
-                for (int a=0;a< dt_stl.Rows.Count;a++)
+                dt.Columns.Add("Hardness", typeof(double));
+                dt.Columns.Add("Hardness_detailed");
+                if (DoesDBexist())
                 {
-                    if (dt.Rows[i]["TypeName"].ToString() ==dt_stl.Rows[a]["TypeId"].ToString())
+                    DataTable dt_stl = new DataTable();
+                    GetSTL(str_libraryName, out dt_stl);
+                    for (int i = 0; i < dt.Rows.Count; i++)
                     {
-                        dt.Rows[i]["Hardness"] = Convert.ToDouble(dt_stl.Rows[a]["Hardness"]);
-                        dt.Rows[i]["Hardness_detailed"] = dt_stl.Rows[a]["Hardness_detailed"];
-                        break;
+                        for (int a = 0; a < dt_stl.Rows.Count; a++)
+                        {
+                            if (dt.Rows[i]["TypeName"].ToString() == dt_stl.Rows[a]["TypeId"].ToString())
+                            {
+                                dt.Rows[i]["Hardness"] = Convert.ToDouble(dt_stl.Rows[a]["Hardness"]);
+                                dt.Rows[i]["Hardness_detailed"] = dt_stl.Rows[a]["Hardness_detailed"];
+                                break;
+                            }
+                        }
                     }
                 }
-            }    
+           
+            }
+              
             //将颗粒大小排序(从大到小)
             DataView dv = dt.DefaultView;
-            dv.Sort = "Hardness DESC";
+            dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1.ToString() + " DESC";
             DataTable dt_ParticlesGridDevidePage = dv.ToTable();
 
             string str_resultPath = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()].FilePath;
@@ -672,33 +686,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             //表名Largest_frame表:(子表)       显示20条颗粒除外的部份颗粒信息
             DataTable DT_field_dt_copy = new DataTable();
-            DataTable DT_Largest_frame = new DataTable();
-            DT_Largest_frame.TableName = "Largest_frame";
-            DT_Largest_frame.Columns.Add("pid");
-            DT_Largest_frame.Columns.Add("Size");
-            DT_Largest_frame.Columns.Add("Width");
-            DT_Largest_frame.Columns.Add("DMAX");
-            DT_Largest_frame.Columns.Add("DMIN");
-            DT_Largest_frame.Columns.Add("Class");
-            DT_Largest_frame.Columns.Add("ColName1");
-            DT_Largest_frame.Columns.Add("ColName2");
-            DT_Largest_frame.Columns.Add("ColName3");
-            DT_Largest_frame.Columns.Add("ColName4");
-            DT_Largest_frame.Columns.Add("ColName5");
-            DT_Largest_frame.Columns.Add("ColName6");
-            DT_Largest_frame.Columns.Add("ColVal1");
-            DT_Largest_frame.Columns.Add("ColVal2");
-            DT_Largest_frame.Columns.Add("ColVal3");
-            DT_Largest_frame.Columns.Add("ColVal4");
-            DT_Largest_frame.Columns.Add("ColVal5");
-            DT_Largest_frame.Columns.Add("ColVal6");
-            DataColumn colpictid = new DataColumn("FieldId");
-            colpictid.DataType = typeof(int);
-            DT_Largest_frame.Columns.Add(colpictid);
-            //图像列
-            DataColumn colpict = new DataColumn("p1");
-            colpict.DataType = System.Type.GetType("System.Byte[]");
-            DT_Largest_frame.Columns.Add(colpict);
 
             //largest20表:(无关系表)       需要显示前20条带有显示能谱图像的颗粒表
             DataTable DT_Largest20 = new DataTable();
@@ -818,11 +805,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     newms_p3.Dispose();
 
                     dr["pid"] = serialNumber++.ToString();
-                    //dr["pid"] = str_fieldid + dt_ParticlesGridDevidePage.Rows[i_row]["particleid"].ToString();
-                    dr["Size"] = Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["area"]).ToString("#0.00"); //可以需要选择切换,计算方式
+                    //颗粒列表列中第一个可选参数
+                    dr["Size"] = datatable_data(dt_ParticlesGridDevidePage, i_row, m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1);
+                    //这个参数没有用
                     dr["Width"] = dt_ParticlesGridDevidePage.Rows[i_row]["rectwidth"].ToString();
-                    dr["DMAX"] = Math.Round(Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["dmax"]), 2).ToString();
-                    dr["DMIN"] = dt_ParticlesGridDevidePage.Rows[i_row]["Hardness_detailed"].ToString();
+                    //颗粒列表列中第二个可选参数
+                    dr["DMAX"] = datatable_data(dt_ParticlesGridDevidePage, i_row, m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p2);
+                    //颗粒列表列中第三个可选参数
+                    dr["DMIN"] = datatable_data(dt_ParticlesGridDevidePage, i_row, m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p3);
+                    //颗粒列表列中显示分类不可以选择
                     dr["Class"] = dt_ParticlesGridDevidePage.Rows[i_row]["typename"].ToString();
 
                     List<string> list_max_elementname = new List<string>();
@@ -866,7 +857,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     dt_GridDevidePage.Rows.Add(dt_ParticlesGridDevidePage.Rows[i].ItemArray);
                 }
             }
-            m_otsreport_export.m_ReportApp.im_ParticlesGridDevidePage.SaveMarkParticleRectangleOnFieldFile(dt_GridDevidePage, out vs, out data);
+            m_otsreport_export.m_ReportApp.im_ParticlesGridDevidePage.SaveMarkParticleRectangleOnFieldFile(str_resultPath, dt_GridDevidePage, out vs, out data);
             string str_path_FIELD_FILES_MARK = str_resultPath + "\\FIELD_FILES_MARK\\";
             DirectoryInfo theFolder = new DirectoryInfo(str_path_FIELD_FILES_MARK);
             if (theFolder.Exists)
@@ -907,108 +898,58 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             #endregion
 
-            #region 插入-前20颗粒外的颗粒
-            for (int i_row = 0; i_row < dt_ParticlesGridDevidePage.Rows.Count; i_row++)
+          
+            FrameGraphParticleTable(dt_ParticlesGridDevidePage, str_resultPath, fielddata, DT_field_dt,m_mbszclass);
+            m_list_dt.Add(DT_field_dt_copy);
+           
+            m_list_dt.Add(DT_Largest20);
+
+            return true;
+        }
+        private bool DoesDBexist()
+        {
+            try
             {
-                if (dt_ParticlesGridDevidePage.Rows[i_row]["element"].ToString() == "")
-                    continue;
-                //获取颗粒的fieldid,和particleid
-                string str_fieldid = dt_ParticlesGridDevidePage.Rows[i_row]["fieldid"].ToString();
-                if (Convert.ToInt32(str_fieldid) < 20)
+                ResultFile resfile = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
+                string str_libraryName = ((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["STDName"].ToString();
+                OTSSysMgrTools.SqLiteHelper sh = new OTSSysMgrTools.SqLiteHelper("data source='" + System.IO.Directory.GetCurrentDirectory() + "\\Config\\SysData\\" + str_libraryName + ".db" + "'");
+                
+                if (sh.ExecuteQuery("select * from ClassifySTD")==null)
                 {
-
-                    string str_particleid = dt_ParticlesGridDevidePage.Rows[i_row]["particleid"].ToString();
-                    string str_subparticles = dt_ParticlesGridDevidePage.Rows[i_row]["SubParticles"].ToString();
-                    string str_typeid = dt_ParticlesGridDevidePage.Rows[i_row]["TypeId"].ToString();
-                    string str_typename = dt_ParticlesGridDevidePage.Rows[i_row]["TypeName"].ToString();
-                    string str_element = dt_ParticlesGridDevidePage.Rows[i_row]["Element"].ToString();
-
-                    //获取原始颗粒图像
-                    Bitmap bp_particle = new Bitmap(1, 1);
-                    string str_path = str_resultPath + "\\FIELD_FILES\\";
-                    string str_imagePath = str_path + "Field" + str_fieldid.ToString() + ".bmp";
-                    if (str_subparticles != null && str_subparticles != "")
-                    {
-                        //合并大颗粒
-                        //double ScanFieldSize = 1142;
-                        //Bitmap tempbit = fielddata.ReadImageFile(str_imagePath);
-                        //int pixw = tempbit.Width;
-                        //double xs = pixw / ScanFieldSize;
-                        //bp_particle = fielddata.GetBitmapForBig(str_subparticles, xs, str_resultPath);
-                        continue;
-                    }
-                    else
-                    {
-                        //正常颗粒
-                        Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectLeft"]), Y = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectTop"]), Width = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectWidth"]), Height = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectHeight"]) };
-                        Bitmap bp_field = fielddata.ReadImageFile(str_imagePath);
-                        bp_particle = fielddata.GetBitmapByParticle(bp_field, rectangle);
-                        bp_particle.Tag = new List<string>() { dt_ParticlesGridDevidePage.Rows[i_row]["FieldId"].ToString(), dt_ParticlesGridDevidePage.Rows[i_row]["ParticleId"].ToString(), dt_ParticlesGridDevidePage.Rows[i_row]["TypeId"].ToString() };
-                    }
-
-                    //获取该颗粒的xray能谱图像
-                    System.Drawing.Bitmap bp_xraybp = ExportXRayBitmap(str_fieldid,
-                        str_particleid, Convert.ToInt32(str_typeid), str_typename, fielddata);
-
-                    //获取该颗粒的二次放大处理图像
-                    Bitmap ls_processbitmap = new Bitmap(1, 1);
-                    ls_processbitmap = (Bitmap)bp_particle.Clone();//待完善
-
-                    //再将图像转成二进制流-------------------------------------------------------------------
-                    //原图
-                    MemoryStream newms_p1 = new MemoryStream();
-                    bp_particle.Save(newms_p1, System.Drawing.Imaging.ImageFormat.Bmp);
-                    newms_p1.Seek(0, SeekOrigin.Begin);
-                    byte[] newarr_p1 = new byte[newms_p1.Length];
-                    newms_p1.Read(newarr_p1, 0, newarr_p1.Length);
-                    //---------------------------------------------------------------------------------------                  
-                    DataRow dr = DT_Largest_frame.NewRow();
-                    dr["p1"] = newarr_p1;
-                    newms_p1.Dispose();
-
-                    dr["pid"] = str_fieldid + dt_ParticlesGridDevidePage.Rows[i_row]["particleid"].ToString();
-                    dr["Size"] = Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["area"]).ToString("#0.00");  //可以需要选择切换,计算方式
-                    dr["Width"] = dt_ParticlesGridDevidePage.Rows[i_row]["rectwidth"].ToString();
-                    dr["DMAX"] = Math.Round(Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["dmax"]), 2).ToString();
-                    dr["DMIN"] = dt_ParticlesGridDevidePage.Rows[i_row]["Hardness_detailed"].ToString();
-                    dr["Class"] = dt_ParticlesGridDevidePage.Rows[i_row]["typename"].ToString();
-
-                    dr["fieldid"] = str_fieldid;
-
-                    List<string> list_max_elementname = new List<string>();
-                    List<double> list_max_elementvale = new List<double>();
-                    GetMaxElementFromDataTable(dt_ParticlesGridDevidePage, i_row, out list_max_elementname, out list_max_elementvale);
-                    //元素1
-                    dr["ColName1"] = list_max_elementname[0];
-                    dr["ColVal1"] = list_max_elementvale[0].ToString();
-                    //元素2
-                    dr["ColName2"] = list_max_elementname[1];
-                    dr["ColVal2"] = list_max_elementvale[1].ToString();
-                    //元素3
-                    dr["ColName3"] = list_max_elementname[2];
-                    dr["ColVal3"] = list_max_elementvale[2].ToString();
-                    //元素4
-                    dr["ColName4"] = list_max_elementname[3];
-                    dr["ColVal4"] = list_max_elementvale[3].ToString();
-                    //元素5
-                    dr["ColName5"] = list_max_elementname[4];
-                    dr["ColVal5"] = list_max_elementvale[4].ToString();
-                    //元素6
-                    dr["ColName6"] = list_max_elementname[5];
-                    dr["ColVal6"] = list_max_elementvale[5].ToString();
-
-
-                    DT_Largest_frame.Rows.Add(dr);
+                    return false;
                 }
-
+                return true;
+            }
+            catch 
+            {
+                return false;
+               
             }
-            #endregion
-            FrameGraphParticleTable(dt_ParticlesGridDevidePage, str_resultPath, fielddata, DT_field_dt);
-            m_list_dt.Add(DT_field_dt_copy);
-            m_list_dt.Add(DT_Largest_frame);
-            m_list_dt.Add(DT_Largest20);
 
-            return true;
+
+            
+        }
+        private string datatable_data(DataTable dt,int it,string str)
+        {
+            if (str == "Hardness")
+            {
+                return dt.Rows[it]["Hardness_detailed"].ToString();
+            }
+            else
+            if (str == "Area")
+            {
+                return Convert.ToDouble(dt.Rows[it][str]).ToString("#0.00");
+                 
+            }
+            else
+            if (str== "DMAX")
+            {
+                return Math.Round(Convert.ToDouble(dt.Rows[it][str]), 2).ToString();
+            }
+            else
+            {
+                return dt.Rows[it][str].ToString();
+            }
         }
 
 
@@ -1026,9 +967,12 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         /// <param name="str_resultPath">地址</param>
         /// <param name="fielddata"></param>
         /// <param name="DT_field_dt">主表</param>
-        private void FrameGraphParticleTable(DataTable dt_ParticlesGridDevidePage,string str_resultPath, ParticleData fielddata,DataTable DT_field_dt)
+        private void FrameGraphParticleTable(DataTable dt_ParticlesGridDevidePage,string str_resultPath, ParticleData fielddata,DataTable DT_field_dt, MBSZClass m_mbszclass)
         {
-
+            //将颗粒大小排序(从大到小)
+            DataView dv = dt_ParticlesGridDevidePage.DefaultView;
+            dv.Sort = m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p1.ToString() + " DESC";
+            DataTable dt = dv.ToTable();
             //表名Largest_frame表:(子表)       显示20条颗粒除外的部份颗粒信息
             DataTable FrameGraphSubTable = new DataTable();
             FrameGraphSubTable.TableName = "FrameGraphSubTable";
@@ -1058,24 +1002,24 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             colpict.DataType = System.Type.GetType("System.Byte[]");
             FrameGraphSubTable.Columns.Add(colpict);
 
-            for (int i_row = 0; i_row < dt_ParticlesGridDevidePage.Rows.Count; i_row++)
+            for (int i_row = 0; i_row < dt.Rows.Count; i_row++)
             {
-                if (dt_ParticlesGridDevidePage.Rows[i_row]["element"].ToString() == "")
+                if (dt.Rows[i_row]["element"].ToString() == "")
                     continue;
-                if (dt_ParticlesGridDevidePage.Rows[i_row]["TypeName"].ToString() == "Not Identified")
+                if (dt.Rows[i_row]["TypeName"].ToString() == "Not Identified")
                     continue;
                 //获取颗粒的fieldid,和particleid
-                string str_fieldid = dt_ParticlesGridDevidePage.Rows[i_row]["fieldid"].ToString();
+                string str_fieldid = dt.Rows[i_row]["fieldid"].ToString();
 
                 //if (Convert.ToInt32(str_fieldid) < 20)
                 if (JudgeWhetherItExists(Convert.ToInt32(str_fieldid), DT_field_dt, "FieldId"))
                 {
 
-                    string str_particleid = dt_ParticlesGridDevidePage.Rows[i_row]["particleid"].ToString();
-                    string str_subparticles = dt_ParticlesGridDevidePage.Rows[i_row]["SubParticles"].ToString();
-                    string str_typeid = dt_ParticlesGridDevidePage.Rows[i_row]["TypeId"].ToString();
-                    string str_typename = dt_ParticlesGridDevidePage.Rows[i_row]["TypeName"].ToString();
-                    string str_element = dt_ParticlesGridDevidePage.Rows[i_row]["Element"].ToString();
+                    string str_particleid = dt.Rows[i_row]["particleid"].ToString();
+                    string str_subparticles = dt.Rows[i_row]["SubParticles"].ToString();
+                    string str_typeid = dt.Rows[i_row]["TypeId"].ToString();
+                    string str_typename = dt.Rows[i_row]["TypeName"].ToString();
+                    string str_element = dt.Rows[i_row]["Element"].ToString();
 
                     //获取原始颗粒图像
                     Bitmap bp_particle = new Bitmap(1, 1);
@@ -1089,10 +1033,10 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     else
                     {
                         //正常颗粒
-                        Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectLeft"]), Y = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectTop"]), Width = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectWidth"]), Height = Convert.ToInt32(dt_ParticlesGridDevidePage.Rows[i_row]["RectHeight"]) };
+                        Rectangle rectangle = new Rectangle() { X = Convert.ToInt32(dt.Rows[i_row]["RectLeft"]), Y = Convert.ToInt32(dt.Rows[i_row]["RectTop"]), Width = Convert.ToInt32(dt.Rows[i_row]["RectWidth"]), Height = Convert.ToInt32(dt.Rows[i_row]["RectHeight"]) };
                         Bitmap bp_field = fielddata.ReadImageFile(str_imagePath);
                         bp_particle = fielddata.GetBitmapByParticle(bp_field, rectangle);
-                        bp_particle.Tag = new List<string>() { dt_ParticlesGridDevidePage.Rows[i_row]["FieldId"].ToString(), dt_ParticlesGridDevidePage.Rows[i_row]["ParticleId"].ToString(), dt_ParticlesGridDevidePage.Rows[i_row]["TypeId"].ToString() };
+                        bp_particle.Tag = new List<string>() { dt.Rows[i_row]["FieldId"].ToString(), dt.Rows[i_row]["ParticleId"].ToString(), dt.Rows[i_row]["TypeId"].ToString() };
                     }
 
                     //获取该颗粒的xray能谱图像
@@ -1114,28 +1058,27 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                     DataRow dr = FrameGraphSubTable.NewRow();
                     dr["p1"] = newarr_p1;
                     newms_p1.Dispose();
-                    ResultFile resfile = m_otsreport_export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_otsreport_export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
-                    if (((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString() == "0:IncA")
-                    {
-                        dr["pid"] = str_fieldid + dt_ParticlesGridDevidePage.Rows[i_row]["particleid"].ToString();
-                    }
-                    else
-                    {
-                        dr["pid"] = /*str_fieldid + */dt_ParticlesGridDevidePage.Rows[i_row]["Hardness_detailed"].ToString();
-                    }
+                  
 
-                    
-                    dr["Size"] = Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["area"]).ToString("#0.00");  //可以需要选择切换,计算方式
-                    dr["Width"] = dt_ParticlesGridDevidePage.Rows[i_row]["rectwidth"].ToString();
-                    dr["DMAX"] = Math.Round(Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["dmax"]),2).ToString();
-                    dr["DMIN"] = Math.Round(Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["dmin"]),2).ToString();
-                    dr["Class"] = dt_ParticlesGridDevidePage.Rows[i_row]["typename"].ToString();
+
+                    //帧图列表列第一个字段的可选参数
+                    dr["pid"] = datatable_data(dt, i_row, m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p1);
+                    //帧图列表列第二个字段的可选参数
+                    dr["Size"] = datatable_data(dt, i_row, m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2);
+
+                    //dr["Size"] = Convert.ToDouble(dt_ParticlesGridDevidePage.Rows[i_row]["area"]).ToString("#0.00"); 
+                    //参数未启用
+                    dr["Width"] = dt.Rows[i_row]["rectwidth"].ToString();
+
+                    dr["DMAX"] = Math.Round(Convert.ToDouble(dt.Rows[i_row]["dmax"]),2).ToString();
+                    dr["DMIN"] = Math.Round(Convert.ToDouble(dt.Rows[i_row]["dmin"]),2).ToString();
+                    dr["Class"] = dt.Rows[i_row]["typename"].ToString();
 
                     dr["fieldid"] = str_fieldid;
 
                     List<string> list_max_elementname = new List<string>();
                     List<double> list_max_elementvale = new List<double>();
-                    GetMaxElementFromDataTable(dt_ParticlesGridDevidePage, i_row, out list_max_elementname, out list_max_elementvale);
+                    GetMaxElementFromDataTable(dt, i_row, out list_max_elementname, out list_max_elementvale);
                     //元素1
                     dr["ColName1"] = list_max_elementname[0];
                     dr["ColVal1"] = list_max_elementvale[0].ToString();
@@ -2697,6 +2640,12 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             m_otsreport_export.m_ReportApp.im_NationalStandardMethodTwo = new OTSIncAReportGB.NationalStandardMethodTwo(m_otsreport_export.m_ReportApp.m_rstDataMgr.m_ReportMgr, listGriddataclr2);
             return m_otsreport_export.m_ReportApp.im_NationalStandardMethodTwo.ChineseStandardABCD_GetDataTable();
         }
+
+
+
+
+
+       
     }
 
 }

+ 88 - 13
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_Export.cs

@@ -14,7 +14,7 @@ using System.Drawing;
 using System.IO;
 using System.Linq;
 using System.Windows.Forms;
-
+using System.Xml;
 
 namespace OTSIncAReportApp
 {
@@ -36,6 +36,7 @@ namespace OTSIncAReportApp
 
         Export_ReportTemplate m_export_reporttemplate;
         public string strPath = "./Config/ProData/ReportTemplateConfig.xml"; //报告模板设置文件的路径
+       
         public string strPath2;
         public XmlConfigUtil xmlutil;
         public XmlConfigUtil xmlutil2;
@@ -485,6 +486,55 @@ namespace OTSIncAReportApp
                 /// </summary>
                 public bool b_ck_kllb_npxx { get; set; }
 
+
+
+                
+                /// <summary>
+                /// 颗粒列表 颗粒排序表行中第一个可选字段 文本
+                /// </summary>
+                public string str_cb_kllb_sort_p1 { get; set; }
+
+                /// <summary>
+                /// 颗粒列表 颗粒排序表行中第一个可选字段 索引
+                /// </summary>
+                public int index_cb_kllb_sort_p1 { get; set; }
+                /// <summary>
+                /// 颗粒列表 颗粒排序表行中第二个可选字段 文本
+                /// </summary>
+                public string str_cb_kllb_sort_p2 { get; set; }
+
+                /// <summary>
+                /// 颗粒列表 颗粒排序表行中第二个可选字段 索引
+                /// </summary>
+                public int index_cb_kllb_sort_p2 { get; set; }
+                /// <summary>
+                /// 颗粒列表 颗粒排序表行中第三个可选字段 文本
+                /// </summary>
+                public string str_cb_kllb_sort_p3 { get; set; }
+
+                /// <summary>
+                /// 颗粒列表 颗粒排序表行中第三个可选字段 索引
+                /// </summary>
+                public int index_cb_kllb_sort_p3 { get; set; }
+                /// <summary>
+                /// 颗粒列表 颗粒帧图表行中第一个可选字段 文本
+                /// </summary>
+                public string str_cb_kllb_chartSort_p1 { get; set; }
+
+                /// <summary>
+                /// 颗粒列表 颗粒帧图表行中第一个可选字段 索引
+                /// </summary>
+                public int index_cb_kllb_chartSort_p1 { get; set; }
+                /// <summary>
+                /// 颗粒列表 颗粒帧图表行中第二个可选字段 文本
+                /// </summary>
+                public string str_cb_kllb_chartSort_p2 { get; set; }
+
+                /// <summary>
+                /// 颗粒列表 颗粒帧图表行中第二个可选字段 索引
+                /// </summary>
+                public int index_cb_kllb_chartSort_p2 { get; set; }
+             
             }
             #endregion
 
@@ -657,6 +707,22 @@ namespace OTSIncAReportApp
             m_mbszclass.M_KLLBXX.b_ck_kllb_ystx = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_ystx"));    //原始图像
             m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_fdtx"));    //放大图像
             m_mbszclass.M_KLLBXX.b_ck_kllb_npxx = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_npxx"));    //能谱图像
+
+           
+            m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_sort_p1"));//颗粒列表列中第一个可选参数
+            m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p1 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_sort_p1"));
+            m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p2 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_sort_p2"));//颗粒列表中第二个可选参数
+            m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_sort_p2"));
+            m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p3 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_sort_p3"));//颗粒列表中第三个可选参数
+            m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_sort_p3"));
+            m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p1 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_chartSort_p1"));//帧图表列中第一个可选参数
+            m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p1 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_chartSort_p1"));
+            m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_chartSort_p2"));//帧图表列中第二个可选参数
+            m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_chartSort_p2"));
+            //m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p3 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_chartSort_p3"));//帧图表列中第三个可选参数
+            //m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_chartSort_p3"));
+
+
         }
         /// <summary>
         /// 从配置文件中读取报告模板路径
@@ -1052,6 +1118,7 @@ namespace OTSIncAReportApp
             string arg2 = tb_mblj.Text.Trim().Replace(" ", "^");//参数2,是模板文件的路径
             string arg3 = "MainReport";//主体报表
             string arg4 = "";
+
             ResultFile resfile = m_ReportApp.m_rstDataMgr.ResultFilesList[m_ReportApp.m_rstDataMgr.GetWorkingResult()];
             if (((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString() == "0:IncA")
             {
@@ -1061,8 +1128,8 @@ namespace OTSIncAReportApp
             {
                 arg4 = "Cleanness";//打卡清洁度报告
             }
-                 
-            string arg5 = "0-100";//打开的标记帧图图像数量
+
+            string arg5 = "";
             process.Arguments = string.Format("{0} {1} {2} {3} {4}", arg1, arg2, arg3, arg4, arg5);  //多个参数用空格隔开
             process.WindowStyle = ProcessWindowStyle.Normal;
             Process.Start(process);
@@ -1945,15 +2012,7 @@ namespace OTSIncAReportApp
                         //判断颗粒列表是否导出
                         if (m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk)
                         {
-                            ResultFile resfile = m_ReportApp.m_rstDataMgr.ResultFilesList[m_ReportApp.m_rstDataMgr.GetWorkingResult()];
-                            if (((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString() == "0:IncA")
-                            {
-                                m_export_reporttemplate.InsertReportTemplateTable_ParticlesGridDevidePage();
-                            }
-                            else
-                            {
-                                m_export_reporttemplate.InsertReportTemplateTable_ParticlesGridDevidePage_CleanlinessA();
-                            }
+                            m_export_reporttemplate.InsertReportTemplateTable_ParticlesGridDevidePage_CleanlinessA(m_mbszclass);
                         }
                             
                         lock (m_thread_flag)
@@ -1994,6 +2053,7 @@ namespace OTSIncAReportApp
 
                     if (ls_str.IndexOf(table["rictbox34"].ToString()) > -1)
                     {
+                        //三元图部分
                         if (m_mbszclass.M_SYXT.b_ck_syxt_xsmk)
                             m_export_reporttemplate.InsertReportTemplateChart_Trianglediagram();
                         lock (m_thread_flag)
@@ -2163,6 +2223,21 @@ namespace OTSIncAReportApp
                 m_mbszclass.M_KLLBXX.b_ck_kllb_ystx = Convert.ToBoolean(xmlutil.Read("M_KLLBXX", "b_ck_kllb_ystx"));    //原始图像
                 m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx = Convert.ToBoolean(xmlutil.Read("M_KLLBXX", "b_ck_kllb_fdtx"));    //放大图像
                 m_mbszclass.M_KLLBXX.b_ck_kllb_npxx = Convert.ToBoolean(xmlutil.Read("M_KLLBXX", "b_ck_kllb_npxx"));    //能谱图像
+
+              
+               
+                m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1 = Convert.ToString(xmlutil.Read("M_KLLBXX", "str_cb_kllb_sort_p1"));//颗粒列表列中第一个可选参数
+                m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p1 = Convert.ToInt32(xmlutil.Read("M_KLLBXX", "index_cb_kllb_sort_p1"));
+                m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p2 = Convert.ToString(xmlutil.Read("M_KLLBXX", "str_cb_kllb_sort_p2"));//颗粒列表中第二个可选参数
+                m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2 = Convert.ToInt32(xmlutil.Read("M_KLLBXX", "index_cb_kllb_sort_p2"));
+                m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p3 = Convert.ToString(xmlutil.Read("M_KLLBXX", "str_cb_kllb_sort_p3"));//颗粒列表中第三个可选参数
+                m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3 = Convert.ToInt32(xmlutil.Read("M_KLLBXX", "index_cb_kllb_sort_p3"));
+                m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p1 = Convert.ToString(xmlutil.Read("M_KLLBXX", "str_cb_kllb_chartSort_p1"));//帧图表列中第一个可选参数
+                m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p1 = Convert.ToInt32(xmlutil.Read("M_KLLBXX", "index_cb_kllb_chartSort_p1"));
+                m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2 = Convert.ToString(xmlutil.Read("M_KLLBXX", "str_cb_kllb_chartSort_p2"));//帧图表列中第二个可选参数
+                m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2 = Convert.ToInt32(xmlutil.Read("M_KLLBXX", "index_cb_kllb_chartSort_p2"));
+                //m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p3 = Convert.ToString(xmlutil.Read("M_KLLBXX", "str_cb_kllb_chartSort_p3"));//帧图表列中第三个可选参数
+                //m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3 = Convert.ToInt32(xmlutil.Read("M_KLLBXX", "index_cb_kllb_chartSort_p3"));
             }
         }
 
@@ -2509,7 +2584,7 @@ namespace OTSIncAReportApp
 
             
         }
-
+       
         private void OTSReport_Export_FormClosed(object sender, FormClosedEventArgs e)
         {
            

+ 233 - 74
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.Designer.cs

@@ -75,6 +75,18 @@
             this.label33 = new System.Windows.Forms.Label();
             this.label42 = new System.Windows.Forms.Label();
             this.groupBox8 = new System.Windows.Forms.GroupBox();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.ParticleList_5 = new System.Windows.Forms.Label();
+            this.cb_FrameChart_p2 = new System.Windows.Forms.ComboBox();
+            this.ParticleList_4 = new System.Windows.Forms.Label();
+            this.cb_FrameChart_p1 = new System.Windows.Forms.ComboBox();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.comboBox_p3 = new System.Windows.Forms.ComboBox();
+            this.ParticleList_3 = new System.Windows.Forms.Label();
+            this.comboBox_p2 = new System.Windows.Forms.ComboBox();
+            this.ParticleList_2 = new System.Windows.Forms.Label();
+            this.ParticleList_1 = new System.Windows.Forms.Label();
+            this.comboBox_p1 = new System.Windows.Forms.ComboBox();
             this.ck_kllb_npxx = new System.Windows.Forms.CheckBox();
             this.ck_kllb_fdtx = new System.Windows.Forms.CheckBox();
             this.ck_kllb_ystx = new System.Windows.Forms.CheckBox();
@@ -99,15 +111,17 @@
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.panel3 = new System.Windows.Forms.Panel();
-            this.groupBox9 = new System.Windows.Forms.GroupBox();
-            this.label39 = new System.Windows.Forms.Label();
             this.groupBZ = new System.Windows.Forms.GroupBox();
             this.textBox_strBZ = new System.Windows.Forms.TextBox();
+            this.groupBox9 = new System.Windows.Forms.GroupBox();
+            this.label39 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
             this.groupBox4.SuspendLayout();
             this.groupBox6.SuspendLayout();
             this.groupBox7.SuspendLayout();
             this.groupBox8.SuspendLayout();
+            this.groupBox3.SuspendLayout();
+            this.groupBox2.SuspendLayout();
             this.panel2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit();
@@ -117,14 +131,14 @@
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.panel3.SuspendLayout();
-            this.groupBox9.SuspendLayout();
             this.groupBZ.SuspendLayout();
+            this.groupBox9.SuspendLayout();
             this.SuspendLayout();
             // 
             // tb_FBT
             // 
             this.tb_FBT.Location = new System.Drawing.Point(5, 83);
-            this.tb_FBT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_FBT.Margin = new System.Windows.Forms.Padding(2);
             this.tb_FBT.Name = "tb_FBT";
             this.tb_FBT.Size = new System.Drawing.Size(258, 21);
             this.tb_FBT.TabIndex = 20;
@@ -132,7 +146,7 @@
             // tb_ZBT
             // 
             this.tb_ZBT.Location = new System.Drawing.Point(5, 35);
-            this.tb_ZBT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_ZBT.Margin = new System.Windows.Forms.Padding(2);
             this.tb_ZBT.Name = "tb_ZBT";
             this.tb_ZBT.Size = new System.Drawing.Size(258, 21);
             this.tb_ZBT.TabIndex = 10;
@@ -160,7 +174,7 @@
             // button1
             // 
             this.button1.Location = new System.Drawing.Point(930, 47);
-            this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button1.Margin = new System.Windows.Forms.Padding(2);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(71, 22);
             this.button1.TabIndex = 60;
@@ -171,7 +185,7 @@
             // button2
             // 
             this.button2.Location = new System.Drawing.Point(1376, 648);
-            this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button2.Margin = new System.Windows.Forms.Padding(2);
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(71, 22);
             this.button2.TabIndex = 70;
@@ -192,7 +206,7 @@
             // tb_YPBH
             // 
             this.tb_YPBH.Location = new System.Drawing.Point(5, 138);
-            this.tb_YPBH.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_YPBH.Margin = new System.Windows.Forms.Padding(2);
             this.tb_YPBH.Name = "tb_YPBH";
             this.tb_YPBH.Size = new System.Drawing.Size(258, 21);
             this.tb_YPBH.TabIndex = 30;
@@ -210,7 +224,7 @@
             // tb_CKBZ
             // 
             this.tb_CKBZ.Location = new System.Drawing.Point(5, 189);
-            this.tb_CKBZ.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_CKBZ.Margin = new System.Windows.Forms.Padding(2);
             this.tb_CKBZ.Name = "tb_CKBZ";
             this.tb_CKBZ.Size = new System.Drawing.Size(258, 21);
             this.tb_CKBZ.TabIndex = 50;
@@ -219,7 +233,7 @@
             // 
             this.ck_jggk.AutoSize = true;
             this.ck_jggk.Location = new System.Drawing.Point(224, 230);
-            this.ck_jggk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ck_jggk.Margin = new System.Windows.Forms.Padding(2);
             this.ck_jggk.Name = "ck_jggk";
             this.ck_jggk.Size = new System.Drawing.Size(15, 14);
             this.ck_jggk.TabIndex = 51;
@@ -229,7 +243,7 @@
             // 
             this.ck_ypsm.AutoSize = true;
             this.ck_ypsm.Location = new System.Drawing.Point(388, 159);
-            this.ck_ypsm.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ck_ypsm.Margin = new System.Windows.Forms.Padding(2);
             this.ck_ypsm.Name = "ck_ypsm";
             this.ck_ypsm.Size = new System.Drawing.Size(15, 14);
             this.ck_ypsm.TabIndex = 51;
@@ -259,7 +273,7 @@
             // 
             this.ck_ym.AutoSize = true;
             this.ck_ym.Location = new System.Drawing.Point(409, 89);
-            this.ck_ym.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ck_ym.Margin = new System.Windows.Forms.Padding(2);
             this.ck_ym.Name = "ck_ym";
             this.ck_ym.Size = new System.Drawing.Size(15, 14);
             this.ck_ym.TabIndex = 52;
@@ -268,7 +282,7 @@
             // tb_yjwb
             // 
             this.tb_yjwb.Location = new System.Drawing.Point(7, 89);
-            this.tb_yjwb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_yjwb.Margin = new System.Windows.Forms.Padding(2);
             this.tb_yjwb.Name = "tb_yjwb";
             this.tb_yjwb.Size = new System.Drawing.Size(256, 21);
             this.tb_yjwb.TabIndex = 42;
@@ -296,7 +310,7 @@
             // tb_khh
             // 
             this.tb_khh.Location = new System.Drawing.Point(7, 147);
-            this.tb_khh.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_khh.Margin = new System.Windows.Forms.Padding(2);
             this.tb_khh.Name = "tb_khh";
             this.tb_khh.Size = new System.Drawing.Size(256, 21);
             this.tb_khh.TabIndex = 42;
@@ -322,9 +336,9 @@
             this.groupBox1.Controls.Add(this.label10);
             this.groupBox1.Controls.Add(this.label8);
             this.groupBox1.Location = new System.Drawing.Point(3, 263);
-            this.groupBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox1.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox1.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox1.Size = new System.Drawing.Size(268, 181);
             this.groupBox1.TabIndex = 0;
             this.groupBox1.TabStop = false;
@@ -333,7 +347,7 @@
             // tb_ymwb
             // 
             this.tb_ymwb.Location = new System.Drawing.Point(7, 33);
-            this.tb_ymwb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tb_ymwb.Margin = new System.Windows.Forms.Padding(2);
             this.tb_ymwb.Name = "tb_ymwb";
             this.tb_ymwb.Size = new System.Drawing.Size(256, 21);
             this.tb_ymwb.TabIndex = 42;
@@ -357,9 +371,9 @@
             this.groupBox4.Controls.Add(this.label15);
             this.groupBox4.Controls.Add(this.label14);
             this.groupBox4.Location = new System.Drawing.Point(3, 448);
-            this.groupBox4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox4.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox4.Name = "groupBox4";
-            this.groupBox4.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox4.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox4.Size = new System.Drawing.Size(268, 158);
             this.groupBox4.TabIndex = 2;
             this.groupBox4.TabStop = false;
@@ -369,7 +383,7 @@
             // 
             this.ck_klcc_xsmk.AutoSize = true;
             this.ck_klcc_xsmk.Location = new System.Drawing.Point(224, 25);
-            this.ck_klcc_xsmk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            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(15, 14);
             this.ck_klcc_xsmk.TabIndex = 53;
@@ -391,7 +405,7 @@
             this.cb_klcc_ljb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cb_klcc_ljb.FormattingEnabled = true;
             this.cb_klcc_ljb.Location = new System.Drawing.Point(19, 112);
-            this.cb_klcc_ljb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.cb_klcc_ljb.Margin = new System.Windows.Forms.Padding(2);
             this.cb_klcc_ljb.Name = "cb_klcc_ljb";
             this.cb_klcc_ljb.Size = new System.Drawing.Size(216, 20);
             this.cb_klcc_ljb.TabIndex = 42;
@@ -401,7 +415,7 @@
             this.cb_klcc_jsfs.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cb_klcc_jsfs.FormattingEnabled = true;
             this.cb_klcc_jsfs.Location = new System.Drawing.Point(19, 67);
-            this.cb_klcc_jsfs.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.cb_klcc_jsfs.Margin = new System.Windows.Forms.Padding(2);
             this.cb_klcc_jsfs.Name = "cb_klcc_jsfs";
             this.cb_klcc_jsfs.Size = new System.Drawing.Size(216, 20);
             this.cb_klcc_jsfs.TabIndex = 42;
@@ -435,9 +449,9 @@
             this.groupBox6.Controls.Add(this.ck_ysfx_xsmk);
             this.groupBox6.Controls.Add(this.label25);
             this.groupBox6.Location = new System.Drawing.Point(3, 614);
-            this.groupBox6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox6.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox6.Name = "groupBox6";
-            this.groupBox6.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox6.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox6.Size = new System.Drawing.Size(268, 134);
             this.groupBox6.TabIndex = 4;
             this.groupBox6.TabStop = false;
@@ -466,7 +480,7 @@
             // tb_ysfx_xsys
             // 
             this.tb_ysfx_xsys.Location = new System.Drawing.Point(16, 51);
-            this.tb_ysfx_xsys.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            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;
             this.tb_ysfx_xsys.Size = new System.Drawing.Size(181, 21);
@@ -475,7 +489,7 @@
             // button4
             // 
             this.button4.Location = new System.Drawing.Point(167, 93);
-            this.button4.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button4.Margin = new System.Windows.Forms.Padding(2);
             this.button4.Name = "button4";
             this.button4.Size = new System.Drawing.Size(72, 20);
             this.button4.TabIndex = 57;
@@ -487,7 +501,7 @@
             // 
             this.ck_ysfx_xsmk.AutoSize = true;
             this.ck_ysfx_xsmk.Location = new System.Drawing.Point(224, 25);
-            this.ck_ysfx_xsmk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            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(15, 14);
             this.ck_ysfx_xsmk.TabIndex = 53;
@@ -514,15 +528,14 @@
             this.groupBox7.Controls.Add(this.label38);
             this.groupBox7.Controls.Add(this.label33);
             this.groupBox7.Controls.Add(this.label42);
-            this.groupBox7.Location = new System.Drawing.Point(1175, 122);
-            this.groupBox7.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox7.Location = new System.Drawing.Point(3, 752);
+            this.groupBox7.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox7.Name = "groupBox7";
-            this.groupBox7.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox7.Padding = new System.Windows.Forms.Padding(2);
             this.groupBox7.Size = new System.Drawing.Size(263, 471);
             this.groupBox7.TabIndex = 7;
             this.groupBox7.TabStop = false;
             this.groupBox7.Text = "三元相图";
-            this.groupBox7.Visible = false;
             // 
             // lbv_syxt_mblb
             // 
@@ -530,7 +543,7 @@
             this.lbv_syxt_mblb.FullRowSelect = true;
             this.lbv_syxt_mblb.HideSelection = false;
             this.lbv_syxt_mblb.Location = new System.Drawing.Point(8, 199);
-            this.lbv_syxt_mblb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            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(249, 258);
             this.lbv_syxt_mblb.TabIndex = 55;
@@ -541,7 +554,7 @@
             // 
             this.ck_syxt_xsmk.AutoSize = true;
             this.ck_syxt_xsmk.Location = new System.Drawing.Point(224, 21);
-            this.ck_syxt_xsmk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            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(15, 14);
             this.ck_syxt_xsmk.TabIndex = 53;
@@ -563,7 +576,7 @@
             this.cb_syxt_ljb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cb_syxt_ljb.FormattingEnabled = true;
             this.cb_syxt_ljb.Location = new System.Drawing.Point(14, 73);
-            this.cb_syxt_ljb.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.cb_syxt_ljb.Margin = new System.Windows.Forms.Padding(2);
             this.cb_syxt_ljb.Name = "cb_syxt_ljb";
             this.cb_syxt_ljb.Size = new System.Drawing.Size(214, 20);
             this.cb_syxt_ljb.TabIndex = 42;
@@ -573,7 +586,7 @@
             this.cb_syxt_mhxssl.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cb_syxt_mhxssl.FormattingEnabled = true;
             this.cb_syxt_mhxssl.Location = new System.Drawing.Point(14, 129);
-            this.cb_syxt_mhxssl.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.cb_syxt_mhxssl.Margin = new System.Windows.Forms.Padding(2);
             this.cb_syxt_mhxssl.Name = "cb_syxt_mhxssl";
             this.cb_syxt_mhxssl.Size = new System.Drawing.Size(214, 20);
             this.cb_syxt_mhxssl.TabIndex = 42;
@@ -611,6 +624,8 @@
             // 
             // groupBox8
             // 
+            this.groupBox8.Controls.Add(this.groupBox3);
+            this.groupBox8.Controls.Add(this.groupBox2);
             this.groupBox8.Controls.Add(this.ck_kllb_npxx);
             this.groupBox8.Controls.Add(this.ck_kllb_fdtx);
             this.groupBox8.Controls.Add(this.ck_kllb_ystx);
@@ -619,20 +634,148 @@
             this.groupBox8.Controls.Add(this.label31);
             this.groupBox8.Controls.Add(this.label30);
             this.groupBox8.Controls.Add(this.label34);
-            this.groupBox8.Location = new System.Drawing.Point(5, 752);
-            this.groupBox8.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.groupBox8.Location = new System.Drawing.Point(3, 1227);
+            this.groupBox8.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox8.Name = "groupBox8";
-            this.groupBox8.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.groupBox8.Size = new System.Drawing.Size(263, 140);
+            this.groupBox8.Padding = new System.Windows.Forms.Padding(2);
+            this.groupBox8.Size = new System.Drawing.Size(263, 464);
             this.groupBox8.TabIndex = 6;
             this.groupBox8.TabStop = false;
             this.groupBox8.Text = "颗粒列表";
             // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add(this.ParticleList_5);
+            this.groupBox3.Controls.Add(this.cb_FrameChart_p2);
+            this.groupBox3.Controls.Add(this.ParticleList_4);
+            this.groupBox3.Controls.Add(this.cb_FrameChart_p1);
+            this.groupBox3.Location = new System.Drawing.Point(9, 227);
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size(249, 125);
+            this.groupBox3.TabIndex = 55;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "帧图表";
+            // 
+            // ParticleList_5
+            // 
+            this.ParticleList_5.AutoSize = true;
+            this.ParticleList_5.Location = new System.Drawing.Point(17, 70);
+            this.ParticleList_5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ParticleList_5.Name = "ParticleList_5";
+            this.ParticleList_5.Size = new System.Drawing.Size(35, 12);
+            this.ParticleList_5.TabIndex = 57;
+            this.ParticleList_5.Text = "参数2";
+            // 
+            // cb_FrameChart_p2
+            // 
+            this.cb_FrameChart_p2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cb_FrameChart_p2.FormattingEnabled = true;
+            this.cb_FrameChart_p2.Location = new System.Drawing.Point(17, 84);
+            this.cb_FrameChart_p2.Margin = new System.Windows.Forms.Padding(2);
+            this.cb_FrameChart_p2.Name = "cb_FrameChart_p2";
+            this.cb_FrameChart_p2.Size = new System.Drawing.Size(216, 20);
+            this.cb_FrameChart_p2.TabIndex = 56;
+            // 
+            // ParticleList_4
+            // 
+            this.ParticleList_4.AutoSize = true;
+            this.ParticleList_4.Location = new System.Drawing.Point(17, 23);
+            this.ParticleList_4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ParticleList_4.Name = "ParticleList_4";
+            this.ParticleList_4.Size = new System.Drawing.Size(35, 12);
+            this.ParticleList_4.TabIndex = 55;
+            this.ParticleList_4.Text = "参数1";
+            // 
+            // cb_FrameChart_p1
+            // 
+            this.cb_FrameChart_p1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cb_FrameChart_p1.FormattingEnabled = true;
+            this.cb_FrameChart_p1.Location = new System.Drawing.Point(17, 37);
+            this.cb_FrameChart_p1.Margin = new System.Windows.Forms.Padding(2);
+            this.cb_FrameChart_p1.Name = "cb_FrameChart_p1";
+            this.cb_FrameChart_p1.Size = new System.Drawing.Size(216, 20);
+            this.cb_FrameChart_p1.TabIndex = 54;
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Controls.Add(this.comboBox_p3);
+            this.groupBox2.Controls.Add(this.ParticleList_3);
+            this.groupBox2.Controls.Add(this.comboBox_p2);
+            this.groupBox2.Controls.Add(this.ParticleList_2);
+            this.groupBox2.Controls.Add(this.ParticleList_1);
+            this.groupBox2.Controls.Add(this.comboBox_p1);
+            this.groupBox2.Location = new System.Drawing.Point(9, 55);
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size(249, 166);
+            this.groupBox2.TabIndex = 54;
+            this.groupBox2.TabStop = false;
+            this.groupBox2.Text = "最大排序表";
+            // 
+            // comboBox_p3
+            // 
+            this.comboBox_p3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_p3.FormattingEnabled = true;
+            this.comboBox_p3.Location = new System.Drawing.Point(13, 128);
+            this.comboBox_p3.Margin = new System.Windows.Forms.Padding(2);
+            this.comboBox_p3.Name = "comboBox_p3";
+            this.comboBox_p3.Size = new System.Drawing.Size(216, 20);
+            this.comboBox_p3.TabIndex = 57;
+            // 
+            // ParticleList_3
+            // 
+            this.ParticleList_3.AutoSize = true;
+            this.ParticleList_3.Location = new System.Drawing.Point(15, 114);
+            this.ParticleList_3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ParticleList_3.Name = "ParticleList_3";
+            this.ParticleList_3.Size = new System.Drawing.Size(35, 12);
+            this.ParticleList_3.TabIndex = 56;
+            this.ParticleList_3.Text = "参数3";
+            // 
+            // comboBox_p2
+            // 
+            this.comboBox_p2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_p2.FormattingEnabled = true;
+            this.comboBox_p2.Location = new System.Drawing.Point(13, 86);
+            this.comboBox_p2.Margin = new System.Windows.Forms.Padding(2);
+            this.comboBox_p2.Name = "comboBox_p2";
+            this.comboBox_p2.Size = new System.Drawing.Size(216, 20);
+            this.comboBox_p2.TabIndex = 55;
+            // 
+            // ParticleList_2
+            // 
+            this.ParticleList_2.AutoSize = true;
+            this.ParticleList_2.Location = new System.Drawing.Point(11, 72);
+            this.ParticleList_2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ParticleList_2.Name = "ParticleList_2";
+            this.ParticleList_2.Size = new System.Drawing.Size(35, 12);
+            this.ParticleList_2.TabIndex = 54;
+            this.ParticleList_2.Text = "参数2";
+            // 
+            // ParticleList_1
+            // 
+            this.ParticleList_1.AutoSize = true;
+            this.ParticleList_1.Location = new System.Drawing.Point(13, 26);
+            this.ParticleList_1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.ParticleList_1.Name = "ParticleList_1";
+            this.ParticleList_1.Size = new System.Drawing.Size(35, 12);
+            this.ParticleList_1.TabIndex = 53;
+            this.ParticleList_1.Text = "参数1";
+            // 
+            // comboBox_p1
+            // 
+            this.comboBox_p1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.comboBox_p1.FormattingEnabled = true;
+            this.comboBox_p1.Location = new System.Drawing.Point(13, 40);
+            this.comboBox_p1.Margin = new System.Windows.Forms.Padding(2);
+            this.comboBox_p1.Name = "comboBox_p1";
+            this.comboBox_p1.Size = new System.Drawing.Size(216, 20);
+            this.comboBox_p1.TabIndex = 43;
+            // 
             // ck_kllb_npxx
             // 
             this.ck_kllb_npxx.AutoSize = true;
-            this.ck_kllb_npxx.Location = new System.Drawing.Point(224, 102);
-            this.ck_kllb_npxx.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ck_kllb_npxx.Location = new System.Drawing.Point(230, 428);
+            this.ck_kllb_npxx.Margin = new System.Windows.Forms.Padding(2);
             this.ck_kllb_npxx.Name = "ck_kllb_npxx";
             this.ck_kllb_npxx.Size = new System.Drawing.Size(15, 14);
             this.ck_kllb_npxx.TabIndex = 53;
@@ -642,8 +785,8 @@
             // ck_kllb_fdtx
             // 
             this.ck_kllb_fdtx.AutoSize = true;
-            this.ck_kllb_fdtx.Location = new System.Drawing.Point(224, 74);
-            this.ck_kllb_fdtx.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ck_kllb_fdtx.Location = new System.Drawing.Point(230, 400);
+            this.ck_kllb_fdtx.Margin = new System.Windows.Forms.Padding(2);
             this.ck_kllb_fdtx.Name = "ck_kllb_fdtx";
             this.ck_kllb_fdtx.Size = new System.Drawing.Size(15, 14);
             this.ck_kllb_fdtx.TabIndex = 53;
@@ -653,8 +796,8 @@
             // ck_kllb_ystx
             // 
             this.ck_kllb_ystx.AutoSize = true;
-            this.ck_kllb_ystx.Location = new System.Drawing.Point(224, 48);
-            this.ck_kllb_ystx.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.ck_kllb_ystx.Location = new System.Drawing.Point(230, 374);
+            this.ck_kllb_ystx.Margin = new System.Windows.Forms.Padding(2);
             this.ck_kllb_ystx.Name = "ck_kllb_ystx";
             this.ck_kllb_ystx.Size = new System.Drawing.Size(15, 14);
             this.ck_kllb_ystx.TabIndex = 53;
@@ -665,7 +808,7 @@
             // 
             this.ck_kllb_xsmk.AutoSize = true;
             this.ck_kllb_xsmk.Location = new System.Drawing.Point(224, 23);
-            this.ck_kllb_xsmk.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            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(15, 14);
             this.ck_kllb_xsmk.TabIndex = 53;
@@ -675,7 +818,7 @@
             // label32
             // 
             this.label32.AutoSize = true;
-            this.label32.Location = new System.Drawing.Point(16, 102);
+            this.label32.Location = new System.Drawing.Point(22, 428);
             this.label32.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label32.Name = "label32";
             this.label32.Size = new System.Drawing.Size(53, 12);
@@ -685,7 +828,7 @@
             // label31
             // 
             this.label31.AutoSize = true;
-            this.label31.Location = new System.Drawing.Point(14, 76);
+            this.label31.Location = new System.Drawing.Point(20, 402);
             this.label31.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label31.Name = "label31";
             this.label31.Size = new System.Drawing.Size(53, 12);
@@ -695,7 +838,7 @@
             // label30
             // 
             this.label30.AutoSize = true;
-            this.label30.Location = new System.Drawing.Point(14, 50);
+            this.label30.Location = new System.Drawing.Point(20, 376);
             this.label30.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label30.Name = "label30";
             this.label30.Size = new System.Drawing.Size(53, 12);
@@ -715,7 +858,7 @@
             // button6
             // 
             this.button6.Location = new System.Drawing.Point(855, 47);
-            this.button6.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button6.Margin = new System.Windows.Forms.Padding(2);
             this.button6.Name = "button6";
             this.button6.Size = new System.Drawing.Size(71, 22);
             this.button6.TabIndex = 72;
@@ -869,6 +1012,7 @@
             // panel3
             // 
             this.panel3.AutoScroll = true;
+            this.panel3.Controls.Add(this.groupBox7);
             this.panel3.Controls.Add(this.groupBZ);
             this.panel3.Controls.Add(this.groupBox8);
             this.panel3.Controls.Add(this.groupBox6);
@@ -880,6 +1024,25 @@
             this.panel3.Size = new System.Drawing.Size(287, 644);
             this.panel3.TabIndex = 74;
             // 
+            // groupBZ
+            // 
+            this.groupBZ.Controls.Add(this.textBox_strBZ);
+            this.groupBZ.Location = new System.Drawing.Point(5, 1696);
+            this.groupBZ.Name = "groupBZ";
+            this.groupBZ.Size = new System.Drawing.Size(263, 139);
+            this.groupBZ.TabIndex = 7;
+            this.groupBZ.TabStop = false;
+            this.groupBZ.Text = "备注";
+            // 
+            // textBox_strBZ
+            // 
+            this.textBox_strBZ.Location = new System.Drawing.Point(5, 19);
+            this.textBox_strBZ.Margin = new System.Windows.Forms.Padding(2);
+            this.textBox_strBZ.Multiline = true;
+            this.textBox_strBZ.Name = "textBox_strBZ";
+            this.textBox_strBZ.Size = new System.Drawing.Size(252, 115);
+            this.textBox_strBZ.TabIndex = 11;
+            // 
             // groupBox9
             // 
             this.groupBox9.Controls.Add(this.ck_jggk);
@@ -912,31 +1075,11 @@
             this.label39.TabIndex = 75;
             this.label39.Text = "模板设置";
             // 
-            // groupBZ
-            // 
-            this.groupBZ.Controls.Add(this.textBox_strBZ);
-            this.groupBZ.Location = new System.Drawing.Point(5, 897);
-            this.groupBZ.Name = "groupBZ";
-            this.groupBZ.Size = new System.Drawing.Size(263, 139);
-            this.groupBZ.TabIndex = 7;
-            this.groupBZ.TabStop = false;
-            this.groupBZ.Text = "备注";
-            // 
-            // textBox_strBZ
-            // 
-            this.textBox_strBZ.Location = new System.Drawing.Point(5, 19);
-            this.textBox_strBZ.Margin = new System.Windows.Forms.Padding(2);
-            this.textBox_strBZ.Multiline = true;
-            this.textBox_strBZ.Name = "textBox_strBZ";
-            this.textBox_strBZ.Size = new System.Drawing.Size(252, 115);
-            this.textBox_strBZ.TabIndex = 11;
-            // 
             // OTSReport_TemplateDesignerRM
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1011, 751);
-            this.Controls.Add(this.groupBox7);
+            this.ClientSize = new System.Drawing.Size(1014, 751);
             this.Controls.Add(this.button6);
             this.Controls.Add(this.button1);
             this.Controls.Add(this.label39);
@@ -944,7 +1087,7 @@
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.button2);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "OTSReport_TemplateDesignerRM";
@@ -962,6 +1105,10 @@
             this.groupBox7.PerformLayout();
             this.groupBox8.ResumeLayout(false);
             this.groupBox8.PerformLayout();
+            this.groupBox3.ResumeLayout(false);
+            this.groupBox3.PerformLayout();
+            this.groupBox2.ResumeLayout(false);
+            this.groupBox2.PerformLayout();
             this.panel2.ResumeLayout(false);
             this.panel2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit();
@@ -972,10 +1119,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.panel3.ResumeLayout(false);
-            this.groupBox9.ResumeLayout(false);
-            this.groupBox9.PerformLayout();
             this.groupBZ.ResumeLayout(false);
             this.groupBZ.PerformLayout();
+            this.groupBox9.ResumeLayout(false);
+            this.groupBox9.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -1057,5 +1204,17 @@
         private System.Windows.Forms.Button button3;
         private System.Windows.Forms.GroupBox groupBZ;
         private System.Windows.Forms.TextBox textBox_strBZ;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.Label ParticleList_5;
+        private System.Windows.Forms.ComboBox cb_FrameChart_p2;
+        private System.Windows.Forms.Label ParticleList_4;
+        private System.Windows.Forms.ComboBox cb_FrameChart_p1;
+        private System.Windows.Forms.ComboBox comboBox_p3;
+        private System.Windows.Forms.Label ParticleList_3;
+        private System.Windows.Forms.ComboBox comboBox_p2;
+        private System.Windows.Forms.Label ParticleList_2;
+        private System.Windows.Forms.Label ParticleList_1;
+        private System.Windows.Forms.ComboBox comboBox_p1;
     }
 }

+ 70 - 57
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.cs

@@ -124,12 +124,14 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             #endregion
 
             #region 颗粒列表
-            //计算方式
-            //BindComboBox(DisplayPicutureType.AnalyzeDataChart, cb_kllb_jsfs, OTS_RETORT_PROP_GRID_ITEMS.CALCULATE_CHART_TYPE, (int)CALCULATE_CHART_TYPE.TRIO_CHART, OTS_RETORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE);
-            //BindComboBox(cb_kllb_jsfs, OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE);
-            //颗粒范围
-            //BindComboBox(DisplayPicutureType.AnalyzeDataTable, cb_kllb_klfw, OTS_RETORT_PROP_GRID_ITEMS.CALCULATE_TABLE_TYPE, (int)CALCULATE_TABLE_TYPE.PARTICALE_GENE_INFO, OTS_RETORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
-            //BindComboBox(cb_kllb_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //排序方式
+           
+            BindComboBox(comboBox_p1, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
+            BindComboBox(comboBox_p2, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
+            BindComboBox(comboBox_p3, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
+            BindComboBox(cb_FrameChart_p1, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
+            BindComboBox(cb_FrameChart_p2, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
+            //BindComboBox(cb_FrameChart_p3, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
             #endregion
 
         }
@@ -374,6 +376,21 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_ystx.ToString(), "M_KLLBXX", "b_ck_kllb_ystx");    //原始图像
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx.ToString(), "M_KLLBXX", "b_ck_kllb_fdtx");    //放大图像
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_npxx.ToString(), "M_KLLBXX", "b_ck_kllb_npxx");    //能谱图像
+
+               
+
+                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)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2.ToString(), "M_KLLBXX", "index_cb_kllb_sort_p2");//颗粒排序表列第二个可选参数(index)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p3.ToString(), "M_KLLBXX", "str_cb_kllb_sort_p3");//颗粒排序表列第三个可选参数(string)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3.ToString(), "M_KLLBXX", "index_cb_kllb_sort_p3");//颗粒排序表列第三个可选参数(index)
+
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p1.ToString(), "M_KLLBXX", "str_cb_kllb_chartSort_p1");//帧图表列第一个可选参数(string)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p1.ToString(), "M_KLLBXX", "index_cb_kllb_chartSort_p1");//帧图表列第一个可选参数(index)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2.ToString(), "M_KLLBXX", "str_cb_kllb_chartSort_p2");//帧图表列第二个可选参数(string)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2.ToString(), "M_KLLBXX", "index_cb_kllb_chartSort_p2");//帧图表列第二个可选参数(index)
+
             }
             return true;
         }
@@ -536,6 +553,22 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_ystx.ToString(), "M_KLLBXX", "b_ck_kllb_ystx");    //原始图像
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx.ToString(), "M_KLLBXX", "b_ck_kllb_fdtx");    //放大图像
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_npxx.ToString(), "M_KLLBXX", "b_ck_kllb_npxx");    //能谱图像
+
+                
+
+                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)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2.ToString(), "M_KLLBXX", "index_cb_kllb_sort_p2");//颗粒排序表列第二个可选参数(index)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p3.ToString(), "M_KLLBXX", "str_cb_kllb_sort_p3");//颗粒排序表列第三个可选参数(string)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3.ToString(), "M_KLLBXX", "index_cb_kllb_sort_p3");//颗粒排序表列第三个可选参数(index)
+
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p1.ToString(), "M_KLLBXX", "str_cb_kllb_chartSort_p1");//帧图表列第一个可选参数(string)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p1.ToString(), "M_KLLBXX", "index_cb_kllb_chartSort_p1");//帧图表列第一个可选参数(index)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2.ToString(), "M_KLLBXX", "str_cb_kllb_chartSort_p2");//帧图表列第二个可选参数(string)
+                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2.ToString(), "M_KLLBXX", "index_cb_kllb_chartSort_p2");//帧图表列第二个可选参数(index)
+                //xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p3.ToString(), "M_KLLBXX", "str_cb_kllb_chartSort_p3");//帧图表列第三个可选参数(string)
+                //xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3.ToString(), "M_KLLBXX", "index_cb_kllb_chartSort_p3");//帧图表列第三个可选参数(index)
             }
         }
 
@@ -562,33 +595,16 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_jsfs = cb_klcc_jsfs.SelectedIndex;
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_klcc_ljb = cb_klcc_ljb.Text;//粒级表
             m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_ljb = cb_klcc_ljb.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_klcc_klfw = cb_klcc_klfw.Text;//颗粒范围
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_klfw = cb_klcc_klfw.SelectedIndex;
-
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_cb_jzwfl_xsmk = cb_jzwfl_xsmk.Checked;
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_xstx = cb_jzwfl_xstx.Text;//选择图像
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx = cb_jzwfl_xstx.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_jsfs = cb_jzwfl_jsfs.Text;//计算方式
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_jsfs = cb_jzwfl_jsfs.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_ljb = cb_jzwfl_ljb.Text;//粒级表
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_ljb = cb_jzwfl_ljb.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_klfw = cb_jzwfl_klfw.Text;//颗粒范围
-            //m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_klfw = cb_jzwfl_klfw.SelectedIndex;
+           
 
             //元素分析结果
             m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk = ck_ysfx_xsmk.Checked;
-            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yxfx_jsfs = cb_yxfx_jsfs.Text;//计算方式
-            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yxfx_jsfs = cb_yxfx_jsfs.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_ysfx_klfw = cb_ysfx_klfw.Text;//颗粒范围
-            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_ysfx_klfw = cb_ysfx_klfw.SelectedIndex;
+           
             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.str_cb_syxt_jsfs = cb_syxt_jsfs.Text;//计算方式
-            //m_OTSReport_Export.m_mbszclass.M_SYXT.index_cb_syxt_jsfs = cb_syxt_jsfs.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_klfw = cb_syxt_klfw.Text;//颗粒范围
-            //m_OTSReport_Export.m_mbszclass.M_SYXT.index_cb_syxt_klfw = cb_syxt_klfw.SelectedIndex;
+           
             m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_ljb = cb_syxt_ljb.Text;//粒级表
             m_OTSReport_Export.m_mbszclass.M_SYXT.index_cb_syxt_ljb = cb_syxt_ljb.SelectedIndex;
             m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_mhxssl = cb_syxt_mhxssl.Text;//每行显示数量
@@ -612,10 +628,19 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             //颗粒列表信息
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk = ck_kllb_xsmk.Checked;
-            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_jsfs = cb_kllb_jsfs.Text;//计算方式
-            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_jsfs = cb_kllb_jsfs.SelectedIndex;
-            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_klfw = cb_kllb_klfw.Text;//颗粒范围
-            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_klfw = cb_kllb_klfw.SelectedIndex;
+            
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p1 = comboBox_p1.Text;//颗粒列表行第一个字段的可选参数
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p1 = comboBox_p1.SelectedIndex;
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_sort_p2 = comboBox_p2.Text;//颗粒列表行第二个字段的可选参数
+            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_KLLBXX.str_cb_kllb_chartSort_p1 = cb_FrameChart_p1.Text;//颗粒帧图表行第一个字段的可选参数
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p1 = cb_FrameChart_p1.SelectedIndex;
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p2 = cb_FrameChart_p2.Text;//颗粒帧图表行第二个字段的可选参数
+            m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2 = cb_FrameChart_p2.SelectedIndex;
+           
+
             if (ck_kllb_xsmk.Checked)
             {
                 //m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32(tb_kllb_ylsx.Text.Trim());//数量上限
@@ -658,33 +683,16 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             cb_klcc_jsfs.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_jsfs;
             //cb_klcc_ljb.Text = m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_klcc_ljb;//粒级表
             cb_klcc_ljb.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_ljb;
-            //cb_klcc_klfw.Text = m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_klcc_klfw;//颗粒范围
-            //cb_klcc_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_klcc_klfw;
-
-            //cb_jzwfl_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_cb_jzwfl_xsmk;
-            //cb_jzwfl_xstx.Text = m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_xstx;//选择图像
-            //cb_jzwfl_xstx.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx;
-            //cb_jzwfl_jsfs.Text = m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_jsfs;//计算方式
-            //cb_jzwfl_jsfs.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_jsfs;
-            //cb_jzwfl_ljb.Text = m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_ljb;//粒级表
-            //cb_jzwfl_ljb.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_ljb;
-            //cb_jzwfl_klfw.Text = m_OTSReport_Export.m_mbszclass.M_KLFXJG.str_cb_jzwfl_klfw;//颗粒范围
-            //cb_jzwfl_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.index_cb_jzwfl_klfw;
+           
 
             //元素分析结果
             ck_ysfx_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk;
-            //cb_yxfx_jsfs.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yxfx_jsfs;//计算方式
-            //cb_yxfx_jsfs.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yxfx_jsfs;
-            //cb_ysfx_klfw.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_ysfx_klfw;//颗粒范围
-            //cb_ysfx_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_ysfx_klfw;
+         
             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;
-            //cb_syxt_jsfs.Text = m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_jsfs;//计算方式
-            //cb_syxt_jsfs.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_SYXT.index_cb_syxt_jsfs;
-            //cb_syxt_klfw.Text = m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_klfw;//颗粒范围
-            //cb_syxt_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_SYXT.index_cb_syxt_klfw;
+           
 
             cb_syxt_ljb.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_SYXT.index_cb_syxt_ljb;//粒级表
 
@@ -705,16 +713,18 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
             //颗粒列表信息
             ck_kllb_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk;
-            //cb_kllb_jsfs.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_jsfs;//计算方式
-            //cb_kllb_jsfs.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_jsfs;
-            //cb_kllb_klfw.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_cb_kllb_klfw;//颗粒范围
-            //cb_kllb_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_klfw;
-
-            //tb_kllb_ylsx.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx.ToString();//数量上限
-            //tb_kllb_sxys.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_tb_kllb_sxys;//显示元素
+          
             ck_kllb_ystx.Checked = m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_ystx;//原始图像
             ck_kllb_fdtx.Checked = m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx;//放大图像
             ck_kllb_npxx.Checked = m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_npxx;//能谱图像
+
+           
+            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;
+            cb_FrameChart_p1.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p1;
+            cb_FrameChart_p2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p2;
+            //cb_FrameChart_p3.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3;
         }
 
         /// <summary>
@@ -738,6 +748,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 case OTS_REPORT_PROP_GRID_ITEMS.TRIO_CHART_TYPE://三元相图模板
                     list_str = m_OTSReport_Export.m_ReportApp.m_rstDataMgr.GetTriTemplateNameList();
                     break;
+                case OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST://三元相图模板
+                    list_str = m_OTSReport_Export.m_ReportApp.m_rstDataMgr.getTableData();
+                    break;
             }
 
             for (int i = 0; i < list_str.Count; i++)

+ 5 - 1
OTSIncAReportApp/2-CommonFunction/OTSDataMgrFunction/ResultDataMgr.cs

@@ -273,7 +273,11 @@ namespace OTSIncAReportApp.OTSDataMgrFunction
             List<string> pr_str = new List<string>() { "全部颗粒","选择颗粒" };
             return pr_str;
         }
-
+        public List<string> getTableData()
+        {
+            List<string> strlist = new List<string>() { "Area", "DMAX", "Hardness", "AveGray" };
+            return strlist;
+        }
 
         #endregion
 

+ 102 - 118
OTSIncAReportTemplate/OTSIncAReportTemplate.cs

@@ -25,11 +25,13 @@ namespace OTSIncAReportTemplate
         //参数3:是要执行查看报表的类型,输出主报表,还是输出颗粒列表
         //参数4:打开主报表时是是指定夹杂物的数量,打开颗粒列表时,是颗粒列表显示的范围如,0-50,50-100
         //参数5:是要执行查看报表的类型,输出主报表时,指定读取的标记帧图图像范围,如0-50,50-100,输出颗粒列表时无用
+        //参数6:导出颗粒列表类型
         string m_arg1 = "";
         string m_arg2 = "";
         string m_arg3 = "";
         string m_arg4 = "";
         string m_arg5 = "";
+       
         #endregion
 
         #region 构造函数及窗体加载
@@ -69,21 +71,12 @@ namespace OTSIncAReportTemplate
                 m_arg3 = args[2].Replace("^", " ");
                 m_arg4 = args[3].Replace("^", " ");
                 m_arg5 = args[4].Replace("^", " ");
+                
             }
             else
             {
                 ////测试
-                //m_arg1 = "E:\\ResultFile\\东钢\\11.24\\002\\Sample1\\ReportTemplateDBParticleList.db";
-                //m_arg2 = "./Config/ProData/ReportTemplateConfig.xml";
-                //m_arg3 = "ParticleListReport";
-                //m_arg4 = "33-66";
-                //m_arg5 = "0-100";
-
-                //m_arg1 = "E:\\ResultFile\\keda20201209\\Sample1\\ReportTemplateDBParticleList.db";
-                //m_arg2 = "./Config/ProData/ReportTemplateConfig.xml";
-                //m_arg3 = "ParticleListReport";
-                //m_arg4 = "0-983";
-                //m_arg5 = "";
+               
 
                 m_arg1 = "C:\\Users\\admin\\Desktop\\马钢\\71-3\\71-3\\Sample71-3\\ReportTemplateDBParticleList.db";
                 m_arg2 = "./Config/ProData/ReportTemplateConfig.xml";
@@ -91,7 +84,7 @@ namespace OTSIncAReportTemplate
                 m_arg4 = "100";
                 m_arg5 = "0-100";
             }
-            //MessageBox.Show("");
+            //MessageBox.Show(m_arg5);
 
             //初始化xml类
             xmlutil = new XmlConfigUtil(m_arg2);
@@ -168,14 +161,15 @@ namespace OTSIncAReportTemplate
             #region 选择报告模板
             if (m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk == true && m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk == true && m_mbszclass.M_YSFXJG.b_ck_yscf_xsmk == true)
             {
-                if (m_arg4== "inca")
-                {
-                    rmReport1.LoadFromFile("Resources\\ReportTemplate\\Inca.rmf");
-                }
-                else
-                {
-                    rmReport1.LoadFromFile("Resources\\ReportTemplate\\Cleanness.rmf");
-                }
+                //if (m_arg4== "inca")
+                //{
+                //rmReport1.LoadFromFile("Resources\\ReportTemplate\\Inca.rmf");
+                //}
+                //else
+                //{
+                //    rmReport1.LoadFromFile("Resources\\ReportTemplate\\Cleanness.rmf");
+                //}
+                rmReport1.LoadFromFile("Resources\\ReportTemplate\\OTS_Report.rmf");
             }
             else
             if (m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk == false && m_mbszclass.M_YSFXJG.b_ck_yscf_xsmk == false && m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk == true)
@@ -216,8 +210,8 @@ namespace OTSIncAReportTemplate
             rmReport1.AddDataSet(ls_dt_PicInclusionAreaClassRatio, "Pic_InclusionareaClassRatio");
 
 
-            if (m_arg4 == "inca")
-            {
+            //if (m_arg4 == "inca")
+            //{
                 if (m_mbszclass.M_SYXT.b_ck_syxt_xsmk)//判断三元相图是否显示
                 {
                     rmReport1.FindObject("GroupHeader1").Prop["Visible"] = true;
@@ -240,19 +234,11 @@ namespace OTSIncAReportTemplate
                         //ls_dt_picSYXT3T.Clear();
                     }
                 }
-                else
-                {
-                    //DataTable dataTable = new DataTable();
-                    //rmReport1.AddDataSet(dataTable, "PicSYXT2T");//三元相图
-                    //rmReport1.AddDataSet(dataTable, "PicSYXT3T");
-                    //dataTable.Dispose();
-                    //dataTable.Clear();
-                    //rmReport1.FindObject("GroupHeader81").Prop["Visible"] = false;
-                    //rmReport1.FindObject("MasterData96").Prop["Visible"] = false;
-                    //rmReport1.FindObject("MasterData10").Prop["Visible"] = false;
-                    //rmReport1.DeletePage(3);
-                }
-            }
+                //else
+                //{
+                  
+                //}
+            //}
 
 
             if (m_mbszclass.M_SY.b_ck_ypsm)//判断样品说明是否显示
@@ -309,30 +295,12 @@ namespace OTSIncAReportTemplate
                     rmReport1.FindObject("MasterData2").Prop["Visible"] = false;
                     rmReport1.FindObject("MasterData126").Prop["Visible"] = false;
                 }
-                if (m_mbszclass.M_KLFXJG.b_cb_jzwfl_xsmk)//判断夹杂物分类图
-                {
-                    //DataTable ls_dt_picKL = list_dt.Where(aa => aa.TableName.Contains("PicKL")).ToList()[0];// 用于颗粒图chart
-                    //rmReport1.AddDataSet(ls_dt_picKL, "PicKL");
-                    //ls_dt_picKL.Dispose();
-                    ////ls_dt_picKL.Clear();
-                    //rmReport1.FindObject("MasterData95").Prop["Visible"] = true;
-                }
-                else
-                {
-                    //DataTable dataTable = new DataTable();
-                    //rmReport1.AddDataSet(dataTable, "PicKL");
-                    //dataTable.Dispose();
-                    //dataTable.Clear();
-                    //rmReport1.FindObject("MasterData95").Prop["Visible"] = false;
-                }
+             
             }
 
             if (m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk == false && m_mbszclass.M_YSFXJG.b_ck_yscf_xsmk == false)//如果元素分析表和显示元素成分图都不显示
             {
-                //rmReport1.FindObject("MasterData3").Prop["Visible"] = false;
-                //rmReport1.FindObject("MasterData42").Prop["Visible"] = false;
-                //rmReport1.FindObject("MasterData91").Prop["Visible"] = false;
-                //rmReport1.DeletePage(5);
+            
             }
             else
             {
@@ -355,11 +323,9 @@ namespace OTSIncAReportTemplate
                     rmReport1.AddDataSet(ls_dt_ElementSubdivision_Value, "ElementSubdivision_Value");
 
                     ls_dt_elementname.Dispose();
-                    //ls_dt_elementname.Clear();
+                  
                     ls_dt_element.Dispose();
-                    //ls_dt_element.Clear();
-                    //rmReport1.FindObject("MasterData3").Prop["Visible"] = true;
-                    //rmReport1.FindObject("MasterData42").Prop["Visible"] = true;
+                 
                 }
                 else
                 {
@@ -377,8 +343,7 @@ namespace OTSIncAReportTemplate
                     DataTable ls_dt_picYS = list_dt.Where(aa => aa.TableName.Contains("PicYS")).ToList()[0];//用于元素图chart  
                     rmReport1.AddDataSet(ls_dt_picYS, "PicYS");
                     ls_dt_picYS.Dispose();
-                    //ls_dt_picYS.Clear();
-                    //rmReport1.FindObject("MasterData91").Prop["Visible"] = true;
+                 
                 }
                 else
                 {
@@ -386,32 +351,22 @@ namespace OTSIncAReportTemplate
                     rmReport1.AddDataSet(dataTable, "PicYS");
                     dataTable.Dispose();
                     dataTable.Clear();
-                    //rmReport1.FindObject("MasterData91").Prop["Visible"] = false;
+                   
                 }
 
             }
             if (m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk)//判断显示颗粒列表
             {
-                //if (Convert.ToInt32(m_arg4) < 21)
-                //{
-                //    DataTable ls_dt_largest = list_dt.Where(aa => aa.TableName.Contains("Largest20")).ToList()[0];
-                //    rmReport1.AddDataSet(ls_dt_largest, "Largest20");
-                //    ls_dt_largest.Dispose();
-                //    //ls_dt_largest.Clear();
-                //}
-                //else
-                //{
+             
                     DataTable ls_dt_largest = list_dt.Where(aa => aa.TableName.Contains("Largest20")).ToList()[0];
                     rmReport1.AddDataSet(ls_dt_largest, "Largest20");
                     ls_dt_largest.Dispose();
-                    //ls_dt_largest.Clear();
+                   
 
                     DataTable ls_dt_largest2 = list_dt.Where(aa => aa.TableName.Contains("Largest2")).ToList()[0];
                     rmReport1.AddDataSet(ls_dt_largest2, "Largest2");
                     ls_dt_largest2.Dispose();
-                    //ls_dt_largest2.Clear();
-                //}
-                //FlushMemory();
+                  
                 #region 主副表
                 DataTable ls_dt_frame = list_dt.Where(aa => aa.TableName.Contains("FrameGraphSubTable")).ToList()[0].Copy();//副表
                 DataTable ls_dt_fielddt = list_dt.Where(aa => aa.TableName.Contains("field_dt")).ToList()[0].Copy();//帧图主表
@@ -424,93 +379,97 @@ namespace OTSIncAReportTemplate
                 rmReport1.AddDataSet(ls_dt_fielddt, "CustomersDS");
                 rmReport1.AddDetailDataSet(ls_dt_frame, "OrdersDS", "CustomersDS", myRela1);
                 ls_dt_frame.Dispose();
-                //ls_dt_frame.Clear();
+               
                 ls_dt_fielddt.Dispose();
-                //ls_dt_fielddt.Clear();
+
                 #endregion
-                //FlushMemory();
+                rmReport1.FindObject("Memo66").Prop["Text"] = m_mbszclass.M_KLLBXX.str_cb_kllb_Sort_p1.ToString();
+                rmReport1.FindObject("Memo101").Prop["Text"] = m_mbszclass.M_KLLBXX.str_cb_kllb_Sort_p2.ToString();
+                rmReport1.FindObject("Memo52").Prop["Text"] = m_mbszclass.M_KLLBXX.str_cb_kllb_Sort_p3.ToString();
+                rmReport1.FindObject("Memo155").Prop["Text"] = m_mbszclass.M_KLLBXX.str_cb_kllb_ChartSort_p1.ToString();
+                rmReport1.FindObject("Memo154").Prop["Text"] = m_mbszclass.M_KLLBXX.str_cb_kllb_ChartSort_p2.ToString();
 
                 rmReport1.FindObject("GroupHeader12").Prop["Visible"] = true;
                 rmReport1.FindObject("MasterData49").Prop["Visible"] = true;
                 if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx != true && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx != true)//原图开,放大图关,能谱关
                 {
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = true;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = false;
                     //最原始的数据
-                    rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
-                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.5;//原图像
-                    rmReport1.FindObject("Picture69").Prop["Left"] = 2.9;//放大图
-                    rmReport1.FindObject("Picture70").Prop["Left"] = 5.3;//能谱
-                    rmReport1.FindObject("Picture70").Prop["Width"] = 13;//能谱长度
+                    //rmReport1.FindObject("Memo44").Prop["Left"] = 0.2;//原图像框
+                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.2;//原图像
+                    rmReport1.FindObject("Picture69").Prop["Left"] = 2.6;//放大图
+                    rmReport1.FindObject("Picture70").Prop["Left"] = 5;//能谱
+                    rmReport1.FindObject("Picture70").Prop["Width"] = 13.8;//能谱长度
                 }
                 else if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx != true)//原图开,放大图开,能谱关
                 {
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = true;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = false;
-                    rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
-                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.5;//原图像
-                    rmReport1.FindObject("Picture69").Prop["Left"] = 2.9;//放大图
-                    rmReport1.FindObject("Picture70").Prop["Left"] = 5.3;//能谱
-                    rmReport1.FindObject("Picture70").Prop["Width"] = 13;//能谱长度
+                    //rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
+                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.2;//原图像
+                    rmReport1.FindObject("Picture69").Prop["Left"] = 2.6;//放大图
+                    rmReport1.FindObject("Picture70").Prop["Left"] = 5;//能谱
+                    rmReport1.FindObject("Picture70").Prop["Width"] = 13.8;//能谱长度
                 }
                 else if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx == true)//原图开,放大图开,能谱开
                 {
 
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = true;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = true;
-                    rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
-                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.5;//原图像
-                    rmReport1.FindObject("Picture69").Prop["Left"] = 2.9;//放大图
-                    rmReport1.FindObject("Picture70").Prop["Left"] = 5.3;//能谱
-                    rmReport1.FindObject("Picture70").Prop["Width"] = 13;//能谱长度
+                    //rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
+                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.2;//原图像
+                    rmReport1.FindObject("Picture69").Prop["Left"] = 2.6;//放大图
+                    rmReport1.FindObject("Picture70").Prop["Left"] = 5;//能谱
+                    rmReport1.FindObject("Picture70").Prop["Width"] = 13.8;//能谱长度
                 }
                 else if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx == false && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx == true)//原图开,放大图关,能谱开
                 {
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = true;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = true;
 
 
-                    rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
-                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.5;//原图像
-                    rmReport1.FindObject("Picture70").Prop["Left"] = 2.9;
-                    rmReport1.FindObject("Picture70").Prop["Width"] = 15.4;
+                    //rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
+                    rmReport1.FindObject("Picture46").Prop["Left"] = 0.2;//原图像
+                    rmReport1.FindObject("Picture70").Prop["Left"] = 2.6;
+                    rmReport1.FindObject("Picture70").Prop["Width"] = 16.2;
                 }
                 else if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx != true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx == true && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx == true)//原图关,放大图开,能谱开
                 {
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = false;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = true;
-                    rmReport1.FindObject("Picture69").Prop["Left"] = 0.5;
-                    rmReport1.FindObject("Picture70").Prop["Left"] = 2.9;
-                    rmReport1.FindObject("Picture70").Prop["Width"] = 15.4;
+                    rmReport1.FindObject("Picture69").Prop["Left"] = 0.2;
+                    rmReport1.FindObject("Picture70").Prop["Left"] = 2.6;
+                    rmReport1.FindObject("Picture70").Prop["Width"] = 16.2;
                 }
                 else if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx != true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx != true && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx == true)//原图关,放大图关,能谱开
                 {
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = false;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = true;
 
                     rmReport1.FindObject("Picture70").Prop["Left"] = 0.5;
-                    rmReport1.FindObject("Picture70").Prop["Width"] = 17.8;
+                    rmReport1.FindObject("Picture70").Prop["Width"] = 18.6;
                 }
                 else if (m_mbszclass.M_KLLBXX.b_ck_kllb_ystx != true && m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx != true && m_mbszclass.M_KLLBXX.b_ck_kllb_npxx != true) //原图关,放大图关,能谱关
                 {
-                    rmReport1.FindObject("Memo44").Prop["Visible"] = false;
+                    //rmReport1.FindObject("Memo44").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture46").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = false;
                     //最原始的数据
-                    rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
+                    //rmReport1.FindObject("Memo44").Prop["Left"] = 0.5;//原图像框
                     rmReport1.FindObject("Picture46").Prop["Left"] = 1.4;//原图像
                     rmReport1.FindObject("Picture69").Prop["Left"] = 2.9;//放大图
                     rmReport1.FindObject("Picture70").Prop["Left"] = 5.3;//能谱
@@ -522,15 +481,12 @@ namespace OTSIncAReportTemplate
                     rmReport1.FindObject("Picture46").Prop["Visible"] = false;
                     rmReport1.FindObject("Picture69").Prop["Visible"] = true;
                     rmReport1.FindObject("Picture70").Prop["Visible"] = false;
-                    rmReport1.FindObject("Picture69").Prop["Left"] = 0.5;//放大图
+                    rmReport1.FindObject("Picture69").Prop["Left"] = 0.2;//放大图
                 }
             }
             else
             {
 
-                //rmReport1.FindObject("GroupHeader12").Prop["Visible"] = false;
-                //rmReport1.FindObject("MasterData49").Prop["Visible"] = false;
-                //rmReport1.DeletePage(2);
             }
             #endregion
 
@@ -886,6 +842,12 @@ namespace OTSIncAReportTemplate
             m_mbszclass.M_KLLBXX.b_ck_kllb_ystx = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_ystx"));    //原始图像
             m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_fdtx"));    //放大图像
             m_mbszclass.M_KLLBXX.b_ck_kllb_npxx = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_npxx"));    //能谱图像
+            
+            m_mbszclass.M_KLLBXX.str_cb_kllb_Sort_p1 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_sort_p1"));//颗粒列表列第一个可选参数
+            m_mbszclass.M_KLLBXX.str_cb_kllb_Sort_p2 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_sort_p2"));//颗粒列表列第二个可选参数
+            m_mbszclass.M_KLLBXX.str_cb_kllb_Sort_p3 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_sort_p3"));//颗粒列表列第三个可选参数
+            m_mbszclass.M_KLLBXX.str_cb_kllb_ChartSort_p1 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_chartSort_p1"));//帧图表列第一个可选参数
+            m_mbszclass.M_KLLBXX.str_cb_kllb_ChartSort_p2 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_chartSort_p2"));//帧图表列第二个可选参数
         }
         /// <summary>
         /// 从配置文件中读取报告模板路径
@@ -929,12 +891,14 @@ namespace OTSIncAReportTemplate
             list_dt.Add(ls_ResultGrid);
             
 
-            string strmix = m_arg5.Substring(0, m_arg5.IndexOf("-"));
-            string strmax = m_arg5.Substring(m_arg5.IndexOf("-") + 1, m_arg5.Length - m_arg5.IndexOf("-") - 1);
+            //string strmix = m_arg5.Substring(0, m_arg5.IndexOf("-"));
+            //MessageBox.Show(strmix);
+            //string strmax = m_arg5.Substring(m_arg5.IndexOf("-") + 1, m_arg5.Length - m_arg5.IndexOf("-") - 1);
+            //MessageBox.Show(strmax);
 
-            DataTable ls_Largest_frame2 = sh.ExecuteQuery("select * from Largest_frame where cast(fieldid as int) > " + strmix + " and cast(fieldid as int) < " + strmax + " ");
-            ls_Largest_frame2.TableName = "Largest_frame";
-            list_dt.Add(ls_Largest_frame2);
+            //DataTable ls_Largest_frame2 = sh.ExecuteQuery("select * from Largest_frame where cast(fieldid as int) > " + "1" + " and cast(fieldid as int) < " + "100" + " ");
+            //ls_Largest_frame2.TableName = "Largest_frame";
+            //list_dt.Add(ls_Largest_frame2);
 
             //DataTable ls_FrameGraphSubTable = sh.ExecuteQuery("select * from FrameGraphSubTable where cast(fieldid as int) > " + strmix + " and cast(fieldid as int) < " + strmax + " ");
             DataTable ls_FrameGraphSubTable = sh.ExecuteQuery("select * from FrameGraphSubTable ");
@@ -1554,6 +1518,26 @@ namespace OTSIncAReportTemplate
             /// </summary>
             public bool b_ck_kllb_npxx { get; set; }
 
+            /// <summary>
+            /// 颗粒排序表第一个可选参数
+            /// </summary>
+            public string str_cb_kllb_Sort_p1 { get; set; }
+            /// <summary>
+            /// 颗粒排序表第二个可选参数
+            /// </summary>
+            public string str_cb_kllb_Sort_p2 { get; set; }
+            /// <summary>
+            /// 颗粒排序表第三个可选参数
+            /// </summary>
+            public string str_cb_kllb_Sort_p3 { get; set; }
+            /// <summary>
+            /// 帧图表第一个可选参数
+            /// </summary>
+            public string str_cb_kllb_ChartSort_p1 { get; set; }
+            /// <summary>
+            /// 帧图第二个可选参数
+            /// </summary>
+            public string str_cb_kllb_ChartSort_p2 { get; set; }
         }
         #endregion