|
@@ -43,6 +43,7 @@ namespace OTSIncAReportApp
|
|
|
public XmlConfigUtil xmlutil;
|
|
|
public XmlConfigUtil xmlutil2;
|
|
|
public MBSZClass m_mbszclass = null;
|
|
|
+ OTS_DEVReport DEVReport;
|
|
|
/*public bool ReportExporting = false;*///判断报告是不在是在导出的过程中
|
|
|
|
|
|
#endregion
|
|
@@ -109,6 +110,11 @@ namespace OTSIncAReportApp
|
|
|
/// 颗粒列表信息
|
|
|
/// </summary>
|
|
|
public KLLBXX M_KLLBXX { get; set; }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 夹杂物占比
|
|
|
+ /// </summary>
|
|
|
+ public JZWZB M_JZWZB { get; set; }
|
|
|
#endregion
|
|
|
|
|
|
#region 构造函数
|
|
@@ -124,6 +130,7 @@ namespace OTSIncAReportApp
|
|
|
M_SYXT.list_lbv_syxt_mblb = new List<string>();
|
|
|
M_SYXT.list_lbv_syxt_mblb_index = new List<int>();
|
|
|
M_KLLBXX = new KLLBXX();
|
|
|
+ M_JZWZB = new JZWZB();
|
|
|
M_KLLBXX.list_str_tb_lllb_sxys = new List<string>();
|
|
|
M_DZ = new DZ();
|
|
|
}
|
|
@@ -446,6 +453,11 @@ namespace OTSIncAReportApp
|
|
|
/// </summary>
|
|
|
public bool b_ck_kllb_xsmk { get; set; }
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 颗粒列表 是否显示附加帧图模块
|
|
|
+ /// </summary>
|
|
|
+ public bool b_ck_kllb_fjzt { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 颗粒列表 计算方式 文本
|
|
|
/// </summary>
|
|
@@ -544,10 +556,23 @@ namespace OTSIncAReportApp
|
|
|
/// 颗粒列表 颗粒帧图表行中第二个可选字段 索引
|
|
|
/// </summary>
|
|
|
public int index_cb_kllb_chartSort_p2 { get; set; }
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
#endregion
|
|
|
+ #region 夹杂物占比
|
|
|
+ public class JZWZB
|
|
|
+ {
|
|
|
+ /// <summary>
|
|
|
+ /// 夹杂物占比表
|
|
|
+ /// </summary>
|
|
|
+ public bool b_ck_surface { get; set; }
|
|
|
+ /// <summary>
|
|
|
+ /// 夹杂物占比图
|
|
|
+ /// </summary>
|
|
|
+ public bool b_ck_chart { get; set; }
|
|
|
+ }
|
|
|
|
|
|
+ #endregion
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -698,6 +723,7 @@ namespace OTSIncAReportApp
|
|
|
}
|
|
|
//颗粒列表信息
|
|
|
m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_xsmk")); //是否显示模块
|
|
|
+ m_mbszclass.M_KLLBXX.b_ck_kllb_fjzt = Convert.ToBoolean(xmlutil2.Read("M_KLLBXX", "b_ck_kllb_fjzt")); //是否显示帧图模块
|
|
|
m_mbszclass.M_KLLBXX.index_cb_kllb_jsfs = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_jsfs")); //计算方式
|
|
|
m_mbszclass.M_KLLBXX.index_cb_kllb_klfw = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_klfw")); //颗粒范围
|
|
|
m_mbszclass.M_KLLBXX.int_tb_kllb_ylsx = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "int_tb_kllb_ylsx")); //数量上限
|
|
@@ -734,7 +760,9 @@ namespace OTSIncAReportApp
|
|
|
//m_mbszclass.M_KLLBXX.str_cb_kllb_chartSort_p3 = Convert.ToString(xmlutil2.Read("M_KLLBXX", "str_cb_kllb_chartSort_p3"));//帧图表列中第三个可选参数
|
|
|
//m_mbszclass.M_KLLBXX.index_cb_kllb_chartSort_p3 = Convert.ToInt32(xmlutil2.Read("M_KLLBXX", "index_cb_kllb_chartSort_p3"));
|
|
|
|
|
|
-
|
|
|
+ //夹杂物占比
|
|
|
+ m_mbszclass.M_JZWZB.b_ck_surface = Convert.ToBoolean(xmlutil2.Read("M_JZWZB", "b_ck_surface"));//夹杂物占比表
|
|
|
+ m_mbszclass.M_JZWZB.b_ck_chart= Convert.ToBoolean(xmlutil2.Read("M_JZWZB", "b_ck_chart"));//夹杂物占比图
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 从配置文件中读取报告模板路径
|
|
@@ -1106,45 +1134,8 @@ namespace OTSIncAReportApp
|
|
|
/// </summary>
|
|
|
private void OpenOTSINcAreportTemplateAPP()
|
|
|
{
|
|
|
- //----------------------------------
|
|
|
- //共传4个参数
|
|
|
- //参数1:是需要打开db数据库的路径
|
|
|
- //参数2:是打开报表模板xml文件的路径
|
|
|
- //参数3:是要执行查看报表的类型,输出主报表,还是输出颗粒列表
|
|
|
- //参数4:判断测量结果是夹杂物还是清洁度
|
|
|
- //参数5:是要执行查看报表的类型,输出主报表时,指定读取的标记帧图图像范围,如0-50,50-100,输出颗粒列表时无用
|
|
|
- //----------------------------------
|
|
|
- //Process[] processes = Process.GetProcesses();
|
|
|
- //foreach (Process proc in processes)
|
|
|
- //{
|
|
|
- // if (proc.ProcessName == "OTSIncAReportTemplate")
|
|
|
- // {
|
|
|
- // proc.Kill();-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
- // proc.WaitForExit();
|
|
|
- // break;
|
|
|
- // }
|
|
|
- //}
|
|
|
- ProcessStartInfo process = new ProcessStartInfo();
|
|
|
- process.FileName = "ReportTemplateExe\\OTSIncAReportTemplate.exe";//打开app的路径
|
|
|
- string arg1 = m_strDBpath.Replace(" ", "^");//参数1,是需要打开db数据库的路径
|
|
|
- string arg2 = tb_mblj.Text.Trim().Replace(" ", "^");//参数2,是模板文件的路径
|
|
|
- string arg3 = "MainReport";//主体报表
|
|
|
- string arg4 = "";
|
|
|
-
|
|
|
- ResultFile resfile = m_ReportApp.m_rstDataMgr.ResultFilesList[m_ReportApp.m_rstDataMgr.GetWorkingResult()];
|
|
|
- if (((Dictionary<string, object>)((Dictionary<string, object>)((Dictionary<string, object>)resfile.ResultInfo["Sample"])["Members"])["MsrParams"])["SysType"].ToString() == "0:IncA")
|
|
|
- {
|
|
|
- arg4 = "inca";//打卡夹杂物报告
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- arg4 = "Cleanness";//打卡清洁度报告
|
|
|
- }
|
|
|
-
|
|
|
- string arg5 = "null";
|
|
|
- process.Arguments = string.Format("{0} {1} {2} {3} {4}", arg1, arg2, arg3, arg4, arg5); //多个参数用空格隔开
|
|
|
- process.WindowStyle = ProcessWindowStyle.Normal;
|
|
|
- Process.Start(process);
|
|
|
+ ReportPrintTool tool = new ReportPrintTool(DEVReport);
|
|
|
+ tool.ShowPreview();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1190,6 +1181,11 @@ namespace OTSIncAReportApp
|
|
|
|
|
|
private void btn_preview_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
+
|
|
|
+ DEVReport = new OTS_DEVReport(this);
|
|
|
+ //DEVReport.Dispose();
|
|
|
+
|
|
|
+
|
|
|
//为防止重复打开报告后,显示数据库占用错误,先确保报告模板进程已关闭
|
|
|
Process[] processes = Process.GetProcesses();
|
|
|
foreach (Process proc in processes)
|
|
@@ -1227,6 +1223,11 @@ namespace OTSIncAReportApp
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //frmReportConditionChoose frm = new frmReportConditionChoose(m_ReportApp);
|
|
|
+ //frm.ShowDataDiagram(DisplayPicutureType.AnalyzeDataChart);
|
|
|
+
|
|
|
+
|
|
|
m_ReportApp.m_rstDataMgr.setSelectedIndex(cbo_sjy.SelectedIndex);
|
|
|
|
|
|
//重新导出报表数据
|
|
@@ -1321,523 +1322,7 @@ namespace OTSIncAReportApp
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- #region 将报表数据保存到数据库中
|
|
|
- /// <summary>
|
|
|
- /// 将报表数据保存到数据库中
|
|
|
- /// </summary>
|
|
|
- private void SaveReportTemplateDBFile()
|
|
|
- {
|
|
|
- File.Delete(m_strDBpath);//测试时删除数据库文件,为防止第二次打开报告提示数据库占用,挪到方法开始处
|
|
|
- SqlHelper.CreateNewDatabase(m_strDBpath);
|
|
|
- SqlHelper sh = new SqlHelper("data source='" + m_strDBpath + "'");
|
|
|
-
|
|
|
- //开始事务
|
|
|
- SQLiteTransaction tr = sh.BeginTranscation();
|
|
|
-
|
|
|
- //数据库过程
|
|
|
- //try
|
|
|
- //{
|
|
|
- //创建表 ResultGrid
|
|
|
- string[] strcolumns_ResultGrid = { "CLJGMC", "YXSJ", "SCZS", "FLFA", "YJCTZ", "SCMJ", "CKBZ" , "FDBS" };
|
|
|
- string[] strcoltypes_ResultGrid = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" , "TEXT" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 Largest_frame
|
|
|
- string[] strcolumns_Largest_frame = { "pid", "Size", "Width","DMAX","DMIN", "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", "TEXT", "TEXT" ,
|
|
|
- "INT","BLOB"};
|
|
|
-
|
|
|
-
|
|
|
- //创建表 Largest20
|
|
|
- string[] strcolumns_Largest20 = { "pid", "Size", "Width","DMAX","DMIN", "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", "TEXT", "TEXT" ,
|
|
|
- "BLOB","BLOB","BLOB"};
|
|
|
-
|
|
|
-
|
|
|
- //创建表 field_dt
|
|
|
- string[] strcolumns_field_dt = { "FieldId", "FieldImg" };
|
|
|
- string[] strcoltypes_field_dt = { "INT", "BLOB" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 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" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 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" };
|
|
|
-
|
|
|
- //创建元素物质表
|
|
|
- string[] strcolumns_ElementalSubstance_Name = { "Name", "Area", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "e10", "e11", "e12", "e13" };
|
|
|
- string[] strcoltypes_ElementalSubstance_Name = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
- string[] strcolumns_ElementalSubstance_Value = { "Name", "Area", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "e10", "e11", "e12", "e13" };
|
|
|
- string[] strcoltypes_ElementalSubstance_Value = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
- //创建元素物质细分表
|
|
|
- string[] strcolumns_ElementSubdivision_Name = { "Class", "Area", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "e10", "e11", "e12", "e13", "Name" };
|
|
|
- string[] strcoltypes_ElementSubdivision_Name = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
- string[] strcolumns_ElementSubdivision_Value = { "Class", "Area", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "e10", "e11", "e12", "e13", "Name" };
|
|
|
- string[] strcoltypes_ElementSubdivision_Value = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
-
|
|
|
- //创建表 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" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 Particel
|
|
|
- string[] strcolumns_Particel = { "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "total", "Name" };
|
|
|
- string[] strcoltypes_Particel = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
-
|
|
|
- //创建表 Particel_subdivision
|
|
|
- string[] strcolumns_Particel_subdivision = { "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "Name", "total" ,"Class"};
|
|
|
- string[] strcoltypes_Particel_subdivision = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
-
|
|
|
- //创建表 PicKL
|
|
|
- string[] strcolumns_PicKL = { "pict" };
|
|
|
- string[] strcoltypes_PicKL = { "BLOB" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 夹杂物面积比
|
|
|
- string[] strcolumns_PicInclusionAreaRatio = { "pict" };
|
|
|
- string[] strcoltypes_PicInclusionAreaRatio = { "BLOB" };
|
|
|
-
|
|
|
- //创建表 大分类夹杂物面积比
|
|
|
- string[] strcolumns_PicInclusionAreaClassRatio = { "pict" };
|
|
|
- string[] strcoltypes_PicInclusionAreaClassRatio = { "BLOB" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 PicYS
|
|
|
- string[] strcolumns_PicYS = { "pict" };
|
|
|
- string[] strcoltypes_PicYS = { "BLOB" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 PicSYXT2T
|
|
|
- string[] strcolumns_PicSYXT2T = { "pict", "pict2" };
|
|
|
- string[] strcoltypes_PicSYXT2T = { "BLOB", "BLOB" };
|
|
|
-
|
|
|
-
|
|
|
- //创建表 PicSYXT3T
|
|
|
- string[] strcolumns_PicSYXT3T = { "pict", "pict2", "pict3" };
|
|
|
- string[] strcoltypes_PicSYXT3T = { "BLOB", "BLOB", "BLOB" };
|
|
|
-
|
|
|
-
|
|
|
- string[] strcolums_AreaRatio = { "c1", "c2", "c3", "c4", "c5" };
|
|
|
- string[] strcoltypes_AreaRatio = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT" };
|
|
|
-
|
|
|
-
|
|
|
- //将数据插入到数据库中
|
|
|
- List<DataTable> list_dt = m_export_reporttemplate.m_list_dt;
|
|
|
- //元素分析-物质大分类保存至数据库
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "ElementalSubstance_Name"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "ElementalSubstance_Name", "ElementalSubstance_Name", sh, strcolumns_ElementalSubstance_Name, strcoltypes_ElementalSubstance_Name, tr);
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "ElementalSubstance_Value"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "ElementalSubstance_Value", "ElementalSubstance_Value", sh, strcolumns_ElementalSubstance_Value, strcoltypes_ElementalSubstance_Value, tr);
|
|
|
- //元素分析-物质小分类细分保存至数据库
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "ElementSubdivision_Name"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "ElementSubdivision_Name", "ElementSubdivision_Name", sh, strcolumns_ElementSubdivision_Name, strcoltypes_ElementSubdivision_Name, tr);
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "ElementSubdivision_Value"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "ElementSubdivision_Value", "ElementSubdivision_Value", sh, strcolumns_ElementSubdivision_Value, strcoltypes_ElementSubdivision_Value, 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);
|
|
|
-
|
|
|
-
|
|
|
- //插入 Largest_frame
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "Largest_frame"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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, DMAX,DMIN,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() + "','"
|
|
|
- + ls_Largest_frame.Rows[i][17].ToString() + "',"
|
|
|
- + ls_Largest_frame.Rows[i][18].ToString() + ",:p1)";
|
|
|
-
|
|
|
- byte[] byte_p1 = (byte[])ls_Largest_frame.Rows[i][19];
|
|
|
-
|
|
|
- int iresult = sh.ExecuteQuery(ls_sqlstr, "p1", byte_p1, tr);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //插入帧图子表
|
|
|
- if(JudgeWhetherTheTableExists(list_dt, "FrameGraphSubTable"))
|
|
|
- {
|
|
|
- sh.CreateTable("FrameGraphSubTable", strcolumns_Largest_frame, strcoltypes_Largest_frame);
|
|
|
- DataTable ls_Largest_frame = list_dt.Where(aa => aa.TableName.Contains("FrameGraphSubTable")).ToList()[0];
|
|
|
- for (int i = 0; i < ls_Largest_frame.Rows.Count; i++)
|
|
|
- {
|
|
|
- if (ls_Largest_frame.Rows[i][19] == null)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (ls_Largest_frame.Rows[i][19] == DBNull.Value)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- string ls_sqlstr = "insert into FrameGraphSubTable (pid, Size, Width,DMAX,DMIN, 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() + "','"
|
|
|
- + ls_Largest_frame.Rows[i][17].ToString() + "',"
|
|
|
- + ls_Largest_frame.Rows[i][18].ToString() + ",:p1)";
|
|
|
-
|
|
|
- byte[] byte_p1 = (byte[])ls_Largest_frame.Rows[i][19];
|
|
|
-
|
|
|
- int iresult = sh.ExecuteQuery(ls_sqlstr, "p1", byte_p1, tr);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //插入 Largest20
|
|
|
- if(JudgeWhetherTheTableExists(list_dt, "Largest20"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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 ,DMAX,DMIN,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() + "','"
|
|
|
- + ls_Largest20.Rows[i][16].ToString() + "','"
|
|
|
- + ls_Largest20.Rows[i][17].ToString() + "',:p1,:p2,:p3)";
|
|
|
-
|
|
|
- byte[] byte_p1 = (byte[])ls_Largest20.Rows[i][18];
|
|
|
- byte[] byte_p2 = (byte[])ls_Largest20.Rows[i][19];
|
|
|
- byte[] byte_p3 = (byte[])ls_Largest20.Rows[i][20];
|
|
|
-
|
|
|
- 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.getSelectedIndex()].FilePath + "\\FIELD_FILES_MARK\\";
|
|
|
-
|
|
|
- //插入 field_dt
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "field_dt"))
|
|
|
- {
|
|
|
- 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
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "ElementName"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "ElementName", "ElementName", sh, strcolumns_ElementName, strcoltypes_ElementName, tr);
|
|
|
-
|
|
|
-
|
|
|
- //插入 ElementValue
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "ElementValue"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "ElementValue", "ElementValue", sh, strcolumns_ElementValue, strcoltypes_ElementValue, tr);
|
|
|
-
|
|
|
-
|
|
|
- //插入 PartSize
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "PartSize"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "PartSize", "PartSize", sh, strcolumns_PartSize, strcoltypes_PartSize, tr);
|
|
|
-
|
|
|
-
|
|
|
- //插入 Particel
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "Particel"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "Particel", "Particel", sh, strcolumns_Particel, strcoltypes_Particel, tr);
|
|
|
-
|
|
|
-
|
|
|
- //插入 Particel_subdivision
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "Particel_subdivision"))
|
|
|
- DataTableSurfaceSaveToDB(list_dt, "Particel_subdivision", "Particel_subdivision", sh, strcolumns_Particel_subdivision, strcoltypes_Particel_subdivision, tr);
|
|
|
-
|
|
|
- //插入 PicKL
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "PicKL"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //插入 Pic_InclusionAreaRatio
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "Pic_InclusionAreaRatio"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //插入 PicYS
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "PicYS"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //插入 PicSYXT2T
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "PicSYXT2T"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //插入 PicSYXT3T
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "PicSYXT3T"))
|
|
|
- {
|
|
|
- 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++)
|
|
|
- {
|
|
|
- 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);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //插入 PicKL
|
|
|
- if (JudgeWhetherTheTableExists(list_dt, "Pic_InclusionareaClassRatio"))
|
|
|
- {
|
|
|
- sh.CreateTable("Pic_InclusionareaClassRatio", strcolumns_PicInclusionAreaClassRatio, strcoltypes_PicInclusionAreaClassRatio);
|
|
|
- DataTable ls_PicKL = list_dt.Where(aa => aa.TableName.Contains("Pic_InclusionareaClassRatio")).ToList()[0];
|
|
|
- for (int i = 0; i < ls_PicKL.Rows.Count; i++)
|
|
|
- {
|
|
|
- if (ls_PicKL.Rows[i][0] == null)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if (ls_PicKL.Rows[i][0] == DBNull.Value)
|
|
|
- {
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- string ls_sqlstr = "insert into Pic_InclusionareaClassRatio (pict) values(:pict)";
|
|
|
- byte[] byte_p1 = (byte[])ls_PicKL.Rows[i][0];
|
|
|
- int iresult = sh.ExecuteQuery(ls_sqlstr, "pict", byte_p1, tr);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //事务提交
|
|
|
- sh.TranscationCommit(tr);
|
|
|
- //}
|
|
|
- //catch (Exception ee)
|
|
|
- //{
|
|
|
- // //回滚
|
|
|
- // sh.TranscationRollback(tr);
|
|
|
- //}
|
|
|
- //finally
|
|
|
- //{
|
|
|
- //最后关闭连接
|
|
|
- tr.Dispose();
|
|
|
- tr = null;
|
|
|
- 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 导出工作线程部份
|
|
|
private void backgroundWorker2_DoWork(object sender, DoWorkEventArgs e)
|
|
@@ -1862,8 +1347,8 @@ namespace OTSIncAReportApp
|
|
|
i_zz = 80 / 9;
|
|
|
|
|
|
//首先将测量结果信息表导出,在表头------------------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox5"].ToString());//加载测量结果信息表模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox6"].ToString());//加载:测量结果信息表
|
|
|
+ worker.ReportProgress(0, table["result_information_ing"].ToString());//加载测量结果信息表模块中....
|
|
|
+ worker.ReportProgress(0, table["load_result_information"].ToString());//加载:测量结果信息表
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + 1;
|
|
|
worker.ReportProgress(processvalue);
|
|
@@ -1873,12 +1358,13 @@ namespace OTSIncAReportApp
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox8"].ToString());//加载测量结果信息表模块完成
|
|
|
- //-------------------------------------------------------------------------
|
|
|
+ worker.ReportProgress(0, table["loading_result_information_completed"].ToString());//加载测量结果信息表模块完成
|
|
|
+ //-------------------------------------------------------------------------
|
|
|
|
|
|
- //调用输出,颗粒列表----------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox9"].ToString());//加载颗粒列表模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox10"].ToString());//加载:颗粒列表
|
|
|
+
|
|
|
+ //调用,颗粒尺寸分析表------------------------------------------------
|
|
|
+ worker.ReportProgress(0, table["dimensional_analysis_table_ing"].ToString());//加载颗粒尺寸分析表模块中....
|
|
|
+ worker.ReportProgress(0, table["loading_dimension_analysis_table"].ToString());//加载:颗粒尺寸分析表
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + i_zz;
|
|
|
worker.ReportProgress(processvalue);
|
|
@@ -1888,29 +1374,29 @@ namespace OTSIncAReportApp
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox14"].ToString());//加载颗粒列表模块完成
|
|
|
+ worker.ReportProgress(0, table["loading_dimension_analysis_table_completed"].ToString());//加载颗粒尺寸分析表模块完成
|
|
|
|
|
|
|
|
|
|
|
|
- //调用输出,平均元素含量表---------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox15"].ToString());//加载平均元素含量表模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox16"].ToString());//加载:平均元素含量表
|
|
|
+ //调用,元素分析表---------------------------------------------
|
|
|
+ worker.ReportProgress(0, table["element_analysis_table_ing"].ToString());//加载元素分析表模块中....
|
|
|
+ worker.ReportProgress(0, table["load_element_analysis_table"].ToString());//加载:元素分析表
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + i_zz;
|
|
|
worker.ReportProgress(processvalue);
|
|
|
lock (m_thread_flag)
|
|
|
- m_thread_flag = table["rictbox7"].ToString(); //等待
|
|
|
+ m_thread_flag = table["rictbox7"].ToString();//等待
|
|
|
while (m_thread_flag == table["rictbox7"].ToString())//等待
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox17"].ToString());//加载平均元素含量表模块完成
|
|
|
+ worker.ReportProgress(0, table["loading_element_analysis_table_completed"].ToString());//加载元素分析表模块完成
|
|
|
|
|
|
|
|
|
|
|
|
- //调用输出,颗粒尺寸表--------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox19"].ToString());//加载颗粒尺寸表模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox20"].ToString());//加载:颗粒尺寸表
|
|
|
+ //调用,夹杂物面积比表---------------------------------------------
|
|
|
+ worker.ReportProgress(0, table["inca_area_ratio_table_ing"].ToString());//加载夹杂物面积比表模块中....
|
|
|
+ worker.ReportProgress(0, table["load_inca_area_ratio_table"].ToString());//加载:夹杂物面积比表
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + i_zz;
|
|
|
worker.ReportProgress(processvalue);
|
|
@@ -1920,14 +1406,28 @@ namespace OTSIncAReportApp
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox21"].ToString());//加载颗粒尺寸表模块完成
|
|
|
+ worker.ReportProgress(0, table["loading_inca_area_ratio_table_completed"].ToString());//加载夹杂物面积比表模块完成
|
|
|
|
|
|
|
|
|
+ //调用,夹杂物面积比图---------------------------------------------
|
|
|
+ worker.ReportProgress(0, table["inca_area_ratio_diagram_ing"].ToString());//加载夹杂物面积比图模块中....
|
|
|
+ worker.ReportProgress(0, table["load_inca_area_ratio_diagram"].ToString());//加载:夹杂物面积比图
|
|
|
+ //更新进度条
|
|
|
+ processvalue = processvalue + i_zz;
|
|
|
+ worker.ReportProgress(processvalue);
|
|
|
+ lock (m_thread_flag)
|
|
|
+ m_thread_flag = table["rictbox7"].ToString();//等待
|
|
|
+ while (m_thread_flag == table["rictbox7"].ToString())//等待
|
|
|
+ {
|
|
|
+ System.Threading.Thread.Sleep(500);
|
|
|
+ }
|
|
|
+ worker.ReportProgress(0, table["loading_inca_area_ratio_diagram_completed"].ToString());//加载夹杂物面积比图模块完成
|
|
|
|
|
|
|
|
|
- //调用,颗粒成份图------------------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox23"].ToString());//加载颗粒成份图模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox24"].ToString());//加载:颗粒成份图
|
|
|
+ System.Threading.Thread.Sleep(2000);
|
|
|
+ //调用,三元相图----------------------------------------------
|
|
|
+ worker.ReportProgress(0, table["ternary_graph_ing"].ToString());//加载三元相图模块中....
|
|
|
+ worker.ReportProgress(0, table["load_ternary_graph"].ToString());//加载:三元相图
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + i_zz;
|
|
|
worker.ReportProgress(processvalue);
|
|
@@ -1937,11 +1437,12 @@ namespace OTSIncAReportApp
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox25"].ToString());//加载颗粒成份图模块完成
|
|
|
+ worker.ReportProgress(0, table["loading_ternary_graph_completed"].ToString());//加载三元相图模块完成
|
|
|
+
|
|
|
|
|
|
- //调用,元素成份图---------------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox27"].ToString());//加载元素成份图模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox28"].ToString());//加载:元素成份图
|
|
|
+ //调用输出,颗粒列表----------------------------------------
|
|
|
+ worker.ReportProgress(0, table["particle_list_ing"].ToString());//加载颗粒列表模块中....
|
|
|
+ worker.ReportProgress(0, table["load_particle_list"].ToString());//加载:颗粒列表
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + i_zz;
|
|
|
worker.ReportProgress(processvalue);
|
|
@@ -1951,12 +1452,13 @@ namespace OTSIncAReportApp
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox29"].ToString());//加载元素成份图模块完成
|
|
|
+ worker.ReportProgress(0, table["loading_particle_list_completed"].ToString());//加载颗粒列表模块完成
|
|
|
|
|
|
|
|
|
- //调用,三元相图----------------------------------------------
|
|
|
- worker.ReportProgress(0, table["rictbox31"].ToString());//加载三元相图模块中....
|
|
|
- worker.ReportProgress(0, table["rictbox32"].ToString());//加载:三元相图
|
|
|
+
|
|
|
+ //调用输出,颗粒列表帧图----------------------------------------
|
|
|
+ worker.ReportProgress(0, table["particle_list_frame_diagram_ing"].ToString());//加载颗粒列表帧图模块中....
|
|
|
+ worker.ReportProgress(0, table["load_particle_list_frame_diagram"].ToString());//加载:颗粒列表帧图
|
|
|
//更新进度条
|
|
|
processvalue = processvalue + i_zz;
|
|
|
worker.ReportProgress(processvalue);
|
|
@@ -1966,7 +1468,7 @@ namespace OTSIncAReportApp
|
|
|
{
|
|
|
System.Threading.Thread.Sleep(500);
|
|
|
}
|
|
|
- worker.ReportProgress(0, table["rictbox33"].ToString());//加载三元相图模块完成
|
|
|
+ worker.ReportProgress(0, table["loading_particle_list_frame_diagram_completed"].ToString());//加载颗粒列表帧图模块完成
|
|
|
|
|
|
|
|
|
//生成,模板临时数据库文件----------------------------------------------
|
|
@@ -2012,71 +1514,74 @@ namespace OTSIncAReportApp
|
|
|
string s = AnalyticGraphics(m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx);
|
|
|
if (ls_str.IndexOf(table["rictbox12"].ToString()) > -1)//加载:
|
|
|
{
|
|
|
- if (ls_str.IndexOf(table["rictbox11"].ToString()) > -1)//测量结果信息表
|
|
|
+ if (ls_str.IndexOf(table["result_information"].ToString()) > -1)//测量结果信息表
|
|
|
{
|
|
|
- //m_export_reporttemplate.GetDBData();
|
|
|
- m_export_reporttemplate.InsertReportTemplateTable_ResultGrid();
|
|
|
+ DEVReport.setResultGrid(m_mbszclass);
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
- if (ls_str.IndexOf(table["rictbox13"].ToString()) > -1)//颗粒列表
|
|
|
+ if (ls_str.IndexOf(table["dimensional_analysis_table"].ToString()) > -1)//颗粒尺寸分析表
|
|
|
{
|
|
|
- //判断颗粒列表是否导出
|
|
|
- if (m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk)
|
|
|
- {
|
|
|
- m_export_reporttemplate.InsertReportTemplateTable_ParticlesGridDevidePage_CleanlinessA(m_mbszclass);
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ if (m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk)
|
|
|
+ DEVReport.setParticleSizeTable(m_mbszclass);
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
|
|
|
- if (ls_str.IndexOf(table["rictbox18"].ToString()) > -1)//平均元素含量表
|
|
|
+ if (ls_str.IndexOf(table["element_analysis_table"].ToString()) > -1)//元素分析表
|
|
|
{
|
|
|
- m_export_reporttemplate.InsertReportTemplateTable_ElementAvgGrid(m_mbszclass);
|
|
|
- m_export_reporttemplate.InsertReportTemplateChart_InclusionAreaClassRatio("pie", m_mbszclass);
|
|
|
-
|
|
|
-
|
|
|
- m_export_reporttemplate.InsertReportTemplateTable_ElementCompositionAvgGrid(m_mbszclass);
|
|
|
- m_export_reporttemplate.InsertReportTemplateChart_InclusionAreaRatio("pie", m_mbszclass);
|
|
|
+ if (m_mbszclass.M_YSFXJG.b_ck_ysfx_xsmk)
|
|
|
+ DEVReport.setElementAvgGrid(m_mbszclass);
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
|
|
|
- if (ls_str.IndexOf(table["rictbox22"].ToString()) > -1)//颗粒尺寸表
|
|
|
+ if (ls_str.IndexOf(table["inca_area_ratio_table"].ToString()) > -1)//夹杂物面积比表
|
|
|
{
|
|
|
- m_export_reporttemplate.InsertReportTemplateTable_ParticleSizeGrid(m_mbszclass);
|
|
|
+ if (m_mbszclass.M_JZWZB.b_ck_surface)
|
|
|
+ DEVReport.setINCAtable(m_mbszclass);
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
|
|
|
- if (ls_str.IndexOf(table["rictbox26"].ToString()) > -1)//颗粒成份图
|
|
|
+ if (ls_str.IndexOf(table["inca_area_ratio_diagram"].ToString()) > -1)//夹杂物面积比图
|
|
|
{
|
|
|
- //m_export_reporttemplate.InsertReportTemplateChart_ParticlesCompositionChart(AnalyticGraphics(m_mbszclass.M_KLFXJG.index_cb_jzwfl_xstx));
|
|
|
+ if (m_mbszclass.M_JZWZB.b_ck_chart)
|
|
|
+ {
|
|
|
+ DEVReport.set_incaPIC_classify(m_mbszclass);
|
|
|
+ DEVReport.set_incaPIC_subdivision(m_mbszclass);
|
|
|
+ }
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
- if (ls_str.IndexOf(table["rictbox30"].ToString()) > -1)//元素成份图
|
|
|
+ if (ls_str.IndexOf(table["ternary_graph"].ToString()) > -1)//三元图
|
|
|
{
|
|
|
- // m_export_reporttemplate.InsertReportTemplateChart_ElementCompositionChart(AnalyticGraphics(m_mbszclass.M_YSFXJG.index_cb_yscf_xstx));
|
|
|
+ if (m_mbszclass.M_SYXT.b_ck_syxt_xsmk)
|
|
|
+ DEVReport.InsertReportTemplateChart_Trianglediagram(m_mbszclass);
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
|
|
|
- if (ls_str.IndexOf(table["rictbox34"].ToString()) > -1)//三元相图
|
|
|
+ if (ls_str.IndexOf(table["particle_list"].ToString()) > -1)//颗粒列表
|
|
|
{
|
|
|
- //三元图部分
|
|
|
- if (m_mbszclass.M_SYXT.b_ck_syxt_xsmk)
|
|
|
- m_export_reporttemplate.InsertReportTemplateChart_Trianglediagram(m_mbszclass);
|
|
|
+ if (m_mbszclass.M_KLLBXX.b_ck_kllb_xsmk)
|
|
|
+ DEVReport.set_kllb_data(m_mbszclass);
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
|
|
|
|
+ if (ls_str.IndexOf(table["particle_list_frame_diagram"].ToString()) > -1)//颗粒帧图列表
|
|
|
+ {
|
|
|
+ if (m_mbszclass.M_KLLBXX.b_ck_kllb_fjzt)
|
|
|
+ DEVReport.set_kllb_data_frame(m_mbszclass);
|
|
|
+
|
|
|
+ lock (m_thread_flag)
|
|
|
+ m_thread_flag = strNill;
|
|
|
+ }
|
|
|
if (ls_str.IndexOf(table["rictbox38"].ToString()) > -1)//生成模板临时数据库文件
|
|
|
{
|
|
|
- //导出到数据库文件中
|
|
|
- SaveReportTemplateDBFile();
|
|
|
-
|
|
|
+ DEVReport.International_language(dev_internationalLanguage());
|
|
|
lock (m_thread_flag)
|
|
|
m_thread_flag = strNill;
|
|
|
}
|
|
@@ -2607,9 +2112,10 @@ namespace OTSIncAReportApp
|
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- OTS_DEVReport DEVReport = new OTS_DEVReport(this);
|
|
|
+ DEVReport = new OTS_DEVReport(this);
|
|
|
//DEVReport.Dispose();
|
|
|
//DEVReport = new OTS_DEVReport(this);
|
|
|
+
|
|
|
DEVReport.setResultGrid(m_mbszclass);
|
|
|
DEVReport.setParticleSizeTable(m_mbszclass);
|
|
|
DEVReport.setElementAvgGrid(m_mbszclass);
|
|
@@ -2617,7 +2123,7 @@ namespace OTSIncAReportApp
|
|
|
DEVReport.set_incaPIC_classify(m_mbszclass);
|
|
|
DEVReport.set_incaPIC_subdivision(m_mbszclass);
|
|
|
|
|
|
- // DEVReport.InsertReportTemplateChart_Trianglediagram(m_mbszclass);
|
|
|
+ DEVReport.InsertReportTemplateChart_Trianglediagram(m_mbszclass);
|
|
|
DEVReport.set_kllb_data(m_mbszclass);
|
|
|
|
|
|
|