Exemplo n.º 1
0
        private void btnAddGlobalZone_Click(object sender, EventArgs e)
        {
            GlobalZonesInputBox gzib = new GlobalZonesInputBox(lvwGlobalZones.Items);

            if (gzib.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }

            ListViewItem lvi = new ListViewItem();

            lvi.Text = gzib.txtGlobalZoneName.Text;

            lvwGlobalZones.Items.Add(lvi);
        }
Exemplo n.º 2
0
        private void btnEditGlobalZone_Click(object sender, EventArgs e)
        {
            ListViewItem        lvi  = lvwGlobalZones.SelectedItems[0];
            GlobalZonesInputBox gzib = new GlobalZonesInputBox(lvwGlobalZones.Items);

            gzib.Text = "Edit Global Zone";
            gzib.txtGlobalZoneName.Text = lvi.SubItems[0].Text;

            if (gzib.ShowDialog(this) == DialogResult.Cancel)
            {
                return;
            }

            lvwGlobalZones.Items.Remove(lvi);

            ListViewItem lvi2 = new ListViewItem();

            lvi2.Text = gzib.txtGlobalZoneName.Text;

            lvwGlobalZones.Items.Add(lvi2);
        }