|
@@ -420,10 +420,21 @@ namespace OTSIncAReportGraph.Controls
|
|
|
ProgressBarUpdate(20 + (int)(ls_int_progresscalc * (i + 1)), str32 + i.ToString() + str33 + resultFile.List_OTSField.Count.ToString() + str34);
|
|
|
//取出该Field的物理坐标,将其转换成对应的屏幕像素坐标,屏幕左上角为原点(0,0)的偏移值,用于后面计算各Segment的位置使用
|
|
|
Point thisfield_point = new Point() { X = fieldlist[i].FieldPosX, Y = fieldlist[i].FieldPosY };
|
|
|
+
|
|
|
Point offset_point = imageDisHelper.ConvertOTSCoordToScreenCoord(otsLeftBottomPoint, m_pixelSize, thisfield_point, m_backRect, new RectangleF(0,0,fieldwidth,fieldheight));//the ots coordinate is always the up right positive.
|
|
|
- DisplayField df = new DisplayField(fieldlist[i],fieldwidth,fieldheight, offset_point);
|
|
|
- m_list_allDfield.Add(df);
|
|
|
- m_list_allDPart.AddRange(df.List_DParticle);
|
|
|
+ DisplayField df;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ df = new DisplayField(fieldlist[i], fieldwidth, fieldheight, offset_point);
|
|
|
+ m_list_allDfield.Add(df);
|
|
|
+ m_list_allDPart.AddRange(df.List_DParticle);
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ NLog.LogManager.GetCurrentClassLogger().Info(ex.Message.ToString());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -577,7 +588,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
{
|
|
|
if (OriginalBackground)
|
|
|
{
|
|
|
- GetPic(e);
|
|
|
+ DrawOriginalImageAsBackground(e);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -728,7 +739,7 @@ namespace OTSIncAReportGraph.Controls
|
|
|
{
|
|
|
|
|
|
float zoomDelta = newZoom - m_zoom_record;
|
|
|
- if (zoomDelta == 0) return;
|
|
|
+ //if (zoomDelta == 0) return;
|
|
|
m_backRect.Width += m_backRect.Width/m_zoom_record*zoomDelta;
|
|
|
m_backRect.Height += m_backRect.Height / m_zoom_record*zoomDelta;
|
|
|
//锚点缩放补差值计算,得出差值
|
|
@@ -754,8 +765,6 @@ namespace OTSIncAReportGraph.Controls
|
|
|
dp.SetPaintState(PaintState.NOPAINT);//the particles which are out of screen don't display.to speed up the display efficient.
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
|
|
|
}
|
|
|
if (m_list_allDfield != null)
|
|
@@ -1955,9 +1964,9 @@ namespace OTSIncAReportGraph.Controls
|
|
|
/// </summary>
|
|
|
/// <param name="args"></param>
|
|
|
/// <returns></returns>
|
|
|
- private void GetPic(PaintEventArgs args)
|
|
|
+ private void DrawOriginalImageAsBackground(PaintEventArgs args)
|
|
|
{
|
|
|
- //outpic();
|
|
|
+
|
|
|
|
|
|
foreach (var f in m_list_allDfield)
|
|
|
{
|