Ejemplo n.º 1
0
        private void AddROpt()
        {
            FrmAddLayerConfig frm2 = new FrmAddLayerConfig(xmlop, (listView1.Items.Count + 1).ToString());

            frm2.Text        = "添加记录";
            frm2.Savebt.Text = "添加";
            if (frm2.ShowDialog() == DialogResult.OK)
            {
                LoadData();
                //LoadAcount();
            }
        }
Ejemplo n.º 2
0
        private void EditROpt()
        {
            if (this.listView1.SelectedItems.Count != 1)
            {
                MessageBox.Show("请选取一个账户操作");
            }
            else
            {
                int   k   = this.listView1.SelectedIndices[0];
                Color clr = listView1.Items[k].BackColor;
                listView1.Items[k].BackColor = Color.LightGray;

                FrmAddLayerConfig frm2 = new FrmAddLayerConfig(xmlop, this.listView1.Items[k].SubItems[5].Text);
                frm2.Text        = "修改记录";
                frm2.Savebt.Text = "修改";

                frm2.layerName.Text    = this.listView1.Items[k].SubItems[0].Text;
                frm2.nameField.Text    = this.listView1.Items[k].SubItems[1].Text;
                frm2.startVersion.Text = this.listView1.Items[k].SubItems[2].Text;;
                frm2.endVersion.Text   = this.listView1.Items[k].SubItems[3].Text;
                frm2.guid.Text         = this.listView1.Items[k].SubItems[4].Text;
                frm2.sourceName.Text   = this.listView1.Items[k].SubItems[5].Text;
                frm2.sourceType.Text   = this.listView1.Items[k].SubItems[6].Text;
                frm2.entiID.Text       = this.listView1.Items[k].SubItems[7].Text;
                frm2.shapeType.Text    = this.listView1.Items[k].SubItems[8].Text;

                if (frm2.ShowDialog() == DialogResult.OK)
                {
                    LoadData();
                    //LoadAcount();
                    //listView2.Select();
                    this.listView1.Items[k].Selected = true;
                }
                else
                {
                    listView1.Items[k].BackColor = clr;
                }
            }
        }