|
|
@@ -1,32 +1,19 @@
|
|
|
-
|
|
|
-using DevExpress.Utils.Extensions;
|
|
|
-using DevExpress.XtraDiagram.Bars;
|
|
|
-using NPOI.SS.Formula.Functions;
|
|
|
-using NPOI.Util;
|
|
|
-using NPOI.Util.Collections;
|
|
|
+using NPOI.Util;
|
|
|
using OTSCommon.DBOperate;
|
|
|
using OTSIncAReportApp._1_UI.OTSReportExport;
|
|
|
using OTSIncAReportApp._1_UI.OTSReportExport.DataIntegration;
|
|
|
using OTSIncAReportApp._1_UI.OTSTemplateDesigner;
|
|
|
-using OTSIncAReportApp.DataOperation.DataAccess;
|
|
|
using OTSIncAReportApp.OTSRstMgrFunction;
|
|
|
using OTSIncAReportApp.OTSSampleReportInfo;
|
|
|
-using OTSIncAReportApp.SysMgrTools;
|
|
|
using OTSPeriodicTable;
|
|
|
-using OTSRptPeriodicTable;
|
|
|
using System;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
-using System.Collections.Generic;
|
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
|
using System.IO;
|
|
|
using System.Windows.Forms;
|
|
|
-using static DevExpress.XtraCharts.GLGraphics.GL;
|
|
|
-using static OpenCvSharp.XImgProc.CvXImgProc;
|
|
|
using static OTSDataType.otsdataconst;
|
|
|
-using static OTSModelSharp.DTLBase.ColumnType;
|
|
|
-using static System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip;
|
|
|
|
|
|
namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
{
|
|
|
@@ -39,8 +26,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
Hashtable table;
|
|
|
private List<string> TCCleannessAList = new List<string>();
|
|
|
private List<string> list_MainPriority = new List<string>();
|
|
|
- //DataTable RuleGroup = new DataTable();
|
|
|
- //List<DataTable> List_data = new List<DataTable>();
|
|
|
+
|
|
|
string StandardLibraryName = "";
|
|
|
string StandardLibraryAddress = "";
|
|
|
//分组选中ID
|
|
|
@@ -80,7 +66,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
string strResultLibraryName = result[0] + ".db";
|
|
|
|
|
|
StandardLibraryName= result[0] + ".db";
|
|
|
- //label_StandardLibraryName.Text= table["standardlibrary"].ToString() + m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName;
|
|
|
|
|
|
for (int i = 0; i < m_OTSReport_Export.LibraryName.Count; i++)
|
|
|
{
|
|
|
@@ -96,7 +81,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
{
|
|
|
TCCleannessAList = m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial.Copy();
|
|
|
list_MainPriority = m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Copy();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -105,7 +89,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
cb_TccleanlinessA.Enabled = true;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
textBox_zypxss.Text = m_OTSReport_Export.m_mbszclass.str_MainPriority.ToString();
|
|
|
}
|
|
|
|
|
|
@@ -131,16 +114,12 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
|
|
|
AutoCompleteStringCollection sc = new AutoCompleteStringCollection();
|
|
|
sc.AddRange(PeriodicTable);
|
|
|
-
|
|
|
#endregion
|
|
|
-
|
|
|
#region 颗粒列表
|
|
|
BindComboBox(comboBox_p1, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
|
|
|
BindComboBox(comboBox_p2, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
|
|
|
BindComboBox(comboBox_p3, OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
|
|
|
-
|
|
|
#endregion
|
|
|
-
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
@@ -210,7 +189,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
//页眉页脚
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_ymwb.ToString(), "M_YMYJ", "str_tb_ymwb");
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_KHH.ToString(), "M_YMYJ", "str_tb_KHH");
|
|
|
- //xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YMYJ.b_ck_ym.ToString(), "M_YMYJ", "b_ck_ym");
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_yjwb.ToString(), "M_YMYJ", "str_tb_yjwb");
|
|
|
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_VDA19.IsVDA19.ToString(), "M_VDA19", "IsVDA19");
|
|
|
@@ -369,8 +347,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//夹杂物占比
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surfaceBig.ToString(), "M_JZWZB", "b_ck_surfaceBig");//夹杂物占比大图
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surfaceBigNumber.ToString(), "M_JZWZB", "b_ck_surfaceBigNumber");//夹杂物数量
|
|
|
@@ -393,15 +369,11 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
{
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial[i].ToString(), "whole", "list_str_MainPriority_Serial", "YS" + i.ToString());
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_SYXT.str_cb_syxt_ljb, "M_SYXT", "str_cb_syxt_ljb");
|
|
|
-
|
|
|
//备注
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.M_DZ.Notes, "M_DZ", "Notes");
|
|
|
|
|
|
-
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.str_MainPriority, "whole", "str_MainPriority");
|
|
|
xmlutil.Write(m_OTSReport_Export.m_mbszclass.str_MainPriorityID, "whole", "str_MainPriorityID");
|
|
|
}
|
|
|
@@ -410,21 +382,16 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
private void SaveTemplateParameters()
|
|
|
{
|
|
|
m_OTSReport_Export.m_mbszclass.M_DZ.Notes = textBox1.Text;
|
|
|
-
|
|
|
string[] after = tb_ysfx_xsys.Text.Split(new char[] { ',' });
|
|
|
m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Clear();
|
|
|
for (int i = 0; i < after.Length; i++)
|
|
|
{
|
|
|
m_OTSReport_Export.m_mbszclass.M_YSFXJG.list_str_tb_ysfx_xsys.Add(after[i]);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
m_OTSReport_Export.m_mbszclass.M_SY.StandardLibraryName = StandardLibraryName;
|
|
|
-
|
|
|
//主要优先显示
|
|
|
m_OTSReport_Export.m_mbszclass.list_str_MainPriority.Clear();
|
|
|
m_OTSReport_Export.m_mbszclass.list_str_MainPriority = list_MainPriority.Copy();
|
|
|
-
|
|
|
|
|
|
//主要优先显示顺序
|
|
|
m_OTSReport_Export.m_mbszclass.list_str_MainPriority_Serial.Clear();
|
|
|
@@ -440,7 +407,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
m_OTSReport_Export.m_mbszclass.M_SY.str_tb_Surveyor = tbSurveyor.Text;
|
|
|
m_OTSReport_Export.m_mbszclass.M_SY.str_tb_CKBZ = tb_CKBZ.Text;
|
|
|
m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_yjwb = tb_yjwb.Text;
|
|
|
- //ResultFile resfile = m_OTSReport_Export.m_ReportApp.m_rstDataMgr.ResultFilesList[m_OTSReport_Export.m_ReportApp.m_rstDataMgr.getSelectedIndex()];
|
|
|
m_OTSReport_Export.m_mbszclass.M_SY.str_tb_djsb = tb_djsb.Text;
|
|
|
m_OTSReport_Export.m_mbszclass.M_SY.str_tb_npsb = tb_npsb.Text;
|
|
|
//VDA19
|
|
|
@@ -450,7 +416,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
comboBox2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLFXJG.SubdivisionGraphicSelection;
|
|
|
m_OTSReport_Export.m_mbszclass.M_KLFXJG.SubdivisionGraphicSelection = 0;
|
|
|
|
|
|
-
|
|
|
//颗粒分析结果
|
|
|
m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsmk = ck_klcc_xsmk.Checked;
|
|
|
m_OTSReport_Export.m_mbszclass.M_KLFXJG.b_ck_klcc_xsddt = ck_klcc_xsddt.Checked;
|
|
|
@@ -483,22 +448,15 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
|
|
|
//夹杂物占比
|
|
|
m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface = false;//夹杂物占比表
|
|
|
- //m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_chart = false;//夹杂物占比图
|
|
|
//去除信息
|
|
|
m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_qcys = tb_RemoveElements.Text;//去除不要的物质元素
|
|
|
- //m_OTSReport_Export.m_mbszclass.M_KLLBXX.str_kllb_DeleteClass = delete_Class.Text;//去除不要的物质分类
|
|
|
-
|
|
|
-
|
|
|
|
|
|
m_OTSReport_Export.m_mbszclass.str_MainPriority = textBox_zypxss.Text;//清洁度显示
|
|
|
m_OTSReport_Export.m_mbszclass.str_MainPriorityID = RuleFormationID;
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private void LoadControls()
|
|
|
{
|
|
|
-
|
|
|
//首页
|
|
|
tb_ZBT.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_ZBT;
|
|
|
tb_FBT.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_FBT;
|
|
|
@@ -508,7 +466,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
tbSurveyor.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_Surveyor;
|
|
|
tb_CKBZ.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_CKBZ;
|
|
|
ck_ypsm.Checked = m_OTSReport_Export.m_mbszclass.M_SY.b_ck_ypsm;
|
|
|
- //ck_ym.Checked = m_OTSReport_Export.m_mbszclass.M_YMYJ.b_ck_ym;
|
|
|
tb_yjwb.Text = m_OTSReport_Export.m_mbszclass.M_YMYJ.str_tb_yjwb;
|
|
|
|
|
|
tb_djsb.Text = m_OTSReport_Export.m_mbszclass.M_SY.str_tb_djsb;
|
|
|
@@ -525,6 +482,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
//是否显示大分类
|
|
|
checkBox1.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surfaceBig;//大分类占比表
|
|
|
checkBox3.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surfaceBigNumber;//大分类占比表
|
|
|
+
|
|
|
checkBox4.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surfaceBigArea;//大分类占比表
|
|
|
|
|
|
checkBox2.Checked = m_OTSReport_Export.m_mbszclass.M_JZWZB.b_ck_surface;//夹杂物占比表
|
|
|
@@ -541,11 +499,9 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
comboBox_p1.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p1;
|
|
|
comboBox_p2.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p2;
|
|
|
comboBox_p3.SelectedIndex = m_OTSReport_Export.m_mbszclass.M_KLLBXX.index_cb_kllb_sort_p3;
|
|
|
-
|
|
|
|
|
|
numericMin.Text = m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_int_kllb_number.ToString();
|
|
|
|
|
|
-
|
|
|
textBox1.Text = m_OTSReport_Export.m_mbszclass.M_DZ.Notes;
|
|
|
|
|
|
LoadingIcon();
|
|
|
@@ -578,8 +534,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
pictureBox7.Image = (Image)decoupledImage.Clone();
|
|
|
decoupledImage.Dispose();
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
public static Bitmap DecoupleImageFromFile(string imagePath)
|
|
|
{
|
|
|
@@ -603,33 +557,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/// <summary>
|
|
|
///绑定下拉框,指定绑定的位置
|
|
|
/// </summary>
|
|
|
@@ -715,7 +642,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
//再对选择的元素进行显示
|
|
|
in_tb.Text = str_xsys;
|
|
|
}
|
|
|
-
|
|
|
#endregion
|
|
|
|
|
|
#region 相关控件事件
|
|
|
@@ -729,7 +655,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
-
|
|
|
private void button5_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
SetPeriodicTableControl(tb_RemoveElements, m_OTSReport_Export.m_mbszclass.M_KLLBXX.list_str_kllb_qcys);
|
|
|
@@ -774,7 +699,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// 复制图片指定路径
|
|
|
/// </summary>
|
|
|
@@ -886,7 +810,6 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
ruleGroupSelector.ShowDialog();
|
|
|
m_OTSReport_Export.m_mbszclass.RuleGroup = ruleGroupSelector.dt.Copy();
|
|
|
m_OTSReport_Export.m_mbszclass.List_data = ruleGroupSelector.List_RuleTable.Copy();
|
|
|
-
|
|
|
UpdateRuleSelectionDisplay();
|
|
|
}
|
|
|
private void UpdateRuleSelectionDisplay()
|
|
|
@@ -962,130 +885,7 @@ namespace OTSIncAReportApp.OTSTemplateDesigner
|
|
|
return List_data;
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 获得颗粒类别
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- private DataTable ObtainParticleCategory(OTSReport_Export m_otsreport_export)
|
|
|
- {
|
|
|
- DataTable dataTable = new DataTable();
|
|
|
- dataTable.Columns.Add("GroupId");
|
|
|
- dataTable.Columns.Add("GroupName");
|
|
|
- dataTable.Columns.Add("inoId");
|
|
|
- dataTable.Columns.Add("display");
|
|
|
- DataTable get_dt = SelectStandardLibraryGrouping(StandardLibraryAddress);
|
|
|
- DataRow[] dataRow = get_dt.Select("", "iorder ASC");
|
|
|
- int shul = 0;
|
|
|
- string DefaultGroupId = "";
|
|
|
- foreach (DataRow row in dataRow)
|
|
|
- {
|
|
|
- if (row.ItemArray[1].ToString() != "Default")
|
|
|
- {
|
|
|
- DataRow data = dataTable.NewRow();
|
|
|
- data["inoId"] = shul;
|
|
|
- data["GroupId"] = row.ItemArray[0].ToString();
|
|
|
- data["GroupName"] = row.ItemArray[1].ToString();
|
|
|
- data["display"] = "1";
|
|
|
- dataTable.Rows.Add(data);
|
|
|
- shul++;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- DefaultGroupId = row.ItemArray[0].ToString();
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- DataRow data2 = dataTable.NewRow();
|
|
|
- data2["inoId"] = shul;
|
|
|
- data2["GroupId"] = DefaultGroupId;
|
|
|
- data2["GroupName"] = "Default";
|
|
|
- data2["display"] = "1";
|
|
|
- dataTable.Rows.Add(data2);
|
|
|
- return dataTable;
|
|
|
- }
|
|
|
- private DataTable SelectStandardLibraryGrouping(string a_SelectedIndex)
|
|
|
- {
|
|
|
- DataTable dt_stl = new DataTable();
|
|
|
- SqLiteHelper sh = new SqLiteHelper("data source='" + a_SelectedIndex + "'");
|
|
|
- dt_stl = sh.ExecuteQuery("select * from STDGroups");
|
|
|
- return dt_stl;
|
|
|
- }
|
|
|
-
|
|
|
- ///// <summary>
|
|
|
- ///// 获得颗粒类别
|
|
|
- ///// </summary>
|
|
|
- ///// <returns></returns>
|
|
|
- //private DataTable ObtainParticleCategory_start(OTSReport_Export m_otsreport_export)
|
|
|
- //{
|
|
|
- // DataTable dataTable = new DataTable();
|
|
|
- // dataTable.Columns.Add("GroupId");
|
|
|
- // dataTable.Columns.Add("GroupName");
|
|
|
- // dataTable.Columns.Add("inoId");
|
|
|
- // dataTable.Columns.Add("display");
|
|
|
- // DataTable get_dt = SelectStandardLibraryGrouping(StandardLibraryAddress);
|
|
|
- // DataRow[] dataRow = get_dt.Select("", "iorder ASC");
|
|
|
- // int shul = 0;
|
|
|
- // string DefaultGroupId = "";
|
|
|
- // foreach (DataRow row in dataRow)
|
|
|
- // {
|
|
|
- // if (row.ItemArray[1].ToString() != "Default")
|
|
|
- // {
|
|
|
- // DataRow data = dataTable.NewRow();
|
|
|
- // data["inoId"] = shul;
|
|
|
- // data["GroupId"] = row.ItemArray[0].ToString();
|
|
|
- // data["GroupName"] = row.ItemArray[1].ToString();
|
|
|
- // data["display"] = "0";
|
|
|
- // dataTable.Rows.Add(data);
|
|
|
- // shul++;
|
|
|
- // }
|
|
|
- // else
|
|
|
- // {
|
|
|
- // DefaultGroupId = row.ItemArray[0].ToString();
|
|
|
-
|
|
|
- // }
|
|
|
- // }
|
|
|
- // DataRow data2 = dataTable.NewRow();
|
|
|
- // data2["inoId"] = shul;
|
|
|
- // data2["GroupId"] = DefaultGroupId;
|
|
|
- // data2["GroupName"] = "Default";
|
|
|
- // data2["display"] = "0";
|
|
|
- // dataTable.Rows.Add(data2);
|
|
|
- // return dataTable;
|
|
|
- //}
|
|
|
- ///// <summary>
|
|
|
- ///// 获取规则数据
|
|
|
- ///// </summary>
|
|
|
- ///// <param name="basicData"></param>
|
|
|
- ///// <returns></returns>
|
|
|
- //public List<DataTable> ObtainRuleData_start(DataTable strings, string a_SelectedIndex)
|
|
|
- //{
|
|
|
- // DataTable dt_stl = new DataTable();
|
|
|
- // SqLiteHelper sh = new SqLiteHelper("data source='" + a_SelectedIndex + "'");
|
|
|
- // dt_stl = sh.ExecuteQuery("select * from ClassifySTD");
|
|
|
- // dt_stl.Columns.Add("display");
|
|
|
- // List<DataTable> List_data = new List<DataTable>();
|
|
|
- // for (int i = 0; i < strings.Rows.Count; i++)
|
|
|
- // {
|
|
|
- // DataTable table = dt_stl.Clone();
|
|
|
- // table.TableName = strings.Rows[i]["GroupId"].ToString();
|
|
|
- // for (int a = 0; a < dt_stl.Rows.Count; a++)
|
|
|
- // {
|
|
|
- // if (strings.Rows[i]["GroupId"].ToString() == dt_stl.Rows[a]["GroupId"].ToString())
|
|
|
- // {
|
|
|
- // dt_stl.Rows[a]["display"] = 0;
|
|
|
- // table.Rows.Add(dt_stl.Rows[a].ItemArray);
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // DataView dvs = table.DefaultView;
|
|
|
- // dvs.Sort = "ListNum ASC";
|
|
|
- // DataTable TemporaryDataGroup = dvs.ToTable();
|
|
|
- // List_data.Add(TemporaryDataGroup);
|
|
|
- // }
|
|
|
-
|
|
|
- // return List_data;
|
|
|
- //}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
public List<string> GetSizeCalMethodTypeList()
|
|
|
{
|