合并
This commit is contained in:
@ -136,23 +136,23 @@ namespace DHSoftware.Views
|
||||
{
|
||||
if (it.Text == "关联相机")
|
||||
{
|
||||
using (var dlg = new AddCameraWindow(cameras))
|
||||
{
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
var newItem = new MenuItem(dlg.CubicleName);
|
||||
newItem.IconSvg = "VideoCameraOutlined";
|
||||
//// 防止重复添加
|
||||
//if (!menu1.Items.Cast<MenuItem>().Any(m => m.Text == newItem.Text))
|
||||
//{
|
||||
clickedItem.Sub.Add(newItem);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// AntdUI.Notification.warn(this, "新增失败", $"{dlg.CubicleName}已存在!", autoClose: 3, align: TAlignFrom.TR);
|
||||
//}
|
||||
}
|
||||
}
|
||||
//using (var dlg = new AddCameraWindow(cameras))
|
||||
//{
|
||||
// if (dlg.ShowDialog() == DialogResult.OK)
|
||||
// {
|
||||
// var newItem = new MenuItem(dlg.CubicleName);
|
||||
// newItem.IconSvg = "VideoCameraOutlined";
|
||||
// //// 防止重复添加
|
||||
// //if (!menu1.Items.Cast<MenuItem>().Any(m => m.Text == newItem.Text))
|
||||
// //{
|
||||
// clickedItem.Sub.Add(newItem);
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // AntdUI.Notification.warn(this, "新增失败", $"{dlg.CubicleName}已存在!", autoClose: 3, align: TAlignFrom.TR);
|
||||
// //}
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}, menulist);
|
||||
}
|
||||
|
Reference in New Issue
Block a user