Sfoglia il codice sorgente

优化报告导出速度,删除没有用的导出选项

zhangjiaxin 3 anni fa
parent
commit
7722979d83

BIN
Bin/x64/Debug/Resources/ReportTemplate/group1.rmf


+ 265 - 269
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_Export.cs

@@ -1244,393 +1244,350 @@ namespace OTSIncAReportApp
                 //创建表 ResultGrid
                 string[] strcolumns_ResultGrid = { "CLJGMC", "YXSJ", "SCZS", "FLFA", "YJCTZ", "SCMJ", "CKBZ" };
                 string[] strcoltypes_ResultGrid = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
-                sh.CreateTable("ResultGrid", strcolumns_ResultGrid, strcoltypes_ResultGrid);
+
 
                 //创建表 Largest_frame
                 string[] strcolumns_Largest_frame = { "pid", "Size", "Width", "Class", "ColName1", "ColName2", "ColName3", "ColName4", "ColName5", "ColName6",
                 "ColVal1", "ColVal2", "ColVal3", "ColVal4", "ColVal5", "ColVal6" ,"FieldId","p1"};
                 string[] strcoltypes_Largest_frame = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" ,
             "INT","BLOB"};
-                sh.CreateTable("Largest_frame", strcolumns_Largest_frame, strcoltypes_Largest_frame);
+                
 
                 //创建表 Largest20
                 string[] strcolumns_Largest20 = { "pid", "Size", "Width", "Class", "ColName1", "ColName2", "ColName3", "ColName4", "ColName5", "ColName6",
                 "ColVal1", "ColVal2", "ColVal3", "ColVal4", "ColVal5", "ColVal6" ,"p1" ,"p2" ,"p3"};
                 string[] strcoltypes_Largest20 = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" ,
             "BLOB","BLOB","BLOB"};
-                sh.CreateTable("Largest20", strcolumns_Largest20, strcoltypes_Largest20);
+                
 
                 //创建表 Largest2new
-                string[] strcolumns_Largest2new = { "pid", "Size", "Width", "Class", "ColName1", "ColName2", "ColName3", "ColName4", "ColName5", "ColName6",
-                "ColVal1", "ColVal2", "ColVal3", "ColVal4", "ColVal5", "ColVal6" ,"p1"};
-                string[] strcoltypes_Largest2new = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" ,
-            "BLOB"};
-                sh.CreateTable("Largest2new", strcolumns_Largest2new, strcoltypes_Largest2new);
+            //    string[] strcolumns_Largest2new = { "pid", "Size", "Width", "Class", "ColName1", "ColName2", "ColName3", "ColName4", "ColName5", "ColName6",
+            //    "ColVal1", "ColVal2", "ColVal3", "ColVal4", "ColVal5", "ColVal6" ,"p1"};
+            //    string[] strcoltypes_Largest2new = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" ,
+            //"BLOB"};
+            //    sh.CreateTable("Largest2new", strcolumns_Largest2new, strcoltypes_Largest2new);
 
                 //创建表 field_dt
                 string[] strcolumns_field_dt = { "FieldId", "FieldImg" };
                 string[] strcoltypes_field_dt = { "INT", "BLOB" };
-                sh.CreateTable("field_dt", strcolumns_field_dt, strcoltypes_field_dt);
-
+                
 
                 //创建表 ElementName
                 string[] strcolumns_ElementName = { "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9","e10","e11","e12","e13","e14" };
                 string[] strcoltypes_ElementName = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
-                sh.CreateTable("ElementName", strcolumns_ElementName, strcoltypes_ElementName);
+
 
                 //创建表 ElementValue
                 string[] strcolumns_ElementValue = { "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9","e10","e11","e12","e13","e14", "PName", "Count" , "AllElements" };
                 string[] strcoltypes_ElementValue = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
-                sh.CreateTable("ElementValue", strcolumns_ElementValue, strcoltypes_ElementValue);
+
 
                 //创建表 PartSize
                 string[] strcolumns_PartSize = { "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9" };
                 string[] strcoltypes_PartSize = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
-                sh.CreateTable("PartSize", strcolumns_PartSize, strcoltypes_PartSize);
+
 
                 //创建表 Particel
                 string[] strcolumns_Particel = { "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "SName", "total" };
                 string[] strcoltypes_Particel = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
-                sh.CreateTable("Particel", strcolumns_Particel, strcoltypes_Particel);
 
                 //创建表 PicKL
                 string[] strcolumns_PicKL = { "pict" };
                 string[] strcoltypes_PicKL = { "BLOB" };
-                sh.CreateTable("PicKL", strcolumns_PicKL, strcoltypes_PicKL);
+                
 
                 //创建表 夹杂物面积比
                 string[] strcolumns_PicInclusionAreaRatio = { "pict" };
                 string[] strcoltypes_PicInclusionAreaRatio = { "BLOB" };
-                sh.CreateTable("PicInclusionAreaRatio", strcolumns_PicKL, strcoltypes_PicKL);
+                
 
                 //创建表 PicYS
                 string[] strcolumns_PicYS = { "pict" };
                 string[] strcoltypes_PicYS = { "BLOB" };
-                sh.CreateTable("PicYS", strcolumns_PicYS, strcoltypes_PicYS);
+                
 
                 //创建表 PicSYXT2T
                 string[] strcolumns_PicSYXT2T = { "pict", "pict2" };
                 string[] strcoltypes_PicSYXT2T = { "BLOB", "BLOB" };
-                sh.CreateTable("PicSYXT2T", strcolumns_PicSYXT2T, strcoltypes_PicSYXT2T);
+                
 
                 //创建表 PicSYXT3T
                 string[] strcolumns_PicSYXT3T = { "pict", "pict2", "pict3" };
                 string[] strcoltypes_PicSYXT3T = { "BLOB", "BLOB", "BLOB" };
-                sh.CreateTable("PicSYXT3T", strcolumns_PicSYXT3T, strcoltypes_PicSYXT3T);
 
-                //创建 颗粒面积比表
+
                 string[] strcolums_AreaRatio = { "c1", "c2", "c3", "c4", "c5" };
                 string[] strcoltypes_AreaRatio = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
-                sh.CreateTable("AreaRatio", strcolums_AreaRatio, strcoltypes_AreaRatio);
+                
 
                 //将数据插入到数据库中
                 List<DataTable> list_dt = m_export_reporttemplate.m_list_dt;
-                DataTable ls_AreaRatio = list_dt.Where(aa => aa.TableName.Contains("InclusionAreaRatio")).ToList()[0];
-                for (int i = 0; i < ls_AreaRatio.Rows.Count; i++)
-                {
-                    string ls_sqlstr = "insert into AreaRatio (c1, c2, c3, c4, c5) values('"
-                       + ls_AreaRatio.Rows[i][0].ToString() + "','"
-                       + ls_AreaRatio.Rows[i][1].ToString() + "','"
-                       + ls_AreaRatio.Rows[i][2].ToString() + "','"
-                       + ls_AreaRatio.Rows[i][3].ToString() + "','"
-                       + ls_AreaRatio.Rows[i][4].ToString() + "')";
-                    int iresult = sh.ExecuteQueryResult(ls_sqlstr, tr);
-                }
+                //创建 颗粒面积比表
+                if (JudgeWhetherTheTableExists(list_dt, "InclusionAreaRatio"))
+                    DataTableSurfaceSaveToDB(list_dt, "AreaRatio", "InclusionAreaRatio", sh, strcolums_AreaRatio, strcoltypes_AreaRatio, tr);
+
+                //创建 样品信息表
+                if (JudgeWhetherTheTableExists(list_dt, "ResultGrid"))
+                    DataTableSurfaceSaveToDB(list_dt, "ResultGrid", "ResultGrid",sh, strcolumns_ResultGrid, strcoltypes_ResultGrid,tr);
 
-                    DataTable ls_resultgrid = list_dt.Where(aa => aa.TableName.Contains("ResultGrid")).ToList()[0];
-                for (int i = 0; i < ls_resultgrid.Rows.Count; i++)
-                {
-                    string ls_sqlstr = "insert into ResultGrid (CLJGMC, YXSJ, SCZS, FLFA, YJCTZ, SCMJ, CKBZ) values('"
-                        + ls_resultgrid.Rows[i][0].ToString() + "','"
-                        + ls_resultgrid.Rows[i][1].ToString() + "','"
-                        + ls_resultgrid.Rows[i][2].ToString() + "','"
-                        + ls_resultgrid.Rows[i][3].ToString() + "','"
-                        + ls_resultgrid.Rows[i][4].ToString() + "','"
-                        + ls_resultgrid.Rows[i][5].ToString() + "','"
-                        + ls_resultgrid.Rows[i][6].ToString() + "')";
-                    int iresult = sh.ExecuteQueryResult(ls_sqlstr, tr);
-                }
 
                 //插入 Largest_frame
-                DataTable ls_Largest_frame = list_dt.Where(aa => aa.TableName.Contains("Largest_frame")).ToList()[0];
-                for (int i = 0; i < ls_Largest_frame.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "Largest_frame"))
                 {
-                    if (ls_Largest_frame.Rows[i][17] == null)
-                    {
-                        continue;
-                    }
-                    if (ls_Largest_frame.Rows[i][17] == DBNull.Value)
+                    sh.CreateTable("Largest_frame", strcolumns_Largest_frame, strcoltypes_Largest_frame);
+                    DataTable ls_Largest_frame = list_dt.Where(aa => aa.TableName.Contains("Largest_frame")).ToList()[0];
+                    for (int i = 0; i < ls_Largest_frame.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_Largest_frame.Rows[i][17] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_Largest_frame.Rows[i][17] == DBNull.Value)
+                        {
+                            continue;
+                        }
+
+                        string ls_sqlstr = "insert into Largest_frame (pid, Size, Width, Class, ColName1, ColName2, ColName3, ColName4, ColName5, ColName6,ColVal1, ColVal2, ColVal3, ColVal4, ColVal5, ColVal6 ,FieldID,p1) values('"
+                            + ls_Largest_frame.Rows[i][0].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][1].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][2].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][3].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][4].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][5].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][6].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][7].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][8].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][9].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][10].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][11].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][12].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][13].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][14].ToString() + "','"
+                            + ls_Largest_frame.Rows[i][15].ToString() + "',"
+                            + ls_Largest_frame.Rows[i][16].ToString() + ",:p1)";
+
+                        byte[] byte_p1 = (byte[])ls_Largest_frame.Rows[i][17];
+
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "p1", byte_p1, tr);
                     }
