Parcourir la source

修改plc编辑的bug

ltwork il y a 1 an
Parent
commit
3d3274701c

+ 4 - 0
BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/AddDetailViewModel.cs

@@ -45,6 +45,10 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
 
 
         private void LostFocusPLCValue()
         private void LostFocusPLCValue()
         {
         {
+            if(string.IsNullOrEmpty(PLCValue))
+            {
+                return;
+            }
             if (!IsInteger(PLCValue))
             if (!IsInteger(PLCValue))
             {
             {
                 MessageBox.Show("请填写正整数!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
                 MessageBox.Show("请填写正整数!", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);