public frmAddDom(frmDomains fff, string oldDom) { InitializeComponent(); this.fff = fff; textBox1.Text = oldDom; textBox1.Focus(); }
/// <summary> /// Кнопка "Редактировать домены" /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void доменыToolStripMenuItem_Click(object sender, EventArgs e) { frmDomains f = new frmDomains(tempES); if (f.ShowDialog() == DialogResult.OK) { saved = false; } }
/// <summary> /// Кнопка "Добавить домен" /// </summary> private void btnAddDomain_Click(object sender, EventArgs e) { frmDomains f = new frmDomains(es); if (f.AddDomain() == DialogResult.OK) { f.SaveCollections(); comboBox1.Items.Add(f.newDom); comboBox1.SelectedIndex = comboBox1.Items.Count - 1; } }
/// <summary> /// Кнопка добавить домен /// </summary> private void button1_Click(object sender, EventArgs e) { frmDomains fdom = new frmDomains(f.es); if (fdom.AddDomain() == DialogResult.OK) { fdom.SaveCollections(); if (fdom.newDom != null && fdom.newDom != "") { comboBox2.Items.Add(fdom.newDom); comboBox2.SelectedIndex = comboBox2.Items.Count - 1; } } }
/// <summary> /// Кнопка "Добавить значение в домен" /// </summary> private void btnAddVal_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex < 0) { MessageBox.Show("Сначала нужно выбрать домен"); } else { frmDomains f = new frmDomains(es); if (f.AddValue(comboBox1.SelectedIndex) == DialogResult.OK) { listBox2.Items.Add(f.newVal); } } }
/// <summary> /// Кнопка "Добавить значение" /// </summary> private void button1_Click(object sender, EventArgs e) { if (comboBox2.SelectedIndex < 0) { MessageBox.Show("Сначала нужно выбрать домен"); } else { frmDomains fdom = new frmDomains(f.es); if (fdom.AddValue(f.es.Vars[comboBox2.Text].Domain) == DialogResult.OK) { fdom.SaveCollections(); comboBox3.Items.Add(fdom.newVal); comboBox3.SelectedIndex = comboBox3.Items.Count - 1; } } }
public frmAddDom(frmDomains fff) { this.fff = fff; InitializeComponent(); textBox1.Focus(); }
public frmAddVal(frmDomains fff, string oldVal) { InitializeComponent(); this.fff = fff; textBox1.Text = oldVal; }