-
-                    string ls_sqlstr = "insert into Largest_frame (pid, Size, Width, Class, ColName1, ColName2, ColName3, ColName4, ColName5, ColName6,ColVal1, ColVal2, ColVal3, ColVal4, ColVal5, ColVal6 ,FieldID,p1) values('"
-                        + ls_Largest_frame.Rows[i][0].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][1].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][2].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][3].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][4].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][5].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][6].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][7].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][8].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][9].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][10].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][11].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][12].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][13].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][14].ToString() + "','"
-                        + ls_Largest_frame.Rows[i][15].ToString() + "',"
-                        + ls_Largest_frame.Rows[i][16].ToString() + ",:p1)";
-
-                    byte[] byte_p1 = (byte[])ls_Largest_frame.Rows[i][17];
-
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "p1", byte_p1, tr);
                 }
+                    
 
                 //插入 Largest20
-                DataTable ls_Largest20 = list_dt.Where(aa => aa.TableName.Contains("Largest20")).ToList()[0];
-                for (int i = 0; i < ls_Largest20.Rows.Count; i++)
+                if(JudgeWhetherTheTableExists(list_dt, "Largest20"))
                 {
-                    if (ls_Largest20.Rows[i][16] == null)
+                    sh.CreateTable("Largest20", strcolumns_Largest20, strcoltypes_Largest20);
+                    DataTable ls_Largest20 = list_dt.Where(aa => aa.TableName.Contains("Largest20")).ToList()[0];
+                    for (int i = 0; i < ls_Largest20.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_Largest20.Rows[i][16] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_Largest20.Rows[i][16] == DBNull.Value)
+                        {
+                            continue;
+                        }
+
+                        string ls_sqlstr = "insert into Largest20 (pid, Size, Width, Class, ColName1, ColName2, ColName3, ColName4, ColName5, ColName6,ColVal1, ColVal2, ColVal3, ColVal4, ColVal5, ColVal6 ,p1,p2,p3) values('"
+                            + ls_Largest20.Rows[i][0].ToString() + "','"
+                            + ls_Largest20.Rows[i][1].ToString() + "','"
+                            + ls_Largest20.Rows[i][2].ToString() + "','"
+                            + ls_Largest20.Rows[i][3].ToString() + "','"
+                            + ls_Largest20.Rows[i][4].ToString() + "','"
+                            + ls_Largest20.Rows[i][5].ToString() + "','"
+                            + ls_Largest20.Rows[i][6].ToString() + "','"
+                            + ls_Largest20.Rows[i][7].ToString() + "','"
+                            + ls_Largest20.Rows[i][8].ToString() + "','"
+                            + ls_Largest20.Rows[i][9].ToString() + "','"
+                            + ls_Largest20.Rows[i][10].ToString() + "','"
+                            + ls_Largest20.Rows[i][11].ToString() + "','"
+                            + ls_Largest20.Rows[i][12].ToString() + "','"
+                            + ls_Largest20.Rows[i][13].ToString() + "','"
+                            + ls_Largest20.Rows[i][14].ToString() + "','"
+                            + ls_Largest20.Rows[i][15].ToString() + "',:p1,:p2,:p3)";
+
+                        byte[] byte_p1 = (byte[])ls_Largest20.Rows[i][16];
+                        byte[] byte_p2 = (byte[])ls_Largest20.Rows[i][17];
+                        byte[] byte_p3 = (byte[])ls_Largest20.Rows[i][18];
+
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "p1", byte_p1, "p2", byte_p2, "p3", byte_p3, tr);
                     }
-                    if (ls_Largest20.Rows[i][16] == DBNull.Value)
-                    {
-                        continue;
-                    }
-
-                    string ls_sqlstr = "insert into Largest20 (pid, Size, Width, Class, ColName1, ColName2, ColName3, ColName4, ColName5, ColName6,ColVal1, ColVal2, ColVal3, ColVal4, ColVal5, ColVal6 ,p1,p2,p3) values('"
-                        + ls_Largest20.Rows[i][0].ToString() + "','"
-                        + ls_Largest20.Rows[i][1].ToString() + "','"
-                        + ls_Largest20.Rows[i][2].ToString() + "','"
-                        + ls_Largest20.Rows[i][3].ToString() + "','"
-                        + ls_Largest20.Rows[i][4].ToString() + "','"
-                        + ls_Largest20.Rows[i][5].ToString() + "','"
-                        + ls_Largest20.Rows[i][6].ToString() + "','"
-                        + ls_Largest20.Rows[i][7].ToString() + "','"
-                        + ls_Largest20.Rows[i][8].ToString() + "','"
-                        + ls_Largest20.Rows[i][9].ToString() + "','"
-                        + ls_Largest20.Rows[i][10].ToString() + "','"
-                        + ls_Largest20.Rows[i][11].ToString() + "','"
-                        + ls_Largest20.Rows[i][12].ToString() + "','"
-                        + ls_Largest20.Rows[i][13].ToString() + "','"
-                        + ls_Largest20.Rows[i][14].ToString() + "','"
-                        + ls_Largest20.Rows[i][15].ToString() + "',:p1,:p2,:p3)";
-
-                    byte[] byte_p1 = (byte[])ls_Largest20.Rows[i][16];
-                    byte[] byte_p2 = (byte[])ls_Largest20.Rows[i][17];
-                    byte[] byte_p3 = (byte[])ls_Largest20.Rows[i][18];
-
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "p1", byte_p1, "p2", byte_p2, "p3", byte_p3, tr);
                 }
+                
 
                 //-----------------------------------------------------------------------------------------------------------------------------------
                 ////插入标记帧部份,进行特殊处理,从硬盘中拿现已经生成好的标记图像,进行加载,然后转成byte数组,存入到数据库中                ////准备存放标记图的文件夹
                 string m_strFieldPath_Mark = m_ReportApp.m_rstDataMgr.ResultFilesList[m_ReportApp.m_rstDataMgr.GetWorkingResult()].FilePath + "\\FIELD_FILES_MARK\\";
 
                 //插入 field_dt
-                DataTable ls_field_dt = list_dt.Where(aa => aa.TableName.Contains("field_dt")).ToList()[0];
-                for (int i = 0; i < ls_field_dt.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "field_dt"))
                 {
-                    string ls_sqlstr = "insert into field_dt (FieldId,FieldImg) values(" + ls_field_dt.Rows[i]["FieldId"] + ",:pict)";
-                    string str_fieldid = ls_field_dt.Rows[i][0].ToString();
-
-                    //从生成的FIELD_FIES_MARK文件夹中加载图像并转成byte数组,保存到数据库,节省内存
-                    Bitmap ls_bp_mark = new Bitmap(m_strFieldPath_Mark + str_fieldid + ".bmp");
-                    MemoryStream newms_fieldmark = new MemoryStream();
-                    ls_bp_mark.Save(newms_fieldmark, System.Drawing.Imaging.ImageFormat.Bmp);
-                    newms_fieldmark.Seek(0, SeekOrigin.Begin);
-                    byte[] newarr_field_mrak = new byte[newms_fieldmark.Length];
-                    newms_fieldmark.Read(newarr_field_mrak, 0, newarr_field_mrak.Length);
-
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", newarr_field_mrak, tr);
-
-                    newms_fieldmark.Dispose();
-                    newms_fieldmark = null;
-                    ls_bp_mark.Dispose();
-                    ls_bp_mark = null;
-
-                    GC.Collect();
-                    GC.WaitForPendingFinalizers();
+                    sh.CreateTable("field_dt", strcolumns_field_dt, strcoltypes_field_dt);
+                    DataTable ls_field_dt = list_dt.Where(aa => aa.TableName.Contains("field_dt")).ToList()[0];
+                    for (int i = 0; i < ls_field_dt.Rows.Count; i++)
+                    {
+                        string ls_sqlstr = "insert into field_dt (FieldId,FieldImg) values(" + ls_field_dt.Rows[i]["FieldId"] + ",:pict)";
+                        string str_fieldid = ls_field_dt.Rows[i][0].ToString();
+
+                        //从生成的FIELD_FIES_MARK文件夹中加载图像并转成byte数组,保存到数据库,节省内存
+                        Bitmap ls_bp_mark = new Bitmap(m_strFieldPath_Mark + str_fieldid + ".bmp");
+                        MemoryStream newms_fieldmark = new MemoryStream();
+                        ls_bp_mark.Save(newms_fieldmark, System.Drawing.Imaging.ImageFormat.Bmp);
+                        newms_fieldmark.Seek(0, SeekOrigin.Begin);
+                        byte[] newarr_field_mrak = new byte[newms_fieldmark.Length];
+                        newms_fieldmark.Read(newarr_field_mrak, 0, newarr_field_mrak.Length);
+
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", newarr_field_mrak, tr);
+
+                        newms_fieldmark.Dispose();
+                        newms_fieldmark = null;
+                        ls_bp_mark.Dispose();
+                        ls_bp_mark = null;
+
+                        GC.Collect();
+                        GC.WaitForPendingFinalizers();
+                    }
                 }
+
                 //-----------------------------------------------------------------------------------------------------------------
 
                 //插入 ElementName
-                DataTable ls_ElementName = list_dt.Where(aa => aa.TableName.Contains("ElementName")).ToList()[0];
-                for (int i = 0; i < ls_ElementName.Rows.Count; i++)
-                {
-                    string ls_sqlstr = "insert into ElementName (e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14 ) values('"
-                        + ls_ElementName.Rows[i][0].ToString() + "','"
-                        + ls_ElementName.Rows[i][1].ToString() + "','"
-                        + ls_ElementName.Rows[i][2].ToString() + "','"
-                        + ls_ElementName.Rows[i][3].ToString() + "','"
-                        + ls_ElementName.Rows[i][4].ToString() + "','"
-                        + ls_ElementName.Rows[i][5].ToString() + "','"
-                        + ls_ElementName.Rows[i][6].ToString() + "','"
-                        + ls_ElementName.Rows[i][7].ToString() + "','"
-                        + ls_ElementName.Rows[i][8].ToString() + "','"
-                        + ls_ElementName.Rows[i][9].ToString() + "','"
-                        + ls_ElementName.Rows[i][10].ToString() + "','"
-                        + ls_ElementName.Rows[i][11].ToString() + "','"
-                        + ls_ElementName.Rows[i][12].ToString() + "','"
-                        + ls_ElementName.Rows[i][13].ToString() + "')";
-                    int iresult = sh.ExecuteQueryResult(ls_sqlstr, tr);
-                }
+                if (JudgeWhetherTheTableExists(list_dt, "ElementName"))
+                    DataTableSurfaceSaveToDB(list_dt, "ElementName", "ElementName", sh, strcolumns_ElementName, strcoltypes_ElementName, tr);
+
 
                 //插入 ElementValue
