合并
This commit is contained in:
@ -9,7 +9,6 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
using AntdUI;
|
||||
using DH.Devices.Devices;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
{
|
||||
@ -18,14 +17,11 @@ namespace DHSoftware.Views
|
||||
public AddCameraWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
btnOK.DialogResult = DialogResult.OK;
|
||||
btnCancel.DialogResult = DialogResult.Cancel;
|
||||
this.AcceptButton = btnOK;
|
||||
this.CancelButton = btnCancel;
|
||||
|
||||
|
||||
stName.Items.Clear();
|
||||
for(int i = 1; i <= 8; i++)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using AntdUI;
|
||||
using DH.Commons.Enums;
|
||||
using DH.Devices.Vision;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
|
@ -10,6 +10,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml.Linq;
|
||||
using AntdUI;
|
||||
using DH.Commons.Enums;
|
||||
using DH.Devices.Vision;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
|
@ -3,6 +3,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.Reflection;
|
||||
using AntdUI;
|
||||
using DH.Commons.Enums;
|
||||
using DH.Devices.Vision;
|
||||
using static System.Windows.Forms.AxHost;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
|
||||
|
||||
using DH.Commons.Enums;
|
||||
using DH.Devices.Vision;
|
||||
|
||||
namespace DHSoftware.Views
|
||||
|
@ -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