修改标签路径

This commit is contained in:
xhm\HP 2025-03-24 19:03:30 +08:00
parent d881dc6ec0
commit b60d2759b1
2 changed files with 13 additions and 3 deletions

View File

@ -752,7 +752,17 @@ namespace DH.Commons.Base
[Description("中处理-模型标签路径")] [Description("中处理-模型标签路径")]
public string In_lable_path public string In_lable_path
{ {
get => _in_lable_path; get
{
if (string.IsNullOrEmpty(ModelPath) || string.IsNullOrWhiteSpace(ModelPath))
{
return string.Empty;
}
string dir = Path.GetDirectoryName(ModelPath);
string file = $"{Path.GetFileNameWithoutExtension(ModelPath)}.txt";
return Path.Combine(dir, file);
}
set set
{ {
if (_in_lable_path == value) return; if (_in_lable_path == value) return;

View File

@ -453,7 +453,7 @@ namespace DHSoftware
cam.CameraIP = cameraBase.CameraIP; cam.CameraIP = cameraBase.CameraIP;
cam.IsEnabled = cameraBase.IsEnabled; cam.IsEnabled = cameraBase.IsEnabled;
Cameras.Add(cam); Cameras.Add(cam);
cam.CameraConnect(); //cam.CameraConnect();
cam.OnHImageOutput += OnCameraHImageOutput; cam.OnHImageOutput += OnCameraHImageOutput;
} }
else if(cameraBase.CamType == EnumCamType.hik) else if(cameraBase.CamType == EnumCamType.hik)
@ -483,7 +483,7 @@ namespace DHSoftware
PLC.PLCName = plcBase.PLCName; PLC.PLCName = plcBase.PLCName;
PLC.PLCItemList=plcBase.PLCItemList; PLC.PLCItemList=plcBase.PLCItemList;
PLC.Port= plcBase.Port; PLC.Port= plcBase.Port;
PLC.PLCConnect(); // PLC.PLCConnect();
} }
} }