private void buttonEditAccount_Click(object sender, EventArgs e) { if (comboBox2.SelectedIndex >= 0) { NewAccount form = new NewAccount(Data.getActiveAccount()); form.ShowDialog(); comboBox2.Items.Clear(); comboBox2.Items.AddRange(Data.accounts.ToArray()); } Save.Saveall(); }
private void button3_Click(object sender, EventArgs e) { NewAccount myForm = new NewAccount(); myForm.ShowDialog(); comboBox2.Items.Clear(); comboBox2.Items.AddRange(Data.accounts.ToArray()); if (!Data.isCancelled) { //comboBox2.SelectedIndex = comboBox2.Items.Count - 1; Data.isCancelled = true; } Save.Saveall(); }