|
@@ -572,32 +572,38 @@ namespace OTSIncAReportGraph
|
|
|
|
|
|
if (GetPaintState() == PaintState.PAINT)
|
|
|
{
|
|
|
- DisplaySegment ds = m_listdsegment[0];
|
|
|
- if (ds.ShowMode == SegmentShowMode.DRAWPOINT)
|
|
|
+ if (m_listdsegment.Count > 0)
|
|
|
{
|
|
|
- try
|
|
|
+
|
|
|
+ DisplaySegment ds = m_listdsegment[0];
|
|
|
+ if (ds.ShowMode == SegmentShowMode.DRAWPOINT)
|
|
|
{
|
|
|
- e.Graphics.DrawImage(m_image, m_rect);
|
|
|
+ try
|
|
|
+ {
|
|
|
+ e.Graphics.DrawImage(m_image, m_rect);
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ NLog.LogManager.GetCurrentClassLogger().Error(ex.ToString());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
- catch (Exception ex)
|
|
|
+ else
|
|
|
{
|
|
|
- NLog.LogManager.GetCurrentClassLogger().Error(ex.ToString());
|
|
|
- }
|
|
|
-
|
|
|
+ //调用绘制基本线
|
|
|
+ foreach (DisplaySegment item in m_listdsegment)
|
|
|
+ {
|
|
|
+ item.OnPaint(e);
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- //调用绘制基本线
|
|
|
- foreach (DisplaySegment item in m_listdsegment)
|
|
|
- {
|
|
|
- item.OnPaint(e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|