Example #1
0
        private void cmdDnsAdd_Click(object sender, EventArgs e)
        {
            SettingsIp Dlg = new SettingsIp();

            if (Dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ListViewItem item = new ListViewItem();
                item.Text = Dlg.Ip;

                lstDnsServers.Items.Add(item);
                lstDnsServers.SelectedItems.Clear();
                item.Selected = true;
                item.EnsureVisible();

                EnableIde();
            }
        }
Example #2
0
        private void cmdDnsEdit_Click(object sender, EventArgs e)
        {
            if (lstDnsServers.SelectedItems.Count == 1)
            {
                ListViewItem item = lstDnsServers.SelectedItems[0];

                SettingsIp Dlg = new SettingsIp();

                Dlg.Ip = item.Text;

                if (Dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    item.Text = Dlg.Ip;

                    EnableIde();
                }
            }
        }
Example #3
0
        private void cmdDnsEdit_Click(object sender, EventArgs e)
        {
            if (lstDnsServers.SelectedItems.Count == 1)
            {
                ListViewItem item = lstDnsServers.SelectedItems[0];

                SettingsIp Dlg = new SettingsIp();

                Dlg.Ip = item.Text;

                if (Dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    item.Text = Dlg.Ip;

                    EnableIde();
                }
            }
        }
Example #4
0
        private void cmdDnsAdd_Click(object sender, EventArgs e)
        {
            SettingsIp Dlg = new SettingsIp();
            if (Dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ListViewItem item = new ListViewItem();
                item.Text = Dlg.Ip;

                lstDnsServers.Items.Add(item);
                lstDnsServers.SelectedItems.Clear();
                item.Selected = true;
                item.EnsureVisible();

                EnableIde();
            }
        }