Browse Source

处理lowcounts颗粒谱峰图显示错误的bug

cxs 1 năm trước cách đây
mục cha
commit
222dc786b5

+ 9 - 6
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_XRayTable.cs

@@ -506,14 +506,17 @@ namespace OTSIncAReportGraph.Controls
             {
                 m_Y_Value = (uint)Math.Floor(m_xraytopixel_multiple * 150 / 2);
             }
-            //纵坐标
-            for (int i = 0; i < 30; i++)
+            if (m_xraytopixel_multiple != 0)
             {
-                if (i * m_Y_Value <= m_xraytopixel_multiple*150)
+                //纵坐标
+                for (int i = 0; i < 30; i++)
                 {
-                    g.DrawLine(m_this_p, m_i_draw_start, m_f_rulerX_location - (i * GetValueByRatio(m_Y_Value) * f_js_width), m_i_draw_start + 3, m_f_rulerX_location - (i * GetValueByRatio(m_Y_Value) * f_js_width));
-                    int aa = i * Convert.ToInt16(m_Y_Value);
-                    g.DrawString(aa.ToString(), m_thisfont_bold, m_this_sb, m_i_draw_start - 10 - ((aa.ToString().Length - 1) * 6), m_f_rulerX_location - (i * GetValueByRatio(m_Y_Value) * f_js_width) - 7);
+                    if (i * m_Y_Value <= m_xraytopixel_multiple * 150)
+                    {
+                        g.DrawLine(m_this_p, m_i_draw_start, m_f_rulerX_location - (i * GetValueByRatio(m_Y_Value) * f_js_width), m_i_draw_start + 3, m_f_rulerX_location - (i * GetValueByRatio(m_Y_Value) * f_js_width));
+                        int aa = i * Convert.ToInt16(m_Y_Value);
+                        g.DrawString(aa.ToString(), m_thisfont_bold, m_this_sb, m_i_draw_start - 10 - ((aa.ToString().Length - 1) * 6), m_f_rulerX_location - (i * GetValueByRatio(m_Y_Value) * f_js_width) - 7);
+                    }
                 }
             }