From 78584911d0457ad9fc26d9dfc6f374b7ef531c0f Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期日, 22 十一月 2020 13:45:09 +0800 Subject: [PATCH] 1. 添加操作员输入和界面显示 2. 添加通过输入窗体 3. 添加webservice调用帮助类 4. M071添加MES数据检查和数据上传功能,添加相关界面显示和流程控制 --- src/Bro.Common.Model/Forms/FrmDeviceOpConfigEditor.cs | 20 +++++++++++++++++--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/Bro.Common.Model/Forms/FrmDeviceOpConfigEditor.cs b/src/Bro.Common.Model/Forms/FrmDeviceOpConfigEditor.cs index 10d6598..4ae9e2e 100644 --- a/src/Bro.Common.Model/Forms/FrmDeviceOpConfigEditor.cs +++ b/src/Bro.Common.Model/Forms/FrmDeviceOpConfigEditor.cs @@ -29,7 +29,7 @@ IOperationConfig backOpConfig = new OperationConfigBase(); List<IDevice> deviceList = null; IDevice currentDevice = null; - public FrmDeviceOpConfigEditor(DeviceOpBind bind) + public FrmDeviceOpConfigEditor(DeviceOpBind bind, bool isEnableSelectDevice = true) { InitializeComponent(); @@ -56,7 +56,15 @@ cboDevice.SelectedIndex = 0; } - cboDevice.SelectedIndexChanged += CboDevice_SelectedIndexChanged; + if (isEnableSelectDevice) + { + cboDevice.Enabled = true; + cboDevice.SelectedIndexChanged += CboDevice_SelectedIndexChanged; + } + else + { + cboDevice.Enabled = false; + } if (bind.OpConfig == null) { @@ -70,9 +78,12 @@ } } + bind.OpConfig.DeviceId = bind.Device; + backOpConfig.DataFrom(bind.OpConfig); propGrid.SelectedObject = bind.OpConfig; + } private void CboDevice_SelectedIndexChanged(object sender, EventArgs e) @@ -88,7 +99,9 @@ var attr = device.GetType().GetCustomAttribute<DeviceAttribute>(); if (attr != null) { - propGrid.SelectedObject = ConfigFactory.GetOperationConfig(attr.TypeCode); + var opConfig = ConfigFactory.GetOperationConfig(attr.TypeCode); + opConfig.DeviceId = device.Id; + propGrid.SelectedObject = opConfig; } } } @@ -115,6 +128,7 @@ { Bind.Device = cboDevice.SelectedValue.ToString(); Bind.OpConfig = propGrid.SelectedObject as IOperationConfig; + Bind.OpConfig.DeviceId = Bind.Device; this.DialogResult = DialogResult.OK; } -- Gitblit v1.8.0