This commit is contained in:
2025-04-16 08:52:53 +08:00
parent 72b67b6a2f
commit 28e15a556d
17 changed files with 965 additions and 294 deletions

View File

@ -112,12 +112,20 @@ namespace DHSoftware.Views
}
}
DetectionConfig? detectionConfig = ConfigModel.DetectionList.Where(c => c.Name == clickedItem.Text).FirstOrDefault();
if (detectionConfig == null)
{
detectionConfig = new DetectionConfig();
}
//if (detectionConfig == null)
//{
// detectionConfig = new DetectionConfig();
//}
UserControl control1 = null;
control1 = new DetectControl(this, detectionConfig);
if (DH.Commons.Enums.EnumDetectionType.==detectionConfig?.DetectionType)
{
control1 = new DetectControl(this, detectionConfig);
}
else
{
control1=new SizeControl(this,detectionConfig);
}
if (control1 != null)
{
//容器添加控件需要调整dpi
@ -764,7 +772,7 @@ namespace DHSoftware.Views
if (workstationItem1 != null)
{
var form = new AddCubicleControl(this, "新增工位操作") { Size = new Size(300, 200) };
var form = new AddCubicleControl(this, "新增工位操作") { Size = new Size(300, 400) };
AntdUI.Modal.open(new AntdUI.Modal.Config(this, "", form, TType.None)
{
BtnHeight = 0,
@ -779,6 +787,7 @@ namespace DHSoftware.Views
workstationItem1.Sub.Add(newItem);
DetectionConfig detection = new DetectionConfig();
detection.Name = form.CubicleName;
detection.DetectionType = form.DetectionType;
ConfigModel.DetectionList.Add(detection);
}
else