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

@ -1,5 +1,7 @@

using DH.Commons.Enums;
namespace DHSoftware.Views
{
public partial class AddCubicleControl : UserControl
@ -7,11 +9,17 @@ namespace DHSoftware.Views
private AntdUI.Window window;
public bool submit;
public string CubicleName;
public EnumDetectionType DetectionType;
public AddCubicleControl(AntdUI.Window _window,string TitleName)
{
this.window = _window;
InitializeComponent();
lbTitleName.Text = TitleName;
sltdetectionType.Items.Clear();
foreach (EnumDetectionType value in Enum.GetValues(typeof(EnumDetectionType)))
{
sltdetectionType.Items.Add(value.ToString());
}
// 绑定事件
BindEventHandler();
}
@ -38,7 +46,14 @@ namespace DHSoftware.Views
AntdUI.Message.warn(window, "工位名称不能为空!", autoClose: 3);
return;
}
CubicleName=input_name.Text;
if (String.IsNullOrEmpty(sltdetectionType.Text))
{
input_name.Status = AntdUI.TType.Error;
AntdUI.Message.warn(window, "请选择检测类型!", autoClose: 3);
return;
}
CubicleName =input_name.Text;
DetectionType = (EnumDetectionType)sltdetectionType.SelectedIndex;
submit = true;
this.Dispose();
}