Exemple #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            add         = true;
            selectIndex = listView1.Items.Count;
            MaterielEdit materielEdit = new MaterielEdit(EditMaterielData, materielDataMap, null);

            materielEdit.ShowDialog();
        }
Exemple #2
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listView1.SelectedItems == null || listView1.SelectedItems.Count <= 0)
            {
                MessageBox.Show("请先选中要修改的用户");
                return;
            }
            selectIndex = listView1.SelectedItems[0].Index;
            string matNo    = (string)listView1.SelectedItems[0].SubItems[0].Text.Trim();
            string cameraIp = (string)listView1.SelectedItems[0].SubItems[2].Text.Trim();

            foreach (MaterielData data in materielDataMap)
            {
                if (data.CameraAddress.Equals(cameraIp) && data.MatNo.Equals(matNo))
                {
                    MaterielEdit materielEdit = new MaterielEdit(EditMaterielData, materielDataMap, data);
                    materielEdit.ShowDialog();
                    break;
                }
            }
        }