-                DataTable ls_ElementValue = list_dt.Where(aa => aa.TableName.Contains("ElementValue")).ToList()[0];
-                for (int i = 0; i < ls_ElementValue.Rows.Count; i++)
-                {
-                    string ls_sqlstr = "insert into ElementValue (e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14,PName,Count,AllElements ) values('"
-                        + ls_ElementValue.Rows[i][0].ToString() + "','"
-                         + ls_ElementValue.Rows[i][1].ToString() + "','"
-                          + ls_ElementValue.Rows[i][2].ToString() + "','"
-                           + ls_ElementValue.Rows[i][3].ToString() + "','"
-                            + ls_ElementValue.Rows[i][4].ToString() + "','"
-                             + ls_ElementValue.Rows[i][5].ToString() + "','"
-                             + ls_ElementValue.Rows[i][6].ToString() + "','"
-                             + ls_ElementValue.Rows[i][7].ToString() + "','"
-                             + ls_ElementValue.Rows[i][8].ToString() + "','"
-                           + ls_ElementValue.Rows[i][9].ToString() + "','"
-                           + ls_ElementValue.Rows[i][10].ToString() + "','"
-                           + ls_ElementValue.Rows[i][11].ToString() + "','"
-                           + ls_ElementValue.Rows[i][12].ToString() + "','"
-                           + ls_ElementValue.Rows[i][13].ToString() + "','"
-                           + ls_ElementValue.Rows[i][14].ToString() + "','"
-                           + ls_ElementValue.Rows[i][15].ToString() + "','"
-                        + ls_ElementValue.Rows[i][16].ToString() + "')";
-                    int iresult = sh.ExecuteQueryResult(ls_sqlstr, tr);
-                }
+                if (JudgeWhetherTheTableExists(list_dt, "ElementValue"))
+                    DataTableSurfaceSaveToDB(list_dt, "ElementValue", "ElementValue", sh, strcolumns_ElementValue, strcoltypes_ElementValue, tr);
+
 
                 //插入 PartSize
-                DataTable ls_PartSize = list_dt.Where(aa => aa.TableName.Contains("PartSize")).ToList()[0];
-                for (int i = 0; i < ls_PartSize.Rows.Count; i++)
-                {
-                    string ls_sqlstr = "insert into PartSize (c1, c2, c3, c4, c5, c6, c7, c8, c9 ) values('"
-                        + ls_PartSize.Rows[i][0].ToString() + "','"
-                        + ls_PartSize.Rows[i][1].ToString() + "','"
-                        + ls_PartSize.Rows[i][2].ToString() + "','"
-                        + ls_PartSize.Rows[i][3].ToString() + "','"
-                        + ls_PartSize.Rows[i][4].ToString() + "','"
-                        + ls_PartSize.Rows[i][5].ToString() + "','"
-                        + ls_PartSize.Rows[i][6].ToString() + "','"
-                        + ls_PartSize.Rows[i][7].ToString() + "','"
-                        + ls_PartSize.Rows[i][8].ToString() + "')";
-                    int iresult = sh.ExecuteQueryResult(ls_sqlstr, tr);
-                }
+                if (JudgeWhetherTheTableExists(list_dt, "PartSize"))
+                    DataTableSurfaceSaveToDB(list_dt, "PartSize", "PartSize", sh, strcolumns_PartSize, strcoltypes_PartSize, tr);
+
 
                 //插入 Particel
-                DataTable ls_Particel = list_dt.Where(aa => aa.TableName.Contains("Particel")).ToList()[0];
-                for (int i = 0; i < ls_Particel.Rows.Count; i++)
-                {
-                    string ls_sqlstr = "insert into Particel (c1, c2, c3, c4, c5, c6, c7, c8, c9,SName,total ) values('"
-                        + ls_Particel.Rows[i][0].ToString() + "','"
-                        + ls_Particel.Rows[i][1].ToString() + "','"
-                        + ls_Particel.Rows[i][2].ToString() + "','"
-                        + ls_Particel.Rows[i][3].ToString() + "','"
-                        + ls_Particel.Rows[i][4].ToString() + "','"
-                        + ls_Particel.Rows[i][5].ToString() + "','"
-                        + ls_Particel.Rows[i][6].ToString() + "','"
-                        + ls_Particel.Rows[i][7].ToString() + "','"
-                        + ls_Particel.Rows[i][8].ToString() + "','"
-                        + ls_Particel.Rows[i][9].ToString() + "','"
-                        + ls_Particel.Rows[i][10].ToString() + "')";
-                    int iresult = sh.ExecuteQueryResult(ls_sqlstr, tr);
-                }
+                if (JudgeWhetherTheTableExists(list_dt, "Particel"))
+                    DataTableSurfaceSaveToDB(list_dt, "Particel", "Particel", sh, strcolumns_Particel, strcoltypes_Particel, tr);
+
 
                 //插入 PicKL
-                DataTable ls_PicKL = list_dt.Where(aa => aa.TableName.Contains("PicKL")).ToList()[0];
-                for (int i = 0; i < ls_PicKL.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "PicKL"))
                 {
-                    if (ls_PicKL.Rows[i][0] == null)
+                    sh.CreateTable("PicKL", strcolumns_PicKL, strcoltypes_PicKL);
+                    DataTable ls_PicKL = list_dt.Where(aa => aa.TableName.Contains("PicKL")).ToList()[0];
+                    for (int i = 0; i < ls_PicKL.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_PicKL.Rows[i][0] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_PicKL.Rows[i][0] == DBNull.Value)
+                        {
+                            continue;
+                        }
+
+                        string ls_sqlstr = "insert into PicKL (pict) values(:pict)";
+                        byte[] byte_p1 = (byte[])ls_PicKL.Rows[i][0];
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
                     }
-                    if (ls_PicKL.Rows[i][0] == DBNull.Value)
-                    {
-                        continue;
-                    }
-
-                    string ls_sqlstr = "insert into PicKL (pict) values(:pict)";
-                    byte[] byte_p1 = (byte[])ls_PicKL.Rows[i][0];
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
                 }
+                
 
                 //插入 Pic_InclusionAreaRatio
-                DataTable ls_PicInclusionAreaRatio = list_dt.Where(aa => aa.TableName.Contains("Pic_InclusionAreaRatio")).ToList()[0];
-                for (int i = 0; i < ls_PicInclusionAreaRatio.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "Pic_InclusionAreaRatio"))
                 {
-                    if (ls_PicInclusionAreaRatio.Rows[i][0] == null)
-                    {
-                        continue;
-                    }
-                    if (ls_PicInclusionAreaRatio.Rows[i][0] == DBNull.Value)
+                    sh.CreateTable("PicInclusionAreaRatio", strcolumns_PicKL, strcoltypes_PicKL);
+                    DataTable ls_PicInclusionAreaRatio = list_dt.Where(aa => aa.TableName.Contains("Pic_InclusionAreaRatio")).ToList()[0];
+                    for (int i = 0; i < ls_PicInclusionAreaRatio.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_PicInclusionAreaRatio.Rows[i][0] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_PicInclusionAreaRatio.Rows[i][0] == DBNull.Value)
+                        {
+                            continue;
+                        }
+
+                        string ls_sqlstr = "insert into PicInclusionAreaRatio (pict) values(:pict)";
+                        byte[] byte_p1 = (byte[])ls_PicInclusionAreaRatio.Rows[i][0];
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
                     }
-
-                    string ls_sqlstr = "insert into PicInclusionAreaRatio (pict) values(:pict)";
-                    byte[] byte_p1 = (byte[])ls_PicInclusionAreaRatio.Rows[i][0];
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
                 }
+                
 
 
                 //插入 PicYS
-                DataTable ls_PicYS = list_dt.Where(aa => aa.TableName.Contains("PicYS")).ToList()[0];
-                for (int i = 0; i < ls_PicYS.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "PicYS"))
                 {
-                    if (ls_PicYS.Rows[i][0] == null)
+                    sh.CreateTable("PicYS", strcolumns_PicYS, strcoltypes_PicYS);
+                    DataTable ls_PicYS = list_dt.Where(aa => aa.TableName.Contains("PicYS")).ToList()[0];
+                    for (int i = 0; i < ls_PicYS.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_PicYS.Rows[i][0] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_PicYS.Rows[i][0] == DBNull.Value)
+                        {
+                            continue;
+                        }
+                        string ls_sqlstr = "insert into PicYS (pict) values(:pict)";
+                        byte[] byte_p1 = (byte[])ls_PicYS.Rows[i][0];
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
                     }
-                    if (ls_PicYS.Rows[i][0] == DBNull.Value)
-                    {
-                        continue;
-                    }
-                    string ls_sqlstr = "insert into PicYS (pict) values(:pict)";
-                    byte[] byte_p1 = (byte[])ls_PicYS.Rows[i][0];
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
                 }
+                
 
                 //插入 PicSYXT2T
-                DataTable ls_PicSYXT2T = list_dt.Where(aa => aa.TableName.Contains("PicSYXT2T")).ToList()[0];
-                for (int i = 0; i < ls_PicSYXT2T.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "PicSYXT2T"))
                 {
-                    if (ls_PicSYXT2T.Rows[i][0] == null)
+                    sh.CreateTable("PicSYXT2T", strcolumns_PicSYXT2T, strcoltypes_PicSYXT2T);
+                    DataTable ls_PicSYXT2T = list_dt.Where(aa => aa.TableName.Contains("PicSYXT2T")).ToList()[0];
+                    for (int i = 0; i < ls_PicSYXT2T.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_PicSYXT2T.Rows[i][0] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_PicSYXT2T.Rows[i][0] == DBNull.Value)
+                        {
+                            continue;
+                        }
+                        string ls_sqlstr = "insert into PicSYXT2T (pict,pict2) values(:pict,:pict2)";
+                        byte[] byte_p1 = (byte[])ls_PicSYXT2T.Rows[i][0];
+                        byte[] byte_p2 = (byte[])ls_PicSYXT2T.Rows[i][1];
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, "pict2", byte_p2, tr);
                     }
