|
@@ -1760,35 +1760,58 @@ namespace OTSIncAReportGrids
|
|
|
strings.Add(GroupName);
|
|
|
strings.Add(GroupID);
|
|
|
strings.Add(GroupColor);
|
|
|
- DialogResult result2 = MessageBox.Show("是否寻找相似颗粒并重命名?", "Tip", MessageBoxButtons.YesNo);
|
|
|
- if (result2 == DialogResult.Yes)
|
|
|
+ if (dgV_ParticlesDevidePage.SelectedRows.Count == 1)
|
|
|
{
|
|
|
- int sel = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
|
|
|
- if (sel == (int)SelItem.MergeParticles)
|
|
|
+ DialogResult result2 = MessageBox.Show("是否寻找相似颗粒并重命名?", "Tip", MessageBoxButtons.YesNo);
|
|
|
+ if (result2 == DialogResult.Yes)
|
|
|
{
|
|
|
- return;
|
|
|
- }
|
|
|
- var SelectRows = dgV_ParticlesDevidePage.SelectedRows;
|
|
|
- uint[] Search_xray = new uint[2000];
|
|
|
- int classifyid = -1;
|
|
|
- if (SelectRows.Count != 0)
|
|
|
- {
|
|
|
- if (SelectRows.Count == 1)
|
|
|
+ int sel = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.PARTICE_LIST);
|
|
|
+ if (sel == (int)SelItem.MergeParticles)
|
|
|
{
|
|
|
- DataGridViewRow dgvr = SelectRows[0];
|
|
|
- Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
|
|
|
- List<string> list_str = (List<string>)ls_bp.Tag;
|
|
|
- classifyid = Convert.ToInt32(list_str[2]);
|
|
|
- uint[] Analysis_xray = new uint[2000];
|
|
|
- int i_xray_id = 0;
|
|
|
- List<Element> list_celementchemistryclr = new List<Element>();
|
|
|
- ReportFun.GetXrayByParticleTagIDAndFieldID_ForDrawDistrbutionImageAndBSE(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray, out i_xray_id, out list_celementchemistryclr);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var SelectRows = dgV_ParticlesDevidePage.SelectedRows;
|
|
|
+ uint[] Search_xray = new uint[2000];
|
|
|
+ int classifyid = -1;
|
|
|
+ if (SelectRows.Count != 0)
|
|
|
+ {
|
|
|
+ if (SelectRows.Count == 1)
|
|
|
+ {
|
|
|
+ DataGridViewRow dgvr = SelectRows[0];
|
|
|
+ Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
|
|
|
+ List<string> list_str = (List<string>)ls_bp.Tag;
|
|
|
+ classifyid = Convert.ToInt32(list_str[2]);
|
|
|
+ uint[] Analysis_xray = new uint[2000];
|
|
|
+ int i_xray_id = 0;
|
|
|
+ List<Element> list_celementchemistryclr = new List<Element>();
|
|
|
+ ReportFun.GetXrayByParticleTagIDAndFieldID_ForDrawDistrbutionImageAndBSE(Convert.ToInt32(dgvr.Cells["particleId"].Value), Convert.ToInt32(dgvr.Cells["fieldid"].Value), out Search_xray, out Analysis_xray, out i_xray_id, out list_celementchemistryclr);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ListOfSimilarParticles Form_listOfSimilarParticles = new ListOfSimilarParticles(this, Search_xray, classifyid, strings, m_ReportApp);
|
|
|
+ DialogResult result3 = Form_listOfSimilarParticles.ShowDialog();
|
|
|
+ if (result3 == DialogResult.OK)
|
|
|
+ {
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ List<KeyValuePair<string, SQLiteParameter[]>> cmdlist = new List<KeyValuePair<string, SQLiteParameter[]>>();
|
|
|
+ for (int i = 0; i < dgV_ParticlesDevidePage.SelectedRows.Count; i++)
|
|
|
+ {
|
|
|
+ DataGridViewRow dgvr = dgV_ParticlesDevidePage.SelectedRows[i];
|
|
|
+ dgvr.Cells[1].Value = TypeName;
|
|
|
+ Bitmap ls_bp = (Bitmap)dgvr.Cells[2].Value;
|
|
|
+ List<string> list_str = (List<string>)ls_bp.Tag;
|
|
|
+ int i_ls_fieldid = Convert.ToInt32(list_str[0]);
|
|
|
+ int i_ls_particleid = Convert.ToInt32(list_str[1]);
|
|
|
+ List<int> ints = new List<int>();
|
|
|
+ ints.Add(i_ls_fieldid);
|
|
|
+ ints.Add(i_ls_particleid);
|
|
|
+
|
|
|
+ var cmd = Particledata.GetUpdataAIncACmd(ints, strings);
|
|
|
+ cmdlist.Add(cmd);
|
|
|
+ }
|
|
|
+ Particledata.ExecuteNonQueryBatch(cmdlist);
|
|
|
}
|
|
|
- }
|
|
|
- ListOfSimilarParticles Form_listOfSimilarParticles = new ListOfSimilarParticles(this, Search_xray, classifyid,strings, m_ReportApp);
|
|
|
- DialogResult result3=Form_listOfSimilarParticles.ShowDialog();
|
|
|
- if(result3== DialogResult.OK)
|
|
|
- {
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -1804,7 +1827,6 @@ namespace OTSIncAReportGrids
|
|
|
List<int> ints = new List<int>();
|
|
|
ints.Add(i_ls_fieldid);
|
|
|
ints.Add(i_ls_particleid);
|
|
|
-
|
|
|
var cmd = Particledata.GetUpdataAIncACmd(ints, strings);
|
|
|
cmdlist.Add(cmd);
|
|
|
}
|
|
@@ -1822,15 +1844,19 @@ namespace OTSIncAReportGrids
|
|
|
List<string> list_str = (List<string>)ls_bp.Tag;
|
|
|
int i_ls_fieldid = Convert.ToInt32(list_str[0]);
|
|
|
int i_ls_particleid = Convert.ToInt32(list_str[1]);
|
|
|
+
|
|
|
+
|
|
|
List<int> ints = new List<int>();
|
|
|
ints.Add(i_ls_fieldid);
|
|
|
ints.Add(i_ls_particleid);
|
|
|
-
|
|
|
var cmd = Particledata.GetUpdataAIncACmd(ints, strings);
|
|
|
cmdlist.Add(cmd);
|
|
|
}
|
|
|
Particledata.ExecuteNonQueryBatch(cmdlist);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
UpdateTable();
|
|
|
lnkFirst_Click(null, null);
|
|
|
SetDataGridViewStyle();
|
|
@@ -2433,6 +2459,7 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
+ ToolStripMenuItem_SimilarityReclassification.Enabled = false;
|
|
|
var SelectRows = dgV_ParticlesDevidePage.SelectedRows;
|
|
|
if (SelectRows.Count != 0)
|
|
|
{
|
|
@@ -2520,6 +2547,7 @@ namespace OTSIncAReportGrids
|
|
|
{
|
|
|
control_XRayTable1.Visible = false;
|
|
|
}
|
|
|
+ ToolStripMenuItem_SimilarityReclassification.Enabled = true;
|
|
|
}
|
|
|
SaveParticleslist_select();
|
|
|
}
|