|
@@ -16,6 +16,7 @@ using System.Linq;
|
|
|
using System.Reflection;
|
|
|
using System.Threading;
|
|
|
using System.Windows.Forms;
|
|
|
+using static OTSDataType.otsdataconst;
|
|
|
using Color = System.Drawing.Color;
|
|
|
|
|
|
namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
@@ -34,8 +35,10 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
private bool m_mythread_state = false;
|
|
|
//底层操作类
|
|
|
OTSReportGridsFun m_OTSIncAReportGridsFun = null;
|
|
|
+ frmReportApp m_ReportApp;
|
|
|
|
|
|
- public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid, List<string> RenameInfo)
|
|
|
+
|
|
|
+ public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid, List<string> RenameInfo,frmReportApp ReportApp)
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
_particlesGridDevidePage = particlesGridDevidePage;
|
|
@@ -43,8 +46,8 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
table = particlesGridDevidePage.table;
|
|
|
_classifyid = classifyid;
|
|
|
_RenameInfo = RenameInfo;
|
|
|
-
|
|
|
- m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
+ m_ReportApp = ReportApp;
|
|
|
+ m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
|
|
|
|
|
|
//设置窗体的双缓冲,以保证大数据时拖动不卡
|
|
@@ -609,46 +612,94 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
DataTable dt_STDGroups = new DataTable();
|
|
|
DataTable dt_ClassifySTD = new DataTable();
|
|
|
DataTable dt_IncAData = new DataTable();
|
|
|
- SqLiteHelper sh_STDGroups = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
|
|
|
- dt_STDGroups = sh_STDGroups.ExecuteQuery("select * from STDGroups");
|
|
|
|
|
|
- SqLiteHelper sh_ClassifySTD = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
|
|
|
- dt_ClassifySTD = sh_ClassifySTD.ExecuteQuery("select * from ClassifySTD");
|
|
|
|
|
|
- dt_ClassifySTD.Columns.Add("GroupName");
|
|
|
- dt_ClassifySTD.Columns.Add("GroupColor");
|
|
|
|
|
|
+ var systype = m_ReportApp.m_RptConfigFile.Systype;
|
|
|
+ if (systype == OTS_SysType_ID.IncA)
|
|
|
+ {
|
|
|
+ dt_ClassifySTD.Columns.Add("STDId");
|
|
|
+ dt_ClassifySTD.Columns.Add("StrName");
|
|
|
+ dt_ClassifySTD.Columns.Add("Color");
|
|
|
+ dt_ClassifySTD.Columns.Add("KeyElementList");
|
|
|
+ dt_ClassifySTD.Columns.Add("SubElementList");
|
|
|
+ dt_ClassifySTD.Columns.Add("UsingImgPropertyList");
|
|
|
+ dt_ClassifySTD.Columns.Add("UsingOtherPropertyList");
|
|
|
+ dt_ClassifySTD.Columns.Add("Expression");
|
|
|
+ dt_ClassifySTD.Columns.Add("Hardness");
|
|
|
+ dt_ClassifySTD.Columns.Add("Density");
|
|
|
+ dt_ClassifySTD.Columns.Add("Electrical_conductivity");
|
|
|
+ dt_ClassifySTD.Columns.Add("BSE");
|
|
|
+ dt_ClassifySTD.Columns.Add("Formula");
|
|
|
+ dt_ClassifySTD.Columns.Add("Element");
|
|
|
+ dt_ClassifySTD.Columns.Add("IfElementAnalysis");
|
|
|
+ dt_ClassifySTD.Columns.Add("ListNum");
|
|
|
+ dt_ClassifySTD.Columns.Add("GroupId");
|
|
|
+ dt_ClassifySTD.Columns.Add("GroupName");
|
|
|
+ dt_ClassifySTD.Columns.Add("GroupColor");
|
|
|
+
|
|
|
+ DataTable da = _particlesGridDevidePage.Particledata.GetParticleListForParticlSizeID("area", "");
|
|
|
+ for (int i = 0; i < da.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ if (Convert.ToInt64(da.Rows[i]["TypeId"]) > 9)
|
|
|
+ {
|
|
|
+ DataRow newRow = dt_ClassifySTD.NewRow();
|
|
|
+ newRow["STDId"] = da.Rows[i]["TypeId"];
|
|
|
+ newRow["StrName"] = da.Rows[i]["TypeName"];
|
|
|
+ newRow["Color"] = da.Rows[i]["TypeColor"];
|
|
|
+ newRow["GroupId"] = da.Rows[i]["GroupId"];
|
|
|
+ newRow["GroupName"] = da.Rows[i]["GroupName"];
|
|
|
+ newRow["GroupColor"] = da.Rows[i]["GroupColor"];
|
|
|
+ dt_ClassifySTD.Rows.Add(newRow);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ SqLiteHelper sh_STDGroups = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
|
|
|
+ dt_STDGroups = sh_STDGroups.ExecuteQuery("select * from STDGroups");
|
|
|
|
|
|
- for (int i = 0; i < dt_ClassifySTD.Rows.Count; i++)
|
|
|
- {
|
|
|
- for (int a = 0; a < dt_STDGroups.Rows.Count; a++)
|
|
|
+ SqLiteHelper sh_ClassifySTD = new SqLiteHelper("data source='" + a_address + "\\" + STDName + ".db" + "'");
|
|
|
+ dt_ClassifySTD = sh_ClassifySTD.ExecuteQuery("select * from ClassifySTD");
|
|
|
+
|
|
|
+ dt_ClassifySTD.Columns.Add("GroupName");
|
|
|
+ dt_ClassifySTD.Columns.Add("GroupColor");
|
|
|
+
|
|
|
+
|
|
|
+ for (int i = 0; i < dt_ClassifySTD.Rows.Count; i++)
|
|
|
{
|
|
|
- if (dt_ClassifySTD.Rows[i]["GroupId"].ToString() == dt_STDGroups.Rows[a]["id"].ToString())
|
|
|
+ for (int a = 0; a < dt_STDGroups.Rows.Count; a++)
|
|
|
{
|
|
|
- dt_ClassifySTD.Rows[i]["GroupName"] = dt_STDGroups.Rows[a]["name"].ToString();
|
|
|
- dt_ClassifySTD.Rows[i]["GroupColor"] = dt_STDGroups.Rows[a]["color"].ToString();
|
|
|
- continue;
|
|
|
+ if (dt_ClassifySTD.Rows[i]["GroupId"].ToString() == dt_STDGroups.Rows[a]["id"].ToString())
|
|
|
+ {
|
|
|
+ dt_ClassifySTD.Rows[i]["GroupName"] = dt_STDGroups.Rows[a]["name"].ToString();
|
|
|
+ dt_ClassifySTD.Rows[i]["GroupColor"] = dt_STDGroups.Rows[a]["color"].ToString();
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- SqLiteHelper sh_Inclusion = new SqLiteHelper("data source='" + a_address + "\\FIELD_FILES\\Inclusion.db" + "'");
|
|
|
- dt_IncAData = sh_Inclusion.ExecuteQuery("select * from IncAData");
|
|
|
- for (int i = 0; i < dt_IncAData.Rows.Count; i++)
|
|
|
- {
|
|
|
- if (Convert.ToInt64(dt_IncAData.Rows[i]["TypeId"]) > 50000)
|
|
|
+ SqLiteHelper sh_Inclusion = new SqLiteHelper("data source='" + a_address + "\\FIELD_FILES\\Inclusion.db" + "'");
|
|
|
+ dt_IncAData = sh_Inclusion.ExecuteQuery("select * from IncAData");
|
|
|
+ for (int i = 0; i < dt_IncAData.Rows.Count; i++)
|
|
|
{
|
|
|
- DataRow newRow = dt_ClassifySTD.NewRow();
|
|
|
- newRow["STDId"] = dt_IncAData.Rows[i]["TypeId"];
|
|
|
- newRow["StrName"] = dt_IncAData.Rows[i]["TypeName"];
|
|
|
- newRow["Color"] = dt_IncAData.Rows[i]["TypeColor"];
|
|
|
- newRow["GroupId"] = dt_IncAData.Rows[i]["GroupId"];
|
|
|
- newRow["GroupName"] = dt_IncAData.Rows[i]["GroupName"];
|
|
|
- newRow["GroupColor"] = dt_IncAData.Rows[i]["GroupColor"];
|
|
|
- dt_ClassifySTD.Rows.Add(newRow);
|
|
|
+ if (Convert.ToInt64(dt_IncAData.Rows[i]["TypeId"]) > 50000)
|
|
|
+ {
|
|
|
+ DataRow newRow = dt_ClassifySTD.NewRow();
|
|
|
+ newRow["STDId"] = dt_IncAData.Rows[i]["TypeId"];
|
|
|
+ newRow["StrName"] = dt_IncAData.Rows[i]["TypeName"];
|
|
|
+ newRow["Color"] = dt_IncAData.Rows[i]["TypeColor"];
|
|
|
+ newRow["GroupId"] = dt_IncAData.Rows[i]["GroupId"];
|
|
|
+ newRow["GroupName"] = dt_IncAData.Rows[i]["GroupName"];
|
|
|
+ newRow["GroupColor"] = dt_IncAData.Rows[i]["GroupColor"];
|
|
|
+ dt_ClassifySTD.Rows.Add(newRow);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return dt_ClassifySTD;
|
|
|
}
|
|
|
|
|
@@ -901,15 +952,15 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid)
|
|
|
+ public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid, frmReportApp ReportApp)
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
_particlesGridDevidePage = particlesGridDevidePage;
|
|
|
SelXrayclr.SetXrayData(SelXray);
|
|
|
table = particlesGridDevidePage.table;
|
|
|
_classifyid = classifyid;
|
|
|
-
|
|
|
- m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
+ m_ReportApp = ReportApp;
|
|
|
+ m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
|
|
|
|
|
|
//设置窗体的双缓冲,以保证大数据时拖动不卡
|