private void itemAddDevice_Click(object sender, EventArgs e) { DeviceConfigDialog pDialogDevice = new DeviceConfigDialog(null); if (pDialogDevice.ShowDialog() == DialogResult.OK) { this.p_DeviceGroup.Add(pDialogDevice.GetDevice()); pDialogDevice.Close(); } }
private void itemConfigDevice_Click(object sender, EventArgs e) { Device device = this.p_DeviceGroup.GetSelectedDevice(); if (device == null) { MessageBox.Show("请选择要配置的设备."); return; } DeviceConfigDialog pDialogDevice = new DeviceConfigDialog(device); if (pDialogDevice.ShowDialog() == DialogResult.OK) { this.p_DeviceGroup.Update(pDialogDevice.GetDevice()); pDialogDevice.Close(); } }