Explorar o código

修复了失败了也提示成功

ruanzl hai 2 semanas
pai
achega
ae42b240ef
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  1. 5 4
      CameraModel/Form1.cs

+ 5 - 4
CameraModel/Form1.cs

@@ -64,10 +64,11 @@ namespace CameraModel
             {
                 if (_device != null)
                 {
-                    //MVCC_STRINGVALUE pstValue = new MVCC_STRINGVALUE();
-                    //m_MyCamera.MV_CC_GetDeviceUserID_NET(ref pstValue);
                     string UserDefinedName = _device.DeviceInfo.UserDefinedName;
-                    AntdUI.Message.success(this, "成功修改型号为:" + UserDefinedName, Font, 10);
+                    if (string.IsNullOrEmpty(UserDefinedName))
+                    {
+                        AntdUI.Message.success(this, "成功修改型号为:" + UserDefinedName, Font, 10);
+                    }
                 }
             }
             catch (Exception ex) 
@@ -505,7 +506,7 @@ namespace CameraModel
                 LogHelper.LoggerMsg(LogLevel.Error, "型号修改失败! 状态码:" + nRet);
                 return;
             }
-            LogListBox("型号修改成功," + cbDeviceList.SelectedValue + "=====>" + input1.Text);
+            LogListBox("型号," + cbDeviceList.SelectedValue + "=====>" + _device.DeviceInfo.UserDefinedName);
             ModelName = _device.DeviceInfo.ModelName;
             if (!devices.ContainsKey(ModelName))
             {