Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
        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();
            }
        }