|
@@ -1054,20 +1054,20 @@ namespace OTSIncAReportGraph.Controls
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
foreach (DisplayParticle dp in m_list_allDPart)
|
|
|
{
|
|
|
- if (dp.GetPaintState() != PaintState.NOPAINT )
|
|
|
+ if (dp.GetPaintState() != PaintState.NOPAINT)
|
|
|
{
|
|
|
PointF[] lspointf = ls_gpath.PathPoints;
|
|
|
-
|
|
|
- if (true == imageDisHelper.WhetherInRange(m_SelectTool.Rect, lspointf,new Point((int)dp.GetShowRect().X,(int)dp.GetShowRect().Y)))
|
|
|
- {
|
|
|
-
|
|
|
- dp.IsSelect =!dp.IsSelect ;// set the particle to the oposite selected state
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ if (true == imageDisHelper.WhetherInRange(m_SelectTool.Rect, lspointf, new Point((int)dp.GetShowRect().X, (int)dp.GetShowRect().Y)))
|
|
|
+ {
|
|
|
+ //dp.IsSelect = !dp.IsSelect;// set the particle to the oposite selected state
|
|
|
+ dp.IsSelect = true;//框选不应反选!
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1151,6 +1151,8 @@ namespace OTSIncAReportGraph.Controls
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ SetParticlesSelected();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1245,10 +1247,16 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
|
|
|
private void ToolStripMenuItem_selected_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ frmReportApp.selectedRegion = m_SelectTool.Rect;
|
|
|
+ SetParticlesSelected();
|
|
|
+ }
|
|
|
+
|
|
|
+ void SetParticlesSelected()
|
|
|
{
|
|
|
List<DisplayParticle> selectedParts = new List<DisplayParticle>();
|
|
|
List<Particle> Particles = new List<Particle>();
|
|
|
- foreach (var dp in m_list_allDPart)
|
|
|
+ foreach (var dp in m_list_allDPart)
|
|
|
{
|
|
|
if (dp.IsSelect)
|
|
|
{
|
|
@@ -1259,9 +1267,6 @@ namespace OTSIncAReportGraph.Controls
|
|
|
Particles.Add(particle);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- frmReportApp.selectedRegion = m_SelectTool.Rect;
|
|
|
-
|
|
|
SendSelectParticleListToReportFrame(selectedParts);
|
|
|
}
|
|
|
|
|
@@ -1400,16 +1405,11 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// </summary>
|
|
|
private void SendSelectParticleListToReportFrame(List<DisplayParticle> selectParts)
|
|
|
{
|
|
|
- //先获取分布图中,有哪些颗粒已经被选择上了
|
|
|
+ frmReportApp.selectedParticles.Clear();
|
|
|
foreach (var p in selectParts)
|
|
|
{
|
|
|
- if (!frmReportApp.selectedParticles.ContainsKey(p.guid))
|
|
|
- {
|
|
|
- frmReportApp.selectedParticles.Add(p.guid, p);
|
|
|
- }
|
|
|
-
|
|
|
+ frmReportApp.selectedParticles.Add(p.guid, p);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -1626,9 +1626,9 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// </summary>
|
|
|
public void FullGraphMatch()
|
|
|
{
|
|
|
-
|
|
|
- //全图匹配,首先要判断出来是按宽度来计算缩放,还是按高度来计算缩放
|
|
|
- double thiswidth = this.Width;
|
|
|
+
|
|
|
+ //全图匹配,首先要判断出来是按宽度来计算缩放,还是按高度来计算缩放
|
|
|
+ double thiswidth = this.Width;
|
|
|
double thisheight = this.Height;
|
|
|
double imagewidth = m_backRect.Width;
|
|
|
double imageheight = m_backRect.Height;
|
|
@@ -1992,6 +1992,21 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public void DeletesParticlesSynchronously(List<Particle> list_Part)
|
|
|
+ {
|
|
|
+ foreach (var p in m_list_allDPart)
|
|
|
+ {
|
|
|
+ foreach (var p_Selected in list_Part)
|
|
|
+ {
|
|
|
+ if (p.ParticleId == p_Selected.ParticleId && p.FieldId == p_Selected.FieldId)
|
|
|
+ {
|
|
|
+ p.IsDeleted = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Invalidate();
|
|
|
+ }
|
|
|
|
|
|
private bool DeleteParticlesFromLibrary(int in_clr_tagid, int in_clr_fieldid)
|
|
|
{
|