正在改尺寸测量

This commit is contained in:
2025-04-18 14:04:02 +08:00
parent 6182dc2192
commit ae11376f5a
47 changed files with 6732 additions and 1834 deletions

View File

@ -32,7 +32,51 @@ namespace DHSoftware.Views
btnSizeAdd.Click += BtnSizeAdd_Click;
btnSizeDel.Click += BtnSizeDelete_Click;
SizeTable.CellButtonClick += SizeTable_CellButtonClick;
btnCorrelatedCamera.Click += BtnCorrelatedCamera_Click;
}
private void BtnCorrelatedCamera_Click(object? sender, EventArgs e)
{
var form = new CorrelatedCameraEdit(window, detectionConfig.CameraCollects) { Size = new Size(500, 400) };
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "", form, TType.None)
{
BtnHeight = 0,
});
if (form.submit)
{
flowCameraPanel.Controls.Clear();
if (detectionConfig.CameraCollects.Count > 0)
{
foreach (var item in detectionConfig.CameraCollects)
{
var control = new AntdUI.Tag()
{
Font = new System.Drawing.Font("Microsoft YaHei UI", 9F),
Size = new Size(90, 42),
Text = item.CameraSourceId,
CloseIcon = true
};
control.CloseChanged += (sender, e) =>
{
var tag = sender as Tag;
foreach (var item in detectionConfig.CameraCollects)
{
if (item.CameraSourceId.Equals(tag.Text))
{
detectionConfig.CameraCollects.Remove(item);
break;
}
}
return true;
};
// 通过主窗口设置DPI控制添加控件保持缩放比例
window.AutoDpi(control);
flowCameraPanel.Controls.Add(control);
control.BringToFront();
}
}
}
}
@ -75,7 +119,7 @@ namespace DHSoftware.Views
case "3":
case "4":
case "5":
FrmMain3 frmMain3 = new FrmMain3(sizeType);
FrmMainSize frmMain3 = new FrmMainSize(sizeType, detectionConfig);
frmMain3.ShowDialog();
if (!string.IsNullOrEmpty(frmMain3.inputtext))
{