private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Frm_EnterName nam = new Frm_EnterName(); nam.ShowDialog(this); if (nam.OK) { int SelectedIndex = comboBox1.SelectedIndex; Program.Settings.ControlProfiles[comboBox1.SelectedIndex].Name = nam.NameEntered; RefreshProfiles(); comboBox1.SelectedIndex = SelectedIndex; } }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { Frm_EnterName nam = new Frm_EnterName(); nam.ShowDialog(this); if (nam.OK) { ControlProfile pro = new ControlProfile(); pro.Name = nam.NameEntered; Program.Settings.ControlProfiles.Add(pro); RefreshProfiles(); comboBox1.SelectedIndex = comboBox1.Items.Count - 1; } }