-                    if (ls_PicSYXT2T.Rows[i][0] == DBNull.Value)
-                    {
-                        continue;
-                    }
-                    string ls_sqlstr = "insert into PicSYXT2T (pict,pict2) values(:pict,:pict2)";
-                    byte[] byte_p1 = (byte[])ls_PicSYXT2T.Rows[i][0];
-                    byte[] byte_p2 = (byte[])ls_PicSYXT2T.Rows[i][1];
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, "pict2", byte_p2, tr);
                 }
+                
 
                 //插入 PicSYXT3T
-                DataTable ls_PicSYXT3T = list_dt.Where(aa => aa.TableName.Contains("PicSYXT3T")).ToList()[0];
-                for (int i = 0; i < ls_PicSYXT3T.Rows.Count; i++)
+                if (JudgeWhetherTheTableExists(list_dt, "PicSYXT3T"))
                 {
-                    if (ls_PicSYXT3T.Rows[i][0] == null)
-                    {
-                        continue;
-                    }
-                    if (ls_PicSYXT3T.Rows[i][0] == DBNull.Value)
+                    sh.CreateTable("PicSYXT3T", strcolumns_PicSYXT3T, strcoltypes_PicSYXT3T);
+                    DataTable ls_PicSYXT3T = list_dt.Where(aa => aa.TableName.Contains("PicSYXT3T")).ToList()[0];
+                    for (int i = 0; i < ls_PicSYXT3T.Rows.Count; i++)
                     {
-                        continue;
+                        if (ls_PicSYXT3T.Rows[i][0] == null)
+                        {
+                            continue;
+                        }
+                        if (ls_PicSYXT3T.Rows[i][0] == DBNull.Value)
+                        {
+                            continue;
+                        }
+
+                        string ls_sqlstr = "insert into PicSYXT3T (pict,pict2,pict3) values(:pict,:pict2,:pict3)";
+                        byte[] byte_p1 = (byte[])ls_PicSYXT3T.Rows[i][0];
+                        byte[] byte_p2 = (byte[])ls_PicSYXT3T.Rows[i][1];
+                        byte[] byte_p3 = (byte[])ls_PicSYXT3T.Rows[i][2];
+                        int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, "pict2", byte_p2, "pict3", byte_p3, tr);
                     }
-
-                    string ls_sqlstr = "insert into PicSYXT3T (pict,pict2,pict3) values(:pict,:pict2,:pict3)";
-                    byte[] byte_p1 = (byte[])ls_PicSYXT3T.Rows[i][0];
-                    byte[] byte_p2 = (byte[])ls_PicSYXT3T.Rows[i][1];
-                    byte[] byte_p3 = (byte[])ls_PicSYXT3T.Rows[i][2];
-                    int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, "pict2", byte_p2, "pict3", byte_p3, tr);
                 }
+                
 
                 //事务提交
                 sh.TranscationCommit(tr);
@@ -1648,6 +1605,42 @@ namespace OTSIncAReportApp
                 sh.CloseConnection();
             }
         }
+       
+        private void DataTableSurfaceSaveToDB(List<DataTable> list_dt,string a_surfaceName,string a_DatatableSurfaceName, SqlHelper sh,string[] strcolumns,string[] strcoltypes, SQLiteTransaction tr)
+        {
+            sh.CreateTable(a_surfaceName, strcolumns, strcoltypes);
+            DataTable dt = list_dt.Where(aa => aa.TableName.Contains(a_DatatableSurfaceName)).ToList()[0];
+            string strcolumnsName = "";
+            for (int i = 0;i< strcolumns.Count();i++)
+            {
+                strcolumnsName = strcolumnsName + strcolumns[i].ToString();
+                if (i != strcolumns.Count() - 1)
+                    strcolumnsName = strcolumnsName + ",";
+            }
+            for (int i = 0; i < dt.Rows.Count; i++)
+            {
+                string ls_dtstr = "";
+                for(int a=0;a< strcolumns.Count();a++)
+                {
+                    ls_dtstr = ls_dtstr + dt.Rows[i][a].ToString();
+                    if (a != strcolumns.Count() - 1)
+                        ls_dtstr = ls_dtstr + "','";
+
+                }
+                string ls_sqlstr = "insert into "+ a_surfaceName+" ("+strcolumnsName+") values('"
+                   + ls_dtstr + "')";
+                sh.ExecuteQueryResult(ls_sqlstr, tr);
+            }
+        }
+        private bool JudgeWhetherTheTableExists(List<DataTable> list_dt,string str)
+        {
+            for (int i=0;i< list_dt.Count;i++)
+            {
+                if (list_dt[i].TableName.Contains(str))
+                    return true;
+            }
+            return false;
+        }
         #endregion
 
         #region 导出工作线程部份
@@ -1831,7 +1824,9 @@ namespace OTSIncAReportApp
                     }
                     if (ls_str.IndexOf(table["rictbox13"].ToString()) > -1)
                     {
-                        m_export_reporttemplate.InsertReportTemplateTable_ParticlesGridDevidePage();
+                        //判断颗粒列表是否导出
+                        if (m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk)
+                            m_export_reporttemplate.InsertReportTemplateTable_ParticlesGridDevidePage();
                         lock (m_thread_flag)
                             m_thread_flag = strNill;
                     }
@@ -1853,7 +1848,7 @@ namespace OTSIncAReportApp
 
                     if (ls_str.IndexOf(table["rictbox26"].ToString()) > -1)
                     {
-                        m_export_reporttemplate.InsertReportTemplateChart_ParticlesCompositionChart(AnalyticGraphics(m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx));
+                        //m_export_reporttemplate.InsertReportTemplateChart_ParticlesCompositionChart(AnalyticGraphics(m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx));
                         lock (m_thread_flag)
                             m_thread_flag = strNill;
                     }
@@ -1866,7 +1861,8 @@ namespace OTSIncAReportApp
 
                     if (ls_str.IndexOf(table["rictbox34"].ToString()) > -1)
                     {
-                        m_export_reporttemplate.InsertReportTemplateChart_Trianglediagram();
+                        if (m_mbszclass.M_SYXT.b_ck_syxt_xsmk)
+                            m_export_reporttemplate.InsertReportTemplateChart_Trianglediagram();
                         lock (m_thread_flag)
                             m_thread_flag = strNill;
                     }

+ 20 - 419
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.Designer.cs

@@ -51,45 +51,22 @@
             this.groupBox1 = new System.Windows.Forms.GroupBox();
             this.tb_ymwb = new System.Windows.Forms.TextBox();
             this.label8 = new System.Windows.Forms.Label();
-            this.groupBox3 = new System.Windows.Forms.GroupBox();
-            this.cb_jzwfl_xsmk = new System.Windows.Forms.CheckBox();
-            this.label18 = new System.Windows.Forms.Label();
-            this.cb_jzwfl_klfw = new System.Windows.Forms.ComboBox();
-            this.label13 = new System.Windows.Forms.Label();
-            this.cb_jzwfl_ljb = new System.Windows.Forms.ComboBox();
-            this.label19 = new System.Windows.Forms.Label();
-            this.cb_jzwfl_xstx = new System.Windows.Forms.ComboBox();
-            this.label12 = new System.Windows.Forms.Label();
             this.groupBox4 = new System.Windows.Forms.GroupBox();
             this.ck_klcc_xsmk = new System.Windows.Forms.CheckBox();
             this.label17 = new System.Windows.Forms.Label();
-            this.cb_klcc_klfw = new System.Windows.Forms.ComboBox();
             this.cb_klcc_ljb = new System.Windows.Forms.ComboBox();
             this.cb_klcc_jsfs = new System.Windows.Forms.ComboBox();
-            this.label16 = new System.Windows.Forms.Label();
             this.label15 = new System.Windows.Forms.Label();
             this.label14 = new System.Windows.Forms.Label();
             this.groupBox5 = new System.Windows.Forms.GroupBox();
-            this.button5 = new System.Windows.Forms.Button();
-            this.tb_yscf_ysxx = new System.Windows.Forms.TextBox();
             this.ck_yscf_xsmk = new System.Windows.Forms.CheckBox();
             this.label20 = new System.Windows.Forms.Label();
-            this.cb_yscf_klfw = new System.Windows.Forms.ComboBox();
-            this.label21 = new System.Windows.Forms.Label();
             this.label22 = new System.Windows.Forms.Label();
             this.cb_yscf_xstx = new System.Windows.Forms.ComboBox();
-            this.label24 = new System.Windows.Forms.Label();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
-            this.button4 = new System.Windows.Forms.Button();
-            this.tb_ysfx_xsys = new System.Windows.Forms.TextBox();
             this.ck_ysfx_xsmk = new System.Windows.Forms.CheckBox();
             this.label25 = new System.Windows.Forms.Label();
-            this.cb_ysfx_klfw = new System.Windows.Forms.ComboBox();
-            this.label26 = new System.Windows.Forms.Label();
-            this.label27 = new System.Windows.Forms.Label();
             this.groupBox7 = new System.Windows.Forms.GroupBox();
-            this.cb_syxt_klfw = new System.Windows.Forms.ComboBox();
-            this.label41 = new System.Windows.Forms.Label();
             this.lbv_syxt_mblb = new System.Windows.Forms.ListView();
             this.ck_syxt_xsmk = new System.Windows.Forms.CheckBox();
             this.label40 = new System.Windows.Forms.Label();
@@ -99,9 +76,6 @@
             this.label33 = new System.Windows.Forms.Label();
             this.label42 = new System.Windows.Forms.Label();
             this.groupBox8 = new System.Windows.Forms.GroupBox();
-            this.button3 = new System.Windows.Forms.Button();
-            this.tb_kllb_ylsx = new System.Windows.Forms.TextBox();
-            this.tb_kllb_sxys = new System.Windows.Forms.TextBox();
             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();
@@ -110,10 +84,6 @@
             this.label31 = new System.Windows.Forms.Label();
             this.label30 = new System.Windows.Forms.Label();
             this.label34 = new System.Windows.Forms.Label();
-            this.cb_kllb_klfw = new System.Windows.Forms.ComboBox();
-            this.label35 = new System.Windows.Forms.Label();
-            this.label29 = new System.Windows.Forms.Label();
-            this.label36 = new System.Windows.Forms.Label();
             this.button6 = new System.Windows.Forms.Button();
             this.panel2 = new System.Windows.Forms.Panel();
             this.label53 = new System.Windows.Forms.Label();
@@ -133,7 +103,6 @@
             this.groupBox9 = new System.Windows.Forms.GroupBox();
             this.label39 = new System.Windows.Forms.Label();
             this.groupBox1.SuspendLayout();
-            this.groupBox3.SuspendLayout();
             this.groupBox4.SuspendLayout();
             this.groupBox5.SuspendLayout();
             this.groupBox6.SuspendLayout();
