浏览代码

Merge branch 'OTSRelease3_2' of http://36.129.163.148:30080/gogsadmin/OTS into OTSRelease3_2

zhangjiaxin 6 月之前
父节点
当前提交
25b02f44c2
共有 2 个文件被更改,包括 33 次插入17 次删除
  1. 3 2
      OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_XRayTable.cs
  2. 30 15
      OTSPartA_STDEditor/UI/Form_Main.cs

+ 3 - 2
OTSIncAReportApp/1-UI/Control_Graph/Controls/Control_XRayTable.cs

@@ -48,7 +48,7 @@ namespace OTSIncAReportGraph.Controls
         float m_i_draw_start = 0;                                       //整个界面绘制的起始点
         float m_i_draw_end = 1004;                                      //整个界面绘制的边界
 
-        float m_Y_draw_end = 220;                                      //整个界面绘制的边界高
+        float m_Y_draw_end = 175;                                      //整个界面绘制的边界高
         float m_Y_draw_TopDiff = 15;                                    //Y轴距离顶部距离
         float m_Y_MaxValue = 0;                                         //Y轴显示的最大刻度长度
         uint m_Y_Value = 50;                                           //Y轴大刻度包含像素数
@@ -455,6 +455,7 @@ namespace OTSIncAReportGraph.Controls
         #endregion
 
 
+
         #region 绘制事件
         protected override void OnPaint(PaintEventArgs e)
         {
@@ -708,7 +709,7 @@ namespace OTSIncAReportGraph.Controls
 
                 ls_pt.X = (ls_pt.X - out_testsizef.Width/2-10) ;
                 
-                g.DrawString(str_element, m_thisfont, new SolidBrush(DrawFunction.GetColorByNumber( 1)), ls_pt);
+                g.DrawString(str_element, m_thisfont, new SolidBrush(DrawFunction.GetColorByNumber(1)), ls_pt);
                
             }
           

+ 30 - 15
OTSPartA_STDEditor/UI/Form_Main.cs

@@ -370,6 +370,21 @@ namespace OTSPartA_STDEditor
                         MessageBox.Show("Invalid string exists:" + "(" + Symbol[i], "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
                         return false;
                     }
+                    //尾字符检测
+                    int n= Symbol[i].Length;
+                    if (str_RemoveBlank.Length >= n)
+                    {
+                        if (str_RemoveBlank.Substring(str_RemoveBlank.Length-n, n) == Symbol[i]) 
+                        {
+                            MessageBox.Show("Last character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                            return false;
+                        }
+                        if (str_RemoveBlank.Substring(0, n) == Symbol[i])
+                        {
+                            MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                            return false;
+                        }
+                    }
                 }
 
                 //左右括号匹配检验
@@ -384,21 +399,21 @@ namespace OTSPartA_STDEditor
                     MessageBox.Show("Number of left and right parentheses does not match!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
                     return false;
                 }
-                //首字符检测
-                if ((str_RemoveBlank[0] == '+') || (str_RemoveBlank[0] == '-') || (str_RemoveBlank[0] == '*') || (str_RemoveBlank[0] == '/') || (str_RemoveBlank[0] == '>') || (str_RemoveBlank[0] == '<') || (str_RemoveBlank[0] == '=') || (str_RemoveBlank[0] == ')') || (str_RemoveBlank[str_RemoveBlank.Length - 1] == '('))
-                {
-                    MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
-                    return false;
-                }
-
-                if (str_RemoveBlank.Length >= 3)
-                {
-                    if ((str_RemoveBlank.Substring(0, 3) == "and") || (str_RemoveBlank.Substring(0, 3) == "end"))
-                    {
-                        MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
-                        return false;
-                    }
-                }
+                ////首字符检测
+                //if ((str_RemoveBlank[0] == '+') || (str_RemoveBlank[0] == '-') || (str_RemoveBlank[0] == '*') || (str_RemoveBlank[0] == '/') || (str_RemoveBlank[0] == '>') || (str_RemoveBlank[0] == '<') || (str_RemoveBlank[0] == '=') || (str_RemoveBlank[0] == ')') || (str_RemoveBlank[str_RemoveBlank.Length - 1] == '('))
+                //{
+                //    MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                //    return false;
+                //}
+
+                //if (str_RemoveBlank.Length >= 3)
+                //{
+                //    if ((str_RemoveBlank.Substring(0, 3) == "and") || (str_RemoveBlank.Substring(0, 3) == "end"))
+                //    {
+                //        MessageBox.Show("First character is error!", "Tip", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                //        return false;
+                //    }
+                //}
 
 
                 //forth_elem干扰or分隔符,故先行去掉