领胜LDS 键盘AOI检测项目
xcd
2020-07-09 c0b8009ef36746c7a14606267662570e8c59c2c6
src/Bro.Common.Model/Forms/FrmDeviceOpConfigEditor.cs
@@ -70,9 +70,12 @@
                }
            }
            bind.OpConfig.DeviceId = bind.Device;
            backOpConfig.DataFrom(bind.OpConfig);
            propGrid.SelectedObject = bind.OpConfig;
        }
        private void CboDevice_SelectedIndexChanged(object sender, EventArgs e)
@@ -88,7 +91,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 +120,7 @@
        {
            Bind.Device = cboDevice.SelectedValue.ToString();
            Bind.OpConfig = propGrid.SelectedObject as IOperationConfig;
            Bind.OpConfig.DeviceId = Bind.Device;
            this.DialogResult = DialogResult.OK;
        }