@@ -378,121 +347,19 @@
             this.label8.TabIndex = 41;
             this.label8.Text = "页眉文本";
             // 
-            // groupBox3
-            // 
-            this.groupBox3.Controls.Add(this.cb_jzwfl_xsmk);
-            this.groupBox3.Controls.Add(this.label18);
-            this.groupBox3.Controls.Add(this.cb_jzwfl_klfw);
-            this.groupBox3.Controls.Add(this.label13);
-            this.groupBox3.Controls.Add(this.cb_jzwfl_ljb);
-            this.groupBox3.Controls.Add(this.label19);
-            this.groupBox3.Controls.Add(this.cb_jzwfl_xstx);
-            this.groupBox3.Controls.Add(this.label12);
-            this.groupBox3.Location = new System.Drawing.Point(3, 648);
-            this.groupBox3.Margin = new System.Windows.Forms.Padding(2);
-            this.groupBox3.Name = "groupBox3";
-            this.groupBox3.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox3.Size = new System.Drawing.Size(268, 215);
-            this.groupBox3.TabIndex = 1;
-            this.groupBox3.TabStop = false;
-            this.groupBox3.Text = "夹杂物分类图";
-            // 
-            // cb_jzwfl_xsmk
-            // 
-            this.cb_jzwfl_xsmk.AutoSize = true;
-            this.cb_jzwfl_xsmk.Location = new System.Drawing.Point(224, 18);
-            this.cb_jzwfl_xsmk.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_jzwfl_xsmk.Name = "cb_jzwfl_xsmk";
-            this.cb_jzwfl_xsmk.Size = new System.Drawing.Size(15, 14);
-            this.cb_jzwfl_xsmk.TabIndex = 53;
-            this.cb_jzwfl_xsmk.UseVisualStyleBackColor = true;
-            this.cb_jzwfl_xsmk.CheckedChanged += new System.EventHandler(this.cb_jzwfl_xsmk_CheckedChanged);
-            // 
-            // label18
-            // 
-            this.label18.AutoSize = true;
-            this.label18.Location = new System.Drawing.Point(7, 20);
-            this.label18.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label18.Name = "label18";
-            this.label18.Size = new System.Drawing.Size(65, 12);
-            this.label18.TabIndex = 52;
-            this.label18.Text = "显示该模块";
-            // 
-            // cb_jzwfl_klfw
-            // 
-            this.cb_jzwfl_klfw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_jzwfl_klfw.FormattingEnabled = true;
-            this.cb_jzwfl_klfw.Location = new System.Drawing.Point(19, 170);
-            this.cb_jzwfl_klfw.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_jzwfl_klfw.Name = "cb_jzwfl_klfw";
-            this.cb_jzwfl_klfw.Size = new System.Drawing.Size(216, 20);
-            this.cb_jzwfl_klfw.TabIndex = 42;
-            // 
-            // label13
-            // 
-            this.label13.AutoSize = true;
-            this.label13.Location = new System.Drawing.Point(19, 152);
-            this.label13.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(53, 12);
-            this.label13.TabIndex = 41;
-            this.label13.Text = "颗粒范围";
-            // 
-            // cb_jzwfl_ljb
-            // 
-            this.cb_jzwfl_ljb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_jzwfl_ljb.FormattingEnabled = true;
-            this.cb_jzwfl_ljb.Location = new System.Drawing.Point(19, 112);
-            this.cb_jzwfl_ljb.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_jzwfl_ljb.Name = "cb_jzwfl_ljb";
-            this.cb_jzwfl_ljb.Size = new System.Drawing.Size(216, 20);
-            this.cb_jzwfl_ljb.TabIndex = 42;
-            // 
-            // label19
-            // 
-            this.label19.AutoSize = true;
-            this.label19.Location = new System.Drawing.Point(19, 47);
-            this.label19.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label19.Name = "label19";
-            this.label19.Size = new System.Drawing.Size(53, 12);
-            this.label19.TabIndex = 41;
-            this.label19.Text = "显示图形";
-            // 
-            // cb_jzwfl_xstx
-            // 
-            this.cb_jzwfl_xstx.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_jzwfl_xstx.FormattingEnabled = true;
-            this.cb_jzwfl_xstx.Location = new System.Drawing.Point(19, 61);
-            this.cb_jzwfl_xstx.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_jzwfl_xstx.Name = "cb_jzwfl_xstx";
-            this.cb_jzwfl_xstx.Size = new System.Drawing.Size(216, 20);
-            this.cb_jzwfl_xstx.TabIndex = 42;
-            // 
-            // label12
-            // 
-            this.label12.AutoSize = true;
-            this.label12.Location = new System.Drawing.Point(17, 98);
-            this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(65, 12);
-            this.label12.TabIndex = 41;
-            this.label12.Text = "粒级表信息";
-            // 
             // groupBox4
             // 
             this.groupBox4.Controls.Add(this.ck_klcc_xsmk);
             this.groupBox4.Controls.Add(this.label17);
-            this.groupBox4.Controls.Add(this.cb_klcc_klfw);
             this.groupBox4.Controls.Add(this.cb_klcc_ljb);
             this.groupBox4.Controls.Add(this.cb_klcc_jsfs);
-            this.groupBox4.Controls.Add(this.label16);
             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);
             this.groupBox4.Name = "groupBox4";
             this.groupBox4.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox4.Size = new System.Drawing.Size(268, 196);
+            this.groupBox4.Size = new System.Drawing.Size(268, 158);
             this.groupBox4.TabIndex = 2;
             this.groupBox4.TabStop = false;
             this.groupBox4.Text = "颗粒尺寸分析结果";
@@ -518,16 +385,6 @@
             this.label17.TabIndex = 52;
             this.label17.Text = "显示该模块";
             // 
-            // cb_klcc_klfw
-            // 
-            this.cb_klcc_klfw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_klcc_klfw.FormattingEnabled = true;
-            this.cb_klcc_klfw.Location = new System.Drawing.Point(19, 161);
-            this.cb_klcc_klfw.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_klcc_klfw.Name = "cb_klcc_klfw";
-            this.cb_klcc_klfw.Size = new System.Drawing.Size(216, 20);
-            this.cb_klcc_klfw.TabIndex = 42;
-            // 
             // cb_klcc_ljb
             // 
             this.cb_klcc_ljb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -548,16 +405,6 @@
             this.cb_klcc_jsfs.Size = new System.Drawing.Size(216, 20);
             this.cb_klcc_jsfs.TabIndex = 42;
             // 
-            // label16
-            // 
-            this.label16.AutoSize = true;
-            this.label16.Location = new System.Drawing.Point(17, 147);
-            this.label16.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label16.Name = "label16";
-            this.label16.Size = new System.Drawing.Size(53, 12);
-            this.label16.TabIndex = 41;
-            this.label16.Text = "颗粒范围";
-            // 
             // label15
             // 
             this.label15.AutoSize = true;
@@ -580,46 +427,19 @@
             // 
             // groupBox5
             // 
-            this.groupBox5.Controls.Add(this.button5);
-            this.groupBox5.Controls.Add(this.tb_yscf_ysxx);
             this.groupBox5.Controls.Add(this.ck_yscf_xsmk);
             this.groupBox5.Controls.Add(this.label20);
-            this.groupBox5.Controls.Add(this.cb_yscf_klfw);
-            this.groupBox5.Controls.Add(this.label21);
             this.groupBox5.Controls.Add(this.label22);
             this.groupBox5.Controls.Add(this.cb_yscf_xstx);
-            this.groupBox5.Controls.Add(this.label24);
-            this.groupBox5.Location = new System.Drawing.Point(8, 1032);
+            this.groupBox5.Location = new System.Drawing.Point(3, 701);
             this.groupBox5.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox5.Name = "groupBox5";
             this.groupBox5.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox5.Size = new System.Drawing.Size(263, 205);
+            this.groupBox5.Size = new System.Drawing.Size(263, 112);
             this.groupBox5.TabIndex = 3;
             this.groupBox5.TabStop = false;
             this.groupBox5.Text = "元素成份图";
             // 
-            // button5
-            // 
-            this.button5.Location = new System.Drawing.Point(193, 167);
-            this.button5.Margin = new System.Windows.Forms.Padding(2);
-            this.button5.Name = "button5";
-            this.button5.Size = new System.Drawing.Size(37, 19);
-            this.button5.TabIndex = 56;
-            this.button5.Text = "...";
-            this.button5.UseVisualStyleBackColor = true;
-            this.button5.Visible = false;
-            this.button5.Click += new System.EventHandler(this.button5_Click);
-            // 
-            // tb_yscf_ysxx
-            // 
-            this.tb_yscf_ysxx.Location = new System.Drawing.Point(16, 165);
-            this.tb_yscf_ysxx.Margin = new System.Windows.Forms.Padding(2);
-            this.tb_yscf_ysxx.Name = "tb_yscf_ysxx";
-            this.tb_yscf_ysxx.ReadOnly = true;
-            this.tb_yscf_ysxx.Size = new System.Drawing.Size(173, 21);
-            this.tb_yscf_ysxx.TabIndex = 54;
-            this.tb_yscf_ysxx.Visible = false;
-            // 
             // ck_yscf_xsmk
             // 
             this.ck_yscf_xsmk.AutoSize = true;
@@ -641,30 +461,10 @@
             this.label20.TabIndex = 52;
             this.label20.Text = "显示该模块";
             // 
-            // cb_yscf_klfw
-            // 
-            this.cb_yscf_klfw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_yscf_klfw.FormattingEnabled = true;
-            this.cb_yscf_klfw.Location = new System.Drawing.Point(14, 109);
-            this.cb_yscf_klfw.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_yscf_klfw.Name = "cb_yscf_klfw";
-            this.cb_yscf_klfw.Size = new System.Drawing.Size(214, 20);
-            this.cb_yscf_klfw.TabIndex = 42;
-            // 
-            // label21
-            // 
-            this.label21.AutoSize = true;
-            this.label21.Location = new System.Drawing.Point(12, 95);
-            this.label21.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label21.Name = "label21";
-            this.label21.Size = new System.Drawing.Size(53, 12);
-            this.label21.TabIndex = 41;
-            this.label21.Text = "颗粒范围";
-            // 
             // label22
             // 
             this.label22.AutoSize = true;
-            this.label22.Location = new System.Drawing.Point(14, 45);
+            this.label22.Location = new System.Drawing.Point(12, 53);
             this.label22.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label22.Name = "label22";
             this.label22.Size = new System.Drawing.Size(53, 12);
@@ -675,61 +475,25 @@
             // 
             this.cb_yscf_xstx.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.cb_yscf_xstx.FormattingEnabled = true;
-            this.cb_yscf_xstx.Location = new System.Drawing.Point(16, 59);
+            this.cb_yscf_xstx.Location = new System.Drawing.Point(14, 67);
             this.cb_yscf_xstx.Margin = new System.Windows.Forms.Padding(2);
             this.cb_yscf_xstx.Name = "cb_yscf_xstx";
             this.cb_yscf_xstx.Size = new System.Drawing.Size(214, 20);
             this.cb_yscf_xstx.TabIndex = 42;
             // 
-            // label24
-            // 
-            this.label24.AutoSize = true;
-            this.label24.Location = new System.Drawing.Point(14, 151);
-            this.label24.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label24.Name = "label24";
-            this.label24.Size = new System.Drawing.Size(53, 12);
-            this.label24.TabIndex = 41;
-            this.label24.Text = "元素信息";
-            this.label24.Visible = false;
-            // 
             // groupBox6
             // 
-            this.groupBox6.Controls.Add(this.button4);
-            this.groupBox6.Controls.Add(this.tb_ysfx_xsys);
             this.groupBox6.Controls.Add(this.ck_ysfx_xsmk);
             this.groupBox6.Controls.Add(this.label25);
-            this.groupBox6.Controls.Add(this.cb_ysfx_klfw);
-            this.groupBox6.Controls.Add(this.label26);
-            this.groupBox6.Controls.Add(this.label27);
-            this.groupBox6.Location = new System.Drawing.Point(3, 867);
+            this.groupBox6.Location = new System.Drawing.Point(3, 614);
             this.groupBox6.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox6.Name = "groupBox6";
             this.groupBox6.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox6.Size = new System.Drawing.Size(268, 156);
+            this.groupBox6.Size = new System.Drawing.Size(268, 72);
             this.groupBox6.TabIndex = 4;
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "元素分析表";
             // 
-            // button4
-            // 
-            this.button4.Location = new System.Drawing.Point(196, 114);
-            this.button4.Margin = new System.Windows.Forms.Padding(2);
-            this.button4.Name = "button4";
-            this.button4.Size = new System.Drawing.Size(37, 19);
-            this.button4.TabIndex = 56;
-            this.button4.Text = "...";
-            this.button4.UseVisualStyleBackColor = true;
-            this.button4.Click += new System.EventHandler(this.button4_Click);
-            // 
-            // tb_ysfx_xsys
-            // 
-            this.tb_ysfx_xsys.Location = new System.Drawing.Point(19, 114);
-            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(173, 21);
-            this.tb_ysfx_xsys.TabIndex = 54;
-            // 
             // ck_ysfx_xsmk
             // 
             this.ck_ysfx_xsmk.AutoSize = true;
@@ -751,40 +515,8 @@
             this.label25.TabIndex = 52;
             this.label25.Text = "显示该模块";
             // 
-            // cb_ysfx_klfw
-            // 
-            this.cb_ysfx_klfw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_ysfx_klfw.FormattingEnabled = true;
-            this.cb_ysfx_klfw.Location = new System.Drawing.Point(19, 64);
-            this.cb_ysfx_klfw.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_ysfx_klfw.Name = "cb_ysfx_klfw";
-            this.cb_ysfx_klfw.Size = new System.Drawing.Size(214, 20);
-            this.cb_ysfx_klfw.TabIndex = 42;
-            // 
-            // label26
-            // 
-            this.label26.AutoSize = true;
-            this.label26.Location = new System.Drawing.Point(17, 50);
-            this.label26.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label26.Name = "label26";
-            this.label26.Size = new System.Drawing.Size(53, 12);
-            this.label26.TabIndex = 41;
-            this.label26.Text = "颗粒范围";
-            // 
-            // label27
-            // 
-            this.label27.AutoSize = true;
-            this.label27.Location = new System.Drawing.Point(17, 100);
-            this.label27.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label27.Name = "label27";
-            this.label27.Size = new System.Drawing.Size(53, 12);
-            this.label27.TabIndex = 41;
-            this.label27.Text = "显示元素";
-            // 
             // groupBox7
             // 
-            this.groupBox7.Controls.Add(this.cb_syxt_klfw);
-            this.groupBox7.Controls.Add(this.label41);
             this.groupBox7.Controls.Add(this.lbv_syxt_mblb);
             this.groupBox7.Controls.Add(this.ck_syxt_xsmk);
             this.groupBox7.Controls.Add(this.label40);
@@ -793,7 +525,7 @@
             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(8, 1241);
+            this.groupBox7.Location = new System.Drawing.Point(3, 827);
             this.groupBox7.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox7.Name = "groupBox7";
             this.groupBox7.Padding = new System.Windows.Forms.Padding(2);
@@ -802,26 +534,6 @@
             this.groupBox7.TabStop = false;
             this.groupBox7.Text = "三元相图";
             // 
-            // cb_syxt_klfw
-            // 
-            this.cb_syxt_klfw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_syxt_klfw.FormattingEnabled = true;
-            this.cb_syxt_klfw.Location = new System.Drawing.Point(16, 63);
-            this.cb_syxt_klfw.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_syxt_klfw.Name = "cb_syxt_klfw";
-            this.cb_syxt_klfw.Size = new System.Drawing.Size(214, 20);
-            this.cb_syxt_klfw.TabIndex = 42;
-            // 
-            // label41
-            // 
-            this.label41.AutoSize = true;
-            this.label41.Location = new System.Drawing.Point(14, 49);
-            this.label41.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label41.Name = "label41";
-            this.label41.Size = new System.Drawing.Size(53, 12);
-            this.label41.TabIndex = 41;
-            this.label41.Text = "颗粒范围";
-            // 
             // lbv_syxt_mblb
             // 
             this.lbv_syxt_mblb.CheckBoxes = true;
@@ -860,7 +572,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, 112);
+            this.cb_syxt_ljb.Location = new System.Drawing.Point(14, 73);
             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);
@@ -870,7 +582,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, 167);
+            this.cb_syxt_mhxssl.Location = new System.Drawing.Point(14, 150);
             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);
@@ -880,7 +592,7 @@
             // label38
             // 
             this.label38.AutoSize = true;
-            this.label38.Location = new System.Drawing.Point(12, 98);
+            this.label38.Location = new System.Drawing.Point(12, 59);
             this.label38.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label38.Name = "label38";
             this.label38.Size = new System.Drawing.Size(65, 12);
@@ -900,7 +612,7 @@
             // label42
             // 
             this.label42.AutoSize = true;
-            this.label42.Location = new System.Drawing.Point(12, 153);
+            this.label42.Location = new System.Drawing.Point(12, 136);
             this.label42.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.label42.Name = "label42";
             this.label42.Size = new System.Drawing.Size(77, 12);
@@ -909,9 +621,6 @@
             // 
             // groupBox8
             // 
-            this.groupBox8.Controls.Add(this.button3);
-            this.groupBox8.Controls.Add(this.tb_kllb_ylsx);
-            this.groupBox8.Controls.Add(this.tb_kllb_sxys);
             this.groupBox8.Controls.Add(this.ck_kllb_npxx);
             this.groupBox8.Controls.Add(this.ck_kllb_fdtx);
             this.groupBox8.Controls.Add(this.ck_kllb_ystx);
@@ -920,53 +629,19 @@
             this.groupBox8.Controls.Add(this.label31);
             this.groupBox8.Controls.Add(this.label30);
             this.groupBox8.Controls.Add(this.label34);
-            this.groupBox8.Controls.Add(this.cb_kllb_klfw);
-            this.groupBox8.Controls.Add(this.label35);
-            this.groupBox8.Controls.Add(this.label29);
-            this.groupBox8.Controls.Add(this.label36);
-            this.groupBox8.Location = new System.Drawing.Point(8, 1757);
+            this.groupBox8.Location = new System.Drawing.Point(3, 1340);
             this.groupBox8.Margin = new System.Windows.Forms.Padding(2);
             this.groupBox8.Name = "groupBox8";
             this.groupBox8.Padding = new System.Windows.Forms.Padding(2);
-            this.groupBox8.Size = new System.Drawing.Size(263, 301);
+            this.groupBox8.Size = new System.Drawing.Size(263, 159);
             this.groupBox8.TabIndex = 6;
             this.groupBox8.TabStop = false;
             this.groupBox8.Text = "颗粒列表";
             // 
-            // button3
-            // 
-            this.button3.Location = new System.Drawing.Point(195, 168);
-            this.button3.Margin = new System.Windows.Forms.Padding(2);
-            this.button3.Name = "button3";
-            this.button3.Size = new System.Drawing.Size(37, 19);
-            this.button3.TabIndex = 55;
-            this.button3.Text = "...";
-            this.button3.UseVisualStyleBackColor = true;
-            this.button3.Visible = false;
-            this.button3.Click += new System.EventHandler(this.button3_Click);
-            // 
-            // tb_kllb_ylsx
-            // 
-            this.tb_kllb_ylsx.Location = new System.Drawing.Point(16, 114);
-            this.tb_kllb_ylsx.Margin = new System.Windows.Forms.Padding(2);
-            this.tb_kllb_ylsx.Name = "tb_kllb_ylsx";
-            this.tb_kllb_ylsx.Size = new System.Drawing.Size(214, 21);
-            this.tb_kllb_ylsx.TabIndex = 54;
-            // 
-            // tb_kllb_sxys
-            // 
-            this.tb_kllb_sxys.Location = new System.Drawing.Point(18, 166);
-            this.tb_kllb_sxys.Margin = new System.Windows.Forms.Padding(2);
-            this.tb_kllb_sxys.Name = "tb_kllb_sxys";
-            this.tb_kllb_sxys.ReadOnly = true;
-            this.tb_kllb_sxys.Size = new System.Drawing.Size(173, 21);
-            this.tb_kllb_sxys.TabIndex = 54;
-            this.tb_kllb_sxys.Visible = false;
-            // 
             // ck_kllb_npxx
             // 
             this.ck_kllb_npxx.AutoSize = true;
-            this.ck_kllb_npxx.Location = new System.Drawing.Point(224, 239);
+            this.ck_kllb_npxx.Location = new System.Drawing.Point(224, 118);
             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);
@@ -977,7 +652,7 @@
             // ck_kllb_fdtx
             // 
             this.ck_kllb_fdtx.AutoSize = true;
-            this.ck_kllb_fdtx.Location = new System.Drawing.Point(224, 213);
+            this.ck_kllb_fdtx.Location = new System.Drawing.Point(224, 90);
             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);
@@ -988,7 +663,7 @@
             // ck_kllb_ystx
             // 
             this.ck_kllb_ystx.AutoSize = true;
-            this.ck_kllb_ystx.Location = new System.Drawing.Point(224, 187);
+            this.ck_kllb_ystx.Location = new System.Drawing.Point(224, 64);
             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);
@@ -1010,7 +685,7 @@
             // label32
             // 
             this.label32.AutoSize = true;
-            this.label32.Location = new System.Drawing.Point(16, 241);
+            this.label32.Location = new System.Drawing.Point(16, 118);
             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);
@@ -1020,7 +695,7 @@
             // label31
             // 
             this.label31.AutoSize = true;
-            this.label31.Location = new System.Drawing.Point(14, 215);
+            this.label31.Location = new System.Drawing.Point(14, 92);
             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);
@@ -1030,7 +705,7 @@
             // label30
             // 
             this.label30.AutoSize = true;
-            this.label30.Location = new System.Drawing.Point(14, 189);
+            this.label30.Location = new System.Drawing.Point(14, 66);
             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);
@@ -1047,47 +722,6 @@
             this.label34.TabIndex = 52;
             this.label34.Text = "显示该模块";
             // 
-            // cb_kllb_klfw
-            // 
-            this.cb_kllb_klfw.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.cb_kllb_klfw.FormattingEnabled = true;
-            this.cb_kllb_klfw.Location = new System.Drawing.Point(14, 63);
-            this.cb_kllb_klfw.Margin = new System.Windows.Forms.Padding(2);
-            this.cb_kllb_klfw.Name = "cb_kllb_klfw";
-            this.cb_kllb_klfw.Size = new System.Drawing.Size(214, 20);
-            this.cb_kllb_klfw.TabIndex = 42;
-            // 
-            // label35
-            // 
-            this.label35.AutoSize = true;
-            this.label35.Location = new System.Drawing.Point(12, 49);
-            this.label35.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label35.Name = "label35";
-            this.label35.Size = new System.Drawing.Size(53, 12);
-            this.label35.TabIndex = 41;
-            this.label35.Text = "颗粒范围";
-            // 
-            // label29
-            // 
-            this.label29.AutoSize = true;
-            this.label29.Location = new System.Drawing.Point(14, 100);
-            this.label29.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label29.Name = "label29";
-            this.label29.Size = new System.Drawing.Size(53, 12);
-            this.label29.TabIndex = 41;
-            this.label29.Text = "数量上限";
-            // 
-            // label36
-            // 
-            this.label36.AutoSize = true;
-            this.label36.Location = new System.Drawing.Point(16, 152);
-            this.label36.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.label36.Name = "label36";
-            this.label36.Size = new System.Drawing.Size(53, 12);
-            this.label36.TabIndex = 41;
-            this.label36.Text = "显示元素";
-            this.label36.Visible = false;
-            // 
             // button6
             // 
             this.button6.Location = new System.Drawing.Point(855, 47);
@@ -1248,7 +882,6 @@
             this.panel3.Controls.Add(this.groupBox7);
             this.panel3.Controls.Add(this.groupBox5);
             this.panel3.Controls.Add(this.groupBox8);
-            this.panel3.Controls.Add(this.groupBox3);
             this.panel3.Controls.Add(this.groupBox6);
             this.panel3.Controls.Add(this.groupBox9);
             this.panel3.Controls.Add(this.groupBox4);
@@ -1312,8 +945,6 @@
             this.Load += new System.EventHandler(this.OTSReport_TemplateDesignerRM_Load);
             this.groupBox1.ResumeLayout(false);
             this.groupBox1.PerformLayout();
-            this.groupBox3.ResumeLayout(false);
-            this.groupBox3.PerformLayout();
             this.groupBox4.ResumeLayout(false);
             this.groupBox4.PerformLayout();
             this.groupBox5.ResumeLayout(false);
@@ -1364,50 +995,27 @@
         private System.Windows.Forms.Label label9;
         private System.Windows.Forms.TextBox tb_ymwb;
         private System.Windows.Forms.Label label8;
-        private System.Windows.Forms.GroupBox groupBox3;
-        private System.Windows.Forms.CheckBox cb_jzwfl_xsmk;
-        private System.Windows.Forms.Label label18;
-        private System.Windows.Forms.ComboBox cb_jzwfl_klfw;
-        private System.Windows.Forms.Label label13;
-        private System.Windows.Forms.ComboBox cb_jzwfl_ljb;
-        private System.Windows.Forms.Label label19;
-        private System.Windows.Forms.ComboBox cb_jzwfl_xstx;
-        private System.Windows.Forms.Label label12;
         private System.Windows.Forms.GroupBox groupBox4;
         private System.Windows.Forms.CheckBox ck_klcc_xsmk;
         private System.Windows.Forms.Label label17;
-        private System.Windows.Forms.ComboBox cb_klcc_klfw;
         private System.Windows.Forms.ComboBox cb_klcc_ljb;
         private System.Windows.Forms.ComboBox cb_klcc_jsfs;
-        private System.Windows.Forms.Label label16;
         private System.Windows.Forms.Label label15;
         private System.Windows.Forms.Label label14;
         private System.Windows.Forms.GroupBox groupBox5;
-        private System.Windows.Forms.TextBox tb_yscf_ysxx;
         private System.Windows.Forms.CheckBox ck_yscf_xsmk;
         private System.Windows.Forms.Label label20;
-        private System.Windows.Forms.ComboBox cb_yscf_klfw;
-        private System.Windows.Forms.Label label21;
         private System.Windows.Forms.Label label22;
         private System.Windows.Forms.ComboBox cb_yscf_xstx;
-        private System.Windows.Forms.Label label24;
         private System.Windows.Forms.GroupBox groupBox6;
-        private System.Windows.Forms.TextBox tb_ysfx_xsys;
         private System.Windows.Forms.CheckBox ck_ysfx_xsmk;
         private System.Windows.Forms.Label label25;
-        private System.Windows.Forms.ComboBox cb_ysfx_klfw;
-        private System.Windows.Forms.Label label26;
-        private System.Windows.Forms.Label label27;
         private System.Windows.Forms.GroupBox groupBox7;
         private System.Windows.Forms.CheckBox ck_syxt_xsmk;
         private System.Windows.Forms.Label label40;
         private System.Windows.Forms.ComboBox cb_syxt_mhxssl;
-        private System.Windows.Forms.ComboBox cb_syxt_klfw;
-        private System.Windows.Forms.Label label41;
         private System.Windows.Forms.Label label42;
         private System.Windows.Forms.GroupBox groupBox8;
-        private System.Windows.Forms.TextBox tb_kllb_ylsx;
-        private System.Windows.Forms.TextBox tb_kllb_sxys;
         private System.Windows.Forms.CheckBox ck_kllb_npxx;
         private System.Windows.Forms.CheckBox ck_kllb_fdtx;
         private System.Windows.Forms.CheckBox ck_kllb_ystx;
@@ -1416,15 +1024,8 @@
         private System.Windows.Forms.Label label31;
         private System.Windows.Forms.Label label30;
         private System.Windows.Forms.Label label34;
-        private System.Windows.Forms.ComboBox cb_kllb_klfw;
-        private System.Windows.Forms.Label label35;
-        private System.Windows.Forms.Label label29;
-        private System.Windows.Forms.Label label36;
         private System.Windows.Forms.CheckBox ck_ym;
-        private System.Windows.Forms.Button button5;
-        private System.Windows.Forms.Button button4;
         private System.Windows.Forms.Label label33;
-        private System.Windows.Forms.Button button3;
         private System.Windows.Forms.ListView lbv_syxt_mblb;
         private System.Windows.Forms.ComboBox cb_syxt_ljb;
         private System.Windows.Forms.Label label38;

+ 71 - 71
OTSIncAReportApp/1-UI/OTSTemplateDesigner/OTSReport_TemplateDesignerRM.cs

@@ -55,26 +55,26 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             BindComboBox(cb_klcc_ljb, OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE);
             //颗粒范围
             //BindComboBox(DisplayPicutureType.AnalyzeDataTable, cb_klcc_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_klcc_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //BindComboBox(cb_klcc_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             #endregion
 
             #region 夹杂物分类图
             //显示图形
-            cb_jzwfl_xstx.Items.Add(table["report1"].ToString());
-            cb_jzwfl_xstx.Items.Add(table["report2"].ToString());
-            cb_jzwfl_xstx.Items.Add(table["report3"].ToString());
-            cb_jzwfl_xstx.Items.Add(table["report4"].ToString());
-            cb_jzwfl_xstx.Items.Add(table["report5"].ToString());
-            cb_jzwfl_xstx.SelectedIndex = 0;
+            //cb_jzwfl_xstx.Items.Add(table["report1"].ToString());
+            //cb_jzwfl_xstx.Items.Add(table["report2"].ToString());
+            //cb_jzwfl_xstx.Items.Add(table["report3"].ToString());
+            //cb_jzwfl_xstx.Items.Add(table["report4"].ToString());
+            //cb_jzwfl_xstx.Items.Add(table["report5"].ToString());
+            //cb_jzwfl_xstx.SelectedIndex = 0;
             //计算方式
             //BindComboBox(DisplayPicutureType.AnalyzeDataChart, cb_jzwfl_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_jzwfl_jsfs, OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE);
             //粒级表
             //BindComboBox(DisplayPicutureType.AnalyzeDataChart, cb_jzwfl_ljb, OTS_RETORT_PROP_GRID_ITEMS.CALCULATE_CHART_TYPE, (int)CALCULATE_CHART_TYPE.TRIO_CHART, OTS_RETORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE);
-            BindComboBox(cb_jzwfl_ljb, OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE);
+            //BindComboBox(cb_jzwfl_ljb, OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE);
             //颗粒范围
             //BindComboBox(DisplayPicutureType.AnalyzeDataTable, cb_jzwfl_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_jzwfl_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //BindComboBox(cb_jzwfl_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             #endregion
 
             #region 元素分析表
@@ -83,7 +83,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //BindComboBox(cb_yxfx_jsfs, OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE);
             //颗粒范围
             //BindComboBox(DisplayPicutureType.AnalyzeDataTable, cb_ysfx_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_ysfx_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //BindComboBox(cb_ysfx_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             #endregion
 
             #region 元素成份图
@@ -99,7 +99,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //BindComboBox(cb_yscf_jsfs, OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE);
             //颗粒范围
             //BindComboBox(DisplayPicutureType.AnalyzeDataTable, cb_yscf_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_yscf_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //BindComboBox(cb_yscf_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             #endregion
 
             #region 三元相图
@@ -108,7 +108,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //BindComboBox(cb_syxt_jsfs, OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE);
             //颗粒范围
             //BindComboBox(DisplayPicutureType.AnalyzeDataTable, cb_syxt_klfw, OTS_RETORT_PROP_GRID_ITEMS.CALCULATE_CHART_TYPE, (int)CALCULATE_CHART_TYPE.TRIO_CHART, OTS_RETORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
-            BindComboBox(cb_syxt_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
+            //BindComboBox(cb_syxt_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             //粒级表
             //BindComboBox(DisplayPicutureType.AnalyzeDataChart, cb_syxt_ljb, OTS_RETORT_PROP_GRID_ITEMS.CALCULATE_CHART_TYPE, (int)CALCULATE_CHART_TYPE.TRIO_CHART, OTS_RETORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE);
             BindComboBox(cb_syxt_ljb, OTS_REPORT_PROP_GRID_ITEMS.GRAIN_SIZE_CLASS_TABLE);
@@ -134,7 +134,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //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(cb_kllb_klfw, OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
             #endregion
 
         }
@@ -196,19 +196,19 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
         private void button4_Click(object sender, EventArgs e)
         {
             //元素分析表,显示元素
-            SetPeriodicTableControl(tb_ysfx_xsys, m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys);
+            //SetPeriodicTableControl(tb_ysfx_xsys, m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys);
         }
 
         private void button5_Click(object sender, EventArgs e)
         {
             //元素成份图,显示元素
-            SetPeriodicTableControl(tb_yscf_ysxx, m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_yscf_ysxx);
+            //SetPeriodicTableControl(tb_yscf_ysxx, m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_yscf_ysxx);
         }
 
         private void button3_Click(object sender, EventArgs e)
         {
             //颗粒列表,显示元素
-            SetPeriodicTableControl(tb_kllb_sxys, m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_tb_lllb_sxys);
+            //SetPeriodicTableControl(tb_kllb_sxys, m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_tb_lllb_sxys);
         }
 
         #endregion
@@ -353,7 +353,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk.ToString(), "M_KLLBXX", "b_ck_kllb_xsmk");    //是否显示模块
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_jsfs.ToString(), "M_KLLBXX", "index_cb_kllb_jsfs");    //计算方式
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_klfw.ToString(), "M_KLLBXX", "index_cb_kllb_klfw");    //颗粒范围
-                xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx.ToString(), "M_KLLBXX", "int_tb_kllb_ylsx");    //数量上限
+                //xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx.ToString(), "M_KLLBXX", "int_tb_kllb_ylsx");    //数量上限
                 xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_tb_kllb_sxys.ToString(), "M_KLLBXX", "str_tb_kllb_sxys");    //显示元素
                 for (int i = 0; i < m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_tb_lllb_sxys.Count; i++)                              //显示元素列表
                 {
@@ -565,42 +565,42 @@ 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.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.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_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_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_YSFXJG.b_ck_yscf_xsmk = ck_yscf_xsmk.Checked;
             m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_xstx = cb_yscf_xstx.Text;//显示图形
             m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_xstx = cb_yscf_xstx.SelectedIndex;
             //m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_jsfs = cb_yscf_jsfs.Text;//计算方式
             //m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_jsfs = cb_yscf_jsfs.SelectedIndex;
-            m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_klfw = cb_yscf_klfw.Text;//颗粒范围
-            m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_klfw = cb_yscf_klfw.SelectedIndex;
-            m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_tb_yscf_ysxx = tb_yscf_ysxx.Text;//显示元素
+            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_klfw = cb_yscf_klfw.Text;//颗粒范围
+            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_klfw = cb_yscf_klfw.SelectedIndex;
+            //m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_tb_yscf_ysxx = tb_yscf_ysxx.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_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;//每行显示数量
@@ -626,18 +626,18 @@ 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_klfw = cb_kllb_klfw.Text;//颗粒范围
+            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_klfw = cb_kllb_klfw.SelectedIndex;
             if (ck_kllb_xsmk.Checked)
             {
-                m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32(tb_kllb_ylsx.Text.Trim());//数量上限
+                //m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32(tb_kllb_ylsx.Text.Trim());//数量上限
             }
             else
             {
                 m_OTSReport_Export.m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32("1");
             }
 
-            m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_tb_kllb_sxys = tb_kllb_sxys.Text;//显示元素
+            //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_tb_kllb_sxys = tb_kllb_sxys.Text;//显示元素
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_ystx = ck_kllb_ystx.Checked;//原始图像
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_fdtx = ck_kllb_fdtx.Checked;//放大图像
             m_OTSReport_Export.m_mbszclass.M_KLLBXX.b_ck_kllb_npxx = ck_kllb_npxx.Checked;//能谱图像
@@ -667,25 +667,25 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //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_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_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_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_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;
+            //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;//显示元素
+            //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_yscf_xsmk.Checked = m_OTSReport_Export.m_mbszclass.M_YSFXJG.b_ck_yscf_xsmk;
             //cb_yscf_xstx.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_xstx;//显示图形
@@ -693,15 +693,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //cb_yscf_jsfs.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_jsfs;//计算方式
             //cb_yscf_jsfs.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_jsfs;
             //cb_yscf_klfw.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_cb_yscf_klfw;//颗粒范围
-            cb_yscf_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_klfw;
-            tb_yscf_ysxx.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_tb_yscf_ysxx;//显示元素
+            //cb_yscf_klfw.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_YSFXJG.index_cb_yscf_klfw;
+            //tb_yscf_ysxx.Text = m_OTSReport_Export.m_mbszclass.M_YSFXJG.str_tb_yscf_ysxx;//显示元素
 
             //三元相图
             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_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;//粒级表
 
@@ -725,10 +725,10 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
             //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;
+            //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;//显示元素
+            //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;//能谱图像
@@ -866,19 +866,19 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
                 }
                 else if (i == 3)
                 {
-                    if (cb_jzwfl_xsmk.Checked)
-                    {
-                        pictureBox3.Visible = true;
-                        top = top + 950;
-                        pictures[i - 1].Top = top;
-                        pictures[i - 1].Left = left;
-                        pictures[i - 1].Width = 673;
-                        pictures[i - 1].Height = 954;
-                    }
-                    else
-                    {
+                    //if (cb_jzwfl_xsmk.Checked)
+                    //{
+                    //    pictureBox3.Visible = true;
+                    //    top = top + 950;
+                    //    pictures[i - 1].Top = top;
+                    //    pictures[i - 1].Left = left;
+                    //    pictures[i - 1].Width = 673;
+                    //    pictures[i - 1].Height = 954;
+                    //}
+                    //else
+                    //{
                         pictureBox3.Visible = false;
-                    }
+                    //}
                 }
                 else if (i == 4)
                 {
@@ -1032,15 +1032,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
 
         private void cb_jzwfl_xsmk_CheckedChanged(object sender, EventArgs e)
         {
-            if (cb_jzwfl_xsmk.Checked)
-            {
-                pictureBox3.Visible = true;
-                this.pictureBox3.Image = Properties.Resources.颗粒成分图;
-            }
-            else
-            {
+            //if (cb_jzwfl_xsmk.Checked)
+            //{
+            //    pictureBox3.Visible = true;
+            //    this.pictureBox3.Image = Properties.Resources.颗粒成分图;
+            //}
+            //else
+            //{
                 pictureBox3.Visible = false;
-            }
+            //}
             LocationPicture();
         }
 

+ 13 - 11
OTSIncAReportTemplate/OTSIncAReportTemplate.cs

@@ -91,7 +91,7 @@ namespace OTSIncAReportTemplate
                 m_arg4 = "100";
                 m_arg5 = "0-100";
             }
-            
+            //MessageBox.Show("");
 
             //初始化xml类
             xmlutil = new XmlConfigUtil(m_arg2);
@@ -255,12 +255,12 @@ namespace OTSIncAReportTemplate
                 DataTable dataTable = new DataTable();
                 rmReport1.AddDataSet(dataTable, "PartSize");
                 rmReport1.AddDataSet(dataTable, "Particel");
-                rmReport1.AddDataSet(dataTable, "PicKL");
+                //rmReport1.AddDataSet(dataTable, "PicKL");
                 dataTable.Dispose();
                 dataTable.Clear();
                 rmReport1.FindObject("MasterData2").Prop["Visible"] = false;
                 rmReport1.FindObject("MasterData126").Prop["Visible"] = false;
-                rmReport1.FindObject("MasterData95").Prop["Visible"] = false;
+                //rmReport1.FindObject("MasterData95").Prop["Visible"] = false;
                 rmReport1.DeletePage(1);
             }
             else
@@ -301,11 +301,11 @@ namespace OTSIncAReportTemplate
                 }
                 else
                 {
-                    DataTable dataTable = new DataTable();
-                    rmReport1.AddDataSet(dataTable, "PicKL");
-                    dataTable.Dispose();
-                    dataTable.Clear();
-                    rmReport1.FindObject("MasterData95").Prop["Visible"] = false;
+                    //DataTable dataTable = new DataTable();
+                    //rmReport1.AddDataSet(dataTable, "PicKL");
+                    //dataTable.Dispose();
+                    //dataTable.Clear();
+                    //rmReport1.FindObject("MasterData95").Prop["Visible"] = false;
                 }
             }
 
@@ -898,13 +898,15 @@ namespace OTSIncAReportTemplate
             DataTable ls_ResultGrid = sh.ExecuteQuery("select * from ResultGrid");
             ls_ResultGrid.TableName = "ResultGrid";
             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);
 
-            DataTable ls_Largest_frame = sh.ExecuteQuery("select * from Largest_frame where cast(fieldid as int) > " + strmix + " and cast(fieldid as int) < " + strmax + " ");
-            ls_Largest_frame.TableName = "Largest_frame";
-            list_dt.Add(ls_Largest_frame);
+            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_Largest20 = sh.ExecuteQuery("select * from Largest20");
             ls_Largest20.TableName = "Largest20";

+ 2 - 0
OTSIncAReportTemplate/SqLiteHelper.cs

@@ -104,6 +104,8 @@ namespace OTSSysMgrTools
             }
             catch (Exception e)
             {
+                DataTable dtNill = new DataTable();
+                dt = dtNill;
                 //Log(e.Message);
             }