فهرست منبع

修改plc编辑的bug

ltwork 1 سال پیش
والد
کامیت
3d3274701c
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/AddDetailViewModel.cs

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

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