提交
This commit is contained in:
47
DHSoftware/Views/AddCameraControl.cs
Normal file
47
DHSoftware/Views/AddCameraControl.cs
Normal file
@ -0,0 +1,47 @@
|
||||
|
||||
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
public partial class AddCameraControl : UserControl
|
||||
{
|
||||
private AntdUI.Window window;
|
||||
public bool submit;
|
||||
public string CubicleName;
|
||||
public AddCameraControl(AntdUI.Window _window)
|
||||
{
|
||||
this.window = _window;
|
||||
InitializeComponent();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void BindEventHandler()
|
||||
{
|
||||
button_ok.Click += Button_ok_Click;
|
||||
button_cancel.Click += Button_cancel_Click;
|
||||
}
|
||||
|
||||
private void Button_cancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
submit = false;
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
private void Button_ok_Click(object sender, EventArgs e)
|
||||
{
|
||||
input_name.Status = AntdUI.TType.None;
|
||||
//检查输入内容
|
||||
if (String.IsNullOrEmpty(input_name.Text))
|
||||
{
|
||||
input_name.Status = AntdUI.TType.Error;
|
||||
AntdUI.Message.warn(window, "相机名称不能为空!", autoClose: 3);
|
||||
return;
|
||||
}
|
||||
CubicleName=input_name.Text;
|
||||
submit = true;
|
||||
this.Dispose();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user