Exemplo n.º 1
0
        // 添加设备
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            FormDeviceAdd add = new FormDeviceAdd();

            add.ShowDialog();
            devicelistREfresh();  // 刷新
        }
Exemplo n.º 2
0
 // 修改设备
 private void button2_Click(object sender, EventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         FormDeviceAdd add = new FormDeviceAdd();
         add.devicename = listView1.SelectedItems[0].Text;
         add.ShowDialog();
         devicelistREfresh();  // 刷新
     }
     else
     {
         MessageBox.Show("请选择设备!");
     }
 }