|
@@ -488,7 +488,10 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
checkBoxColumn.Width = 30;
|
|
|
checkBoxColumn.ReadOnly = false;
|
|
|
dgV_SimilarParticles.Columns.Insert(0, checkBoxColumn);
|
|
|
- dgV_SimilarParticles.Rows[0].Cells[2].Value = _RenameInfo[1];
|
|
|
+ if (_RenameInfo != null)
|
|
|
+ {
|
|
|
+ dgV_SimilarParticles.Rows[0].Cells[2].Value = _RenameInfo[1];
|
|
|
+ }
|
|
|
dgV_SimilarParticles.Visible = true;
|
|
|
}
|
|
|
|
|
@@ -534,6 +537,37 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
|
|
|
private void btn_OK_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
+ if (_RenameInfo == null)
|
|
|
+ {
|
|
|
+ string CategoryName = "";
|
|
|
+ //循环选中颗粒
|
|
|
+ DataGridViewRow dgvr = dgV_SimilarParticles.Rows[0];
|
|
|
+ CategoryName = dgvr.Cells[2].Value.ToString();
|
|
|
+ string TypeId = "";
|
|
|
+ string TypeName = "";
|
|
|
+ string TypeColor = "";
|
|
|
+ string GroupName = "";
|
|
|
+ DataTable da = _particlesGridDevidePage.Particledata.GetParticleListForParticlSize("area", "");
|
|
|
+ ModifyCategoryForm modifyCategoryForm = new ModifyCategoryForm(da, CategoryName);
|
|
|
+ DialogResult result = modifyCategoryForm.ShowDialog();
|
|
|
+ if (modifyCategoryForm.DoYouWantToModifyIt)
|
|
|
+ {
|
|
|
+ TypeId = modifyCategoryForm.OutTypeAndName[0];
|
|
|
+ TypeName = modifyCategoryForm.OutTypeAndName[1];
|
|
|
+ TypeColor = modifyCategoryForm.OutTypeAndName[2];
|
|
|
+ GroupName = modifyCategoryForm.OutTypeAndName[3];
|
|
|
+
|
|
|
+ _RenameInfo = new List<string>();
|
|
|
+ _RenameInfo.Add(TypeId);
|
|
|
+ _RenameInfo.Add(TypeName);
|
|
|
+ _RenameInfo.Add(TypeColor);
|
|
|
+ _RenameInfo.Add(GroupName);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
List<KeyValuePair<string, SQLiteParameter[]>> cmdlist = new List<KeyValuePair<string, SQLiteParameter[]>>();
|
|
|
foreach (DataGridViewRow row in dgV_SimilarParticles.Rows)
|
|
|
{
|
|
@@ -780,6 +814,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
private void dgV_SimilarParticles_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
|
|
|
{
|
|
|
var SelectRows = dgV_SimilarParticles.SelectedRows;
|
|
@@ -801,10 +836,70 @@ namespace OTSIncAReportApp._1_UI.Control_Grids.ParticlesGridDevidePage
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- private void dgV_SimilarParticles_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
|
|
|
+ public ListOfSimilarParticles(OTSIncAReportGrids.ParticlesGridDevidePage particlesGridDevidePage, uint[] SelXray, int classifyid)
|
|
|
{
|
|
|
+ InitializeComponent();
|
|
|
+ _particlesGridDevidePage = particlesGridDevidePage;
|
|
|
+ SelXrayclr.SetXrayData(SelXray);
|
|
|
+ table = particlesGridDevidePage.table;
|
|
|
+ _classifyid = classifyid;
|
|
|
+
|
|
|
+ m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
+
|
|
|
+
|
|
|
+ //设置窗体的双缓冲,以保证大数据时拖动不卡
|
|
|
+ this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.AllPaintingInWmPaint, true);
|
|
|
+ this.UpdateStyles();
|
|
|
+ //利用反射设置DataGridView的双缓冲
|
|
|
+ Type dgvType = this.dgV_SimilarParticles.GetType();
|
|
|
+ PropertyInfo pi = dgvType.GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic);
|
|
|
+ pi.SetValue(this.dgV_SimilarParticles, true, null);
|
|
|
|
|
|
+ this.control_XRayTable1 = new OTSIncAReportGraph.Controls.Control_XRayTable(null);
|
|
|
+ this.control_XRayTable1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(180)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
|
|
|
+ this.control_XRayTable1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
|
|
+ this.control_XRayTable1.GBInfoStr = "";
|
|
|
+ this.control_XRayTable1.GoodChineseName = "";
|
|
|
+ this.control_XRayTable1.MaterialName = "";
|
|
|
+ this.control_XRayTable1.Location = new System.Drawing.Point(0, 400);
|
|
|
+ this.control_XRayTable1.Name = "control_XRayTable1";
|
|
|
+ this.control_XRayTable1.ShowAnalysisXray = true;
|
|
|
+ this.control_XRayTable1.ShowSearchXray = false;
|
|
|
+ this.control_XRayTable1.Size = new System.Drawing.Size(1004, 200);
|
|
|
+ this.control_XRayTable1.STDName = "";
|
|
|
+ this.control_XRayTable1.Visible = false;
|
|
|
+ this.control_XRayTable1.label_close.Visible = true;
|
|
|
+ panel1.Controls.Add(this.control_XRayTable1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ private void 从此颗粒之下取消选择ToolStripMenuItem_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ var SelectRows = dgV_SimilarParticles.SelectedRows;
|
|
|
+ if (SelectRows.Count != 0)
|
|
|
+ {
|
|
|
+ DataGridViewRow dgvr = SelectRows[0];
|
|
|
+ for (int i = dgvr.Index + 1; i < dgV_SimilarParticles.Rows.Count; i++)
|
|
|
+ {
|
|
|
+ dgV_SimilarParticles.Rows[i].Cells[0].Value=false;
|
|
|
+ }
|
|
|
+ if(dgvr.Index + 1!= dgV_SimilarParticles.Rows.Count)
|
|
|
+ {
|
|
|
+ this.cBx_All.CheckedChanged -= new System.EventHandler(this.cBx_All_CheckedChanged);
|
|
|
+ cBx_All.Checked=false;
|
|
|
+ this.cBx_All.CheckedChanged += new System.EventHandler(this.cBx_All_CheckedChanged);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|