| | |
| | | IOperationConfig backOpConfig = new OperationConfigBase(); |
| | | List<IDevice> deviceList = null; |
| | | IDevice currentDevice = null; |
| | | public FrmDeviceOpConfigEditor(DeviceOpBind bind) |
| | | public FrmDeviceOpConfigEditor(DeviceOpBind bind, bool isEnableSelectDevice = true) |
| | | { |
| | | InitializeComponent(); |
| | | |
| | |
| | | cboDevice.SelectedIndex = 0; |
| | | } |
| | | |
| | | cboDevice.SelectedIndexChanged += CboDevice_SelectedIndexChanged; |
| | | if (isEnableSelectDevice) |
| | | { |
| | | cboDevice.Enabled = true; |
| | | cboDevice.SelectedIndexChanged += CboDevice_SelectedIndexChanged; |
| | | } |
| | | else |
| | | { |
| | | cboDevice.Enabled = false; |
| | | } |
| | | |
| | | if (bind.OpConfig == null) |
| | | { |
| | |
| | | { |
| | | Bind.Device = cboDevice.SelectedValue.ToString(); |
| | | Bind.OpConfig = propGrid.SelectedObject as IOperationConfig; |
| | | Bind.OpConfig.DeviceId = Bind.Device; |
| | | this.DialogResult = DialogResult.OK; |
| | | } |
| | | |