|
|
@@ -1,4 +1,5 @@
|
|
|
using NLog;
|
|
|
+using OTSIncAReportApp;
|
|
|
using OTSIncAReportApp.DataOperation.DataAccess;
|
|
|
using OTSIncAReportApp.DataOperation.Model;
|
|
|
using OTSIncAReportApp.OTSSampleReportInfo;
|
|
|
@@ -36,6 +37,14 @@ namespace OTSIncAReportGraph.Controls
|
|
|
//进行选择的矩形范围
|
|
|
public RectangleF Rect ;
|
|
|
|
|
|
+ }
|
|
|
+ public enum RightButtonMenu
|
|
|
+ {
|
|
|
+ Include=0,
|
|
|
+
|
|
|
+ MoveSEMToParticle=1,
|
|
|
+ CopyImage=2
|
|
|
+
|
|
|
}
|
|
|
public partial class Control_DrawDistrbutionImageAndBSE : UserControl
|
|
|
{
|
|
|
@@ -142,13 +151,13 @@ namespace OTSIncAReportGraph.Controls
|
|
|
private Thread m_mythread;
|
|
|
|
|
|
//记录线程是否已经运行完成的状态
|
|
|
- private bool m_mythread_state = false;
|
|
|
+ //private bool m_mythread_state = false;
|
|
|
|
|
|
private Color m_ColorNotContent = Color.SkyBlue;
|
|
|
|
|
|
//读取背景原图的名称和图片
|
|
|
- private List<Image> originalImages = new List<Image>();
|
|
|
- private List<string> originalImageNames = new List<string>();
|
|
|
+ private Dictionary<string, Image> originalImages = new Dictionary<string, Image>();
|
|
|
+ //private List<string> originalImageNames = new List<string>();
|
|
|
//背景使用原图
|
|
|
private bool OriginalBackground = false;
|
|
|
|
|
|
@@ -211,7 +220,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
m_frm_userprogress = new Frm_UserProgress();
|
|
|
|
|
|
- m_mythread_state = false;
|
|
|
+ //m_mythread_state = false;
|
|
|
|
|
|
m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
|
|
|
@@ -466,50 +475,8 @@ namespace OTSIncAReportGraph.Controls
|
|
|
ReportFun.m_field_count = fieldlist.Count;
|
|
|
ReportFun.m_particle_count = m_list_allDPart.Count;
|
|
|
}
|
|
|
- /// <summary>
|
|
|
- /// 根据颗粒排序图获取已经选择上的颗粒,返回被选择上的颗粒的列表
|
|
|
- /// </summary>
|
|
|
- /// <returns></returns>
|
|
|
- public List<Particle> GetSelectedParticleList_ForDrawDistrbutionImageAndBSE()
|
|
|
- {
|
|
|
- List<Particle> list_particle = new List<Particle>();
|
|
|
-
|
|
|
- //防止为空校验判断
|
|
|
- if (resultFile.List_OTSField == null)
|
|
|
- return list_particle;
|
|
|
-
|
|
|
- //先取出,所有被选择的dparticle列表的
|
|
|
- List<DisplayParticle> list_selectedDp = new List<DisplayParticle>();
|
|
|
- foreach (DisplayParticle ls_dp in m_list_allDPart)
|
|
|
- {
|
|
|
- if (ls_dp.IsSelect)
|
|
|
- {
|
|
|
- list_selectedDp.Add(ls_dp);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //并开始查找包含tagid和fieldid的cotsparticle的对象,保存到list当中
|
|
|
- for (int i = 0; i < list_selectedDp.Count(); i++)
|
|
|
- {
|
|
|
- for (int j = 0; j < resultFile.List_OTSField.Count(); j++)
|
|
|
- {
|
|
|
- //先获取该field中的所有particle
|
|
|
- List<Particle> list_cotsparticleclr = new List<Particle>();
|
|
|
- list_cotsparticleclr =resultFile.List_OTSField[j].ParticleList;
|
|
|
-
|
|
|
- for (int k = 0; k < list_cotsparticleclr.Count(); k++)
|
|
|
- {
|
|
|
- if (list_cotsparticleclr[k].ParticleId == list_selectedDp[i].ParticleId
|
|
|
- && list_cotsparticleclr[k].FieldId == list_selectedDp[i].FieldId)
|
|
|
- {
|
|
|
- list_particle.Add(list_cotsparticleclr[k]);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return list_particle;
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 分布图和BSE图中,从底层获取相关结果后,重新组织显示
|
|
|
/// </summary>
|
|
|
@@ -520,7 +487,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
bool stdIdconditionResult;
|
|
|
string stdId = "";
|
|
|
int stdIdIndex = 0;
|
|
|
- //find the std condition
|
|
|
+ //find the stdId condition
|
|
|
var STDIdItm = sourceGridData.ConditionItemList.Find(s => s.iItemId == OTS_REPORT_PROP_GRID_ITEMS.STD_ID);
|
|
|
if (STDIdItm != null)
|
|
|
{
|
|
|
@@ -608,11 +575,11 @@ namespace OTSIncAReportGraph.Controls
|
|
|
}
|
|
|
if (stdIdconditionResult && sizeconditionResult)
|
|
|
{
|
|
|
- ls_dp.DisplayState = DisplayState.DISPLAY;
|
|
|
+ ls_dp.SetDisplayState(DisplayState.DISPLAY);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ls_dp.DisplayState = DisplayState.NODISPLAY;
|
|
|
+ ls_dp.SetDisplayState(DisplayState.NODISPLAY);
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -917,27 +884,40 @@ namespace OTSIncAReportGraph.Controls
|
|
|
m_SelectTool.StartPoint = e.Location;
|
|
|
}
|
|
|
else
|
|
|
- {
|
|
|
-
|
|
|
+ {
|
|
|
+ bool ifClickOnParticle=false;
|
|
|
foreach (BaseObject item in m_list_allDPart)
|
|
|
{
|
|
|
var dp = (DisplayParticle)item;
|
|
|
- if (dp.Rect.Left > -120 && dp.Rect.Right < this.Width + 120 && dp.Rect.Top > -120 && dp.Rect.Bottom < this.Height + 120)
|
|
|
+ if (ReportFun.WhetherInRange(dp, e.Location))
|
|
|
{
|
|
|
- item.IsDragging = true;
|
|
|
-
|
|
|
+ dp.IsSelect = !dp.IsSelect;
|
|
|
+ ifClickOnParticle = true;
|
|
|
+ break;
|
|
|
}
|
|
|
- item.DraggingPoint = e.Location;
|
|
|
+ }
|
|
|
+ if (ifClickOnParticle == false)
|
|
|
+ {
|
|
|
+ foreach (BaseObject item in m_list_allDPart)
|
|
|
+ {
|
|
|
+ var dp = (DisplayParticle)item;
|
|
|
+ if (dp.Rect.Left > -120 && dp.Rect.Right < this.Width + 120 && dp.Rect.Top > -120 && dp.Rect.Bottom < this.Height + 120)
|
|
|
+ {
|
|
|
+ item.IsDragging = true;
|
|
|
+
|
|
|
+ }
|
|
|
+ item.DraggingPoint = e.Location;
|
|
|
|
|
|
|
|
|
+ }
|
|
|
+ foreach (DisplayField item in m_list_allDfield)
|
|
|
+ {
|
|
|
+ item.IsDragging = true;
|
|
|
+ item.DraggingPoint = e.Location;
|
|
|
+ }
|
|
|
+ m_isDrag = true;
|
|
|
+ m_beforedrag_pointf = e.Location;
|
|
|
}
|
|
|
- foreach (DisplayField item in m_list_allDfield)
|
|
|
- {
|
|
|
- item.IsDragging = true;
|
|
|
- item.DraggingPoint = e.Location;
|
|
|
- }
|
|
|
- m_isDrag = true;
|
|
|
- m_beforedrag_pointf = e.Location;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -1120,19 +1100,12 @@ namespace OTSIncAReportGraph.Controls
|
|
|
if (e.Button == MouseButtons.Left)
|
|
|
{
|
|
|
this.Cursor = Cursors.Default;
|
|
|
- //还原多选变量
|
|
|
+
|
|
|
if (m_SelectTool.IsSelecting)
|
|
|
{
|
|
|
|
|
|
- foreach (DisplayParticle dp in m_list_allDPart)
|
|
|
- {
|
|
|
- if (dp.IsSelect)
|
|
|
- {
|
|
|
- dp.SetPaintState(PaintState.NORMALPAINT);
|
|
|
- }
|
|
|
- }
|
|
|
- //然后在这里判断都有哪些颗粒所有的point点,是否在选取的图形graphicsPath闭合路径中
|
|
|
- //首先先将选取的图形填充成graphicsPath
|
|
|
+
|
|
|
+
|
|
|
if (m_SelectTool.Rect.Width > 0 && m_SelectTool.Rect.Height > 0)
|
|
|
{
|
|
|
GraphicsPath ls_gpath = new GraphicsPath();
|
|
|
@@ -1152,14 +1125,14 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
foreach (DisplayParticle dp in m_list_allDPart)
|
|
|
{
|
|
|
- if (dp.GetPaintState() != PaintState.NOPAINT && !dp.IsDeleted)//不显示的和删除状态的不让进行选择
|
|
|
+ if (dp.GetPaintState() != PaintState.NOPAINT )
|
|
|
{
|
|
|
PointF[] lspointf = ls_gpath.PathPoints;
|
|
|
|
|
|
if (true == ReportFun.WhetherInRange(m_SelectTool.Rect, lspointf,new Point((int)dp.Rect.X,(int)dp.Rect.Y)))
|
|
|
{
|
|
|
- //选择到了该路径,那么就选取该图像
|
|
|
- dp.IsSelect = true;
|
|
|
+
|
|
|
+ dp.IsSelect =!dp.IsSelect ;// set the particle to the opsite selected state
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -1170,10 +1143,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
m_SelectTool.Rect.Width = 0;
|
|
|
m_SelectTool.Rect.Height = 0;
|
|
|
m_SelectTool.IsSelecting = false;
|
|
|
-
|
|
|
|
|
|
- //将多选选择上的颗粒发送给报告框架
|
|
|
- SelectParticleListSendToReportFrame();
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -1221,92 +1191,58 @@ namespace OTSIncAReportGraph.Controls
|
|
|
m_isDrag = false;
|
|
|
|
|
|
}
|
|
|
- else
|
|
|
- { //在颗粒上点击,则对该颗粒附加显示x-ray的状态,同时将其它颗粒上显示x-ray的状态全部去掉。
|
|
|
- foreach (DisplayParticle dp in m_list_allDPart)
|
|
|
- {
|
|
|
- PointF[] lspointf = dp.GPath.PathPoints;
|
|
|
- if (true == ReportFun.WhetherInRange(dp, new Point(e.X, e.Y)))
|
|
|
- {
|
|
|
- //选择到了该路径,那么就选取该图像b
|
|
|
- dp.Operator_ShowXRay = ParticleShowXray.SELECTANDDISPLAYXRAY;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dp.Operator_ShowXRay = ParticleShowXray.NODISPLAY;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //右键菜单控件
|
|
|
- CMenuStrip.Items[0].Tag = "";
|
|
|
- CMenuStrip.Items[0].Enabled = false;
|
|
|
- CMenuStrip.Items[1].Tag = "";
|
|
|
- CMenuStrip.Items[1].Enabled = false;
|
|
|
- CMenuStrip.Items[2].Tag = "";
|
|
|
- CMenuStrip.Items[2].Enabled = false;
|
|
|
- CMenuStrip.Items[3].Tag = "";
|
|
|
- CMenuStrip.Items[3].Enabled = false;
|
|
|
- CMenuStrip.Items[4].Tag = "";
|
|
|
- CMenuStrip.Items[4].Enabled = false;
|
|
|
|
|
|
if (e.Button == MouseButtons.Right)
|
|
|
{
|
|
|
- //线程未执行完成,则不让再进行选择,右键移动到SEM位置的菜单选项
|
|
|
- if (m_mythread_state == false)
|
|
|
- CMenuStrip.Items[4].Enabled = true;
|
|
|
- else
|
|
|
- CMenuStrip.Items[4].Enabled = false;
|
|
|
+
|
|
|
+
|
|
|
+ bool ifClickOnParticle=false;
|
|
|
+ bool ifThereIsSelectedParticle = false;
|
|
|
|
|
|
- //这个判断右键菜单加在这里,也不知道对不对
|
|
|
+
|
|
|
foreach (BaseObject item in m_list_allDPart)
|
|
|
{
|
|
|
if (true == ReportFun.WhetherInRange((DisplayParticle)item, e.Location))
|
|
|
{
|
|
|
- DisplayParticle dp = (DisplayParticle)item;
|
|
|
- CMenuStrip.Items[0].Enabled = true;
|
|
|
- CMenuStrip.Items[0].Tag = dp;
|
|
|
-
|
|
|
- CMenuStrip.Items[1].Enabled = true;
|
|
|
- if (dp.IsSelect)
|
|
|
- {
|
|
|
- CMenuStrip.Items[1].Text = table["str5"].ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- CMenuStrip.Items[1].Text = table["str6"].ToString();
|
|
|
- }
|
|
|
-
|
|
|
- CMenuStrip.Items[2].Enabled = true;
|
|
|
- CMenuStrip.Items[3].Enabled = true;
|
|
|
+ ifClickOnParticle = true;
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.Include].Visible = false;
|
|
|
+
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.CopyImage].Visible = false;
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.MoveSEMToParticle].Visible = true;
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.MoveSEMToParticle].Tag = item;
|
|
|
+ }
|
|
|
+ if (((DisplayParticle)item).IsSelect)
|
|
|
+ {
|
|
|
+ ifThereIsSelectedParticle = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (ifClickOnParticle == false)
|
|
|
+ {
|
|
|
+ if (ifThereIsSelectedParticle)
|
|
|
+ {
|
|
|
|
|
|
-
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.Include].Visible = true;
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.Include].Visible = false;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- m_sem_mouse_now_point = new Point(dp.SEMPosX, dp.SEMPosY);
|
|
|
- //获取颜色方法1,使用API来获取当前鼠标指向位置的颜色值-----------------------------------------------------
|
|
|
- Color ls_c = GetColorByMousePoint(e.X, e.Y);
|
|
|
- m_str_mouseshow_right = "灰度#" + ls_c.R.ToString();
|
|
|
- m_str_mouseshow_left = "颗粒SEM位置:" + dp.SEMPosX.ToString() + ":" + dp.SEMPosY.ToString();
|
|
|
+ }
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.CopyImage].Visible = true;
|
|
|
|
|
|
- m_ReportApp.mouseMatter.Text = m_str_mouseshow_right;
|
|
|
- m_ReportApp.RSGrayVal.Text = m_str_mouseshow_left;
|
|
|
+ CMenuStrip.Items[(int)RightButtonMenu.MoveSEMToParticle].Visible = false;
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- //判断菜单的状态,来判断当前鼠标是否在颗粒中,对菜单选项进行设置
|
|
|
- if (CMenuStrip.Items[1].Enabled == true)
|
|
|
- {
|
|
|
- CMenuStrip.Items[4].Visible = false;//暂时隐藏
|
|
|
- CMenuStrip.Items[4].Text = table["str8"].ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- CMenuStrip.Items[4].Visible = true;//去除隐藏
|
|
|
- CMenuStrip.Items[4].Text = table["str8"].ToString();
|
|
|
}
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1318,74 +1254,34 @@ namespace OTSIncAReportGraph.Controls
|
|
|
private void ToolStripMenuItem_id_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
//ID
|
|
|
- DisplayParticle dp = (DisplayParticle)CMenuStrip.Items[0].Tag;
|
|
|
- MessageBox.Show(dp.guid.ToString());
|
|
|
+ //DisplayParticle dp = (DisplayParticle)CMenuStrip.Items[0].Tag;
|
|
|
+ //MessageBox.Show(dp.guid.ToString());
|
|
|
}
|
|
|
|
|
|
|
|
|
//是否显示过小颗菜单
|
|
|
private void ToolStripMenuItem_ShowSmallParticle_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- if (bShowSmallParticle == false)
|
|
|
- {
|
|
|
- bShowSmallParticle = true;
|
|
|
- CMenuStrip.Items[7].Text = table["str8"].ToString();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- bShowSmallParticle = false;
|
|
|
- CMenuStrip.Items[7].Text = table["str9"].ToString();
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- //缩放的基数,临时变量
|
|
|
- m_Zoom_Base = 0;
|
|
|
- //与原先缩放的记录数
|
|
|
- m_zoom_record = 1;
|
|
|
-
|
|
|
-
|
|
|
- //每像素代表的尺寸大小,还不知道在哪里进行计算
|
|
|
- m_pixelSize = 4.5f;
|
|
|
- //提供鼠标在右下角显示的文本,左侧
|
|
|
- m_str_mouseshow_left = "";
|
|
|
- //提供鼠标在右下角显示的文本,右侧
|
|
|
- m_str_mouseshow_right = "";
|
|
|
- //整个背景矩形的背景色
|
|
|
- m_backrangecolor = Color.White;
|
|
|
-
|
|
|
-
|
|
|
- m_list_allDfield = new List<DisplayField>();
|
|
|
-
|
|
|
- m_list_allDPart = new List<BaseObject>();
|
|
|
-
|
|
|
- m_frm_userprogress = new Frm_UserProgress();
|
|
|
-
|
|
|
- m_mythread_state = false;
|
|
|
-
|
|
|
- m_mythread = new Thread(new ParameterizedThreadStart(Thread_GO));
|
|
|
-
|
|
|
- Control_DrawDistrbutionImageAndBSE_Load(null, null);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|
|
|
private void ToolStripMenuItem_selected_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- //选择
|
|
|
- DisplayParticle dp = (DisplayParticle)CMenuStrip.Items[0].Tag;
|
|
|
- if (dp.IsSelect)
|
|
|
+ List<DisplayParticle> selectedParts = new List<DisplayParticle>();
|
|
|
+ foreach (var dp in m_list_allDPart)
|
|
|
{
|
|
|
- dp.SetPaintState(PaintState.NORMALPAINT);
|
|
|
- CMenuStrip.Items[1].Text = table["str6"].ToString();
|
|
|
- control_XRayTable1.Visible = false;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dp.IsSelect = true ;
|
|
|
- CMenuStrip.Items[1].Text = table["str5"].ToString();
|
|
|
+ if (dp.IsSelect)
|
|
|
+ {
|
|
|
+ selectedParts.Add((DisplayParticle)dp);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
|
|
|
- //发送选择的颗粒到报告框架中
|
|
|
- SelectParticleListSendToReportFrame();
|
|
|
+
|
|
|
+ SendSelectParticleListToReportFrame(selectedParts);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -1504,10 +1400,18 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// <summary>
|
|
|
/// 封装,将分布图中的颗粒list传送给报告项目框架中
|
|
|
/// </summary>
|
|
|
- private void SelectParticleListSendToReportFrame()
|
|
|
+ private void SendSelectParticleListToReportFrame(List<DisplayParticle> selectParts)
|
|
|
{
|
|
|
//先获取分布图中,有哪些颗粒已经被选择上了
|
|
|
- m_ReportApp.SelectedParticles = GetSelectedParticleList_ForDrawDistrbutionImageAndBSE();
|
|
|
+ foreach (var p in selectParts)
|
|
|
+ {
|
|
|
+ if (!frmReportApp.selectedParticles.ContainsKey(p.guid))
|
|
|
+ {
|
|
|
+ frmReportApp.selectedParticles.Add(p.guid, p);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -1545,19 +1449,24 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
private void ToolStripMenuItem_delete_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
- //删除颗粒
|
|
|
- DisplayParticle dp = (DisplayParticle)CMenuStrip.Items[0].Tag;
|
|
|
-
|
|
|
- //同样,要在历史操作记录类中,添加记录,好可以进行撤消操作
|
|
|
- //HistoryApolygon hApolygon = new HistoryApolygon();
|
|
|
- //hApolygon.APolygonID = dp.guid;
|
|
|
- //hApolygon.IsDeleted = true;
|
|
|
- //hApolygon.OldOperator = dp.displayState;
|
|
|
- //hApolygon.ID = m_list_historyapolygon.Count;
|
|
|
- //m_list_historyapolygon.Add(hApolygon);
|
|
|
- //m_operator_currentid = hApolygon.ID;//当前操作到的历史操作记录
|
|
|
- //设置颗粒的状态为已经被删除
|
|
|
- dp.SetPaintState(PaintState.NOPAINT);
|
|
|
+ List<DisplayParticle> selectedParts = new List<DisplayParticle>();
|
|
|
+ foreach (var obj in m_list_allDPart)
|
|
|
+ {
|
|
|
+ var dp = (DisplayParticle)obj;
|
|
|
+ if (dp.IsSelect)
|
|
|
+ {
|
|
|
+ dp.IsDeleted = true;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ selectedParts.Add(dp);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ SendSelectParticleListToReportFrame(selectedParts);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//复制图像
|
|
|
@@ -1610,9 +1519,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// </summary>
|
|
|
private void Thread_GO(object in_obj)
|
|
|
{
|
|
|
- if (m_mythread_state == false)
|
|
|
- {
|
|
|
- m_mythread_state = true;
|
|
|
+
|
|
|
|
|
|
Point sem_point = (Point)in_obj;
|
|
|
|
|
|
@@ -1634,10 +1541,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
//第三步,断开电镜连接
|
|
|
ReportFun.DisConnectSEM();
|
|
|
|
|
|
- //Thread.Sleep(1000);
|
|
|
-
|
|
|
- m_mythread_state = false;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1649,7 +1553,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
{
|
|
|
FilterParticleByOtherCondition(in_griddata);
|
|
|
Invalidate();
|
|
|
-
|
|
|
+ this.Refresh();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -1881,7 +1785,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
}
|
|
|
|
|
|
//将排列图选择的颗粒传送给报告框架中
|
|
|
- SelectParticleListSendToReportFrame();
|
|
|
+ //SendSelectParticleListToReportFrame();
|
|
|
|
|
|
this.Invalidate();
|
|
|
}
|
|
|
@@ -1898,14 +1802,13 @@ namespace OTSIncAReportGraph.Controls
|
|
|
|
|
|
}
|
|
|
|
|
|
- //将排列图选择的颗粒传送给报告框架中
|
|
|
- SelectParticleListSendToReportFrame();
|
|
|
+
|
|
|
|
|
|
this.Invalidate();
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
|
|
|
/// <summary>
|
|
|
/// 将整个图像拷贝到内存中
|
|
|
@@ -1959,7 +1862,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
OriginalBackground = true;
|
|
|
foreach (DisplayParticle ls_dp in m_list_allDPart)
|
|
|
{
|
|
|
- ls_dp.DisplayState = DisplayState.NODISPLAY;
|
|
|
+ ls_dp.SetDisplayState(DisplayState.NODISPLAY);
|
|
|
}
|
|
|
FullGraphMatch();
|
|
|
}
|
|
|
@@ -2008,51 +1911,20 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// <returns></returns>
|
|
|
private void GetPic(PaintEventArgs args)
|
|
|
{
|
|
|
- //将原图读取到内存中
|
|
|
- if (originalImages.Count == 0)
|
|
|
- {
|
|
|
- string path = resultFile.FilePath;
|
|
|
- System.IO.DirectoryInfo theFolder = new System.IO.DirectoryInfo(path + "\\FIELD_FILES");
|
|
|
- foreach (System.IO.FileInfo nextifile in theFolder.GetFiles())
|
|
|
- {
|
|
|
- if (nextifile.Name.Contains(".bmp") == true || nextifile.Name.Contains(".BMP") == true)
|
|
|
- {
|
|
|
- Image image = Image.FromFile(path + "\\FIELD_FILES\\" + nextifile.Name);
|
|
|
- originalImageNames.Add(nextifile.Name);
|
|
|
- originalImages.Add(image);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- //绘制原图的大小和位置
|
|
|
- if (m_list_allDfield.Count > 0)
|
|
|
- {
|
|
|
- if (originalImageNames.Count > 0)
|
|
|
- {
|
|
|
- for (int i = 0; i < originalImageNames.Count; i++)
|
|
|
- {
|
|
|
- Size size = new Size();
|
|
|
- string ImageName = originalImageNames[i].ToString();
|
|
|
- Image Image = originalImages[i];
|
|
|
- string result = System.Text.RegularExpressions.Regex.Replace(ImageName, @"[^0-9]+", "");
|
|
|
- var curfldrec = m_list_allDfield[Convert.ToInt32(result)].Current_Rect;
|
|
|
- size.Height = (int)curfldrec.Height;
|
|
|
- size.Width = (int)curfldrec.Width;
|
|
|
- PointF pointF = new PointF();
|
|
|
- pointF.X =curfldrec.X;
|
|
|
- pointF.Y = curfldrec.Y;
|
|
|
-
|
|
|
- if (curfldrec.Left > -500 && curfldrec.Right <this.Width + 500 && curfldrec.Top > -500 && curfldrec.Bottom < this.Height + 500)
|
|
|
- {
|
|
|
|
|
|
+ foreach (var f in m_list_allDfield)
|
|
|
+ {
|
|
|
|
|
|
- Bitmap bitmap = new Bitmap(Image, size);
|
|
|
+ var curfldrec = f.Current_Rect;
|
|
|
+ if (curfldrec.Left > -1000 && curfldrec.Right <this.Width + 1000 && curfldrec.Top > -1000 && curfldrec.Bottom < this.Height + 1000)
|
|
|
+ {
|
|
|
|
|
|
|
|
|
- args.Graphics.DrawImage(bitmap, pointF);
|
|
|
+
|
|
|
+ args.Graphics.DrawImage(f.OriginalImage, f.Current_Rect.X, f.Current_Rect.Y, f.Current_Rect.Width, f.Current_Rect.Height);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|