private void createNewProfile() { using (NewProfileDialog newProfileDialog = new NewProfileDialog()) { if (DialogResult.OK == newProfileDialog.ShowDialog(this)) { // create a new profile object Profile newProfile = new Profile(newProfileDialog.NewProfileName); _Profiles.Add(newProfile); // show it in the drop down as selected cboProfiles.SelectedIndex = cboProfiles.Items.Add(newProfile.Name); // load the NIC list loadNICs(); } } }
private void createNewProfile() { using (NewProfileDialog newProfileDialog = new NewProfileDialog()) { if (DialogResult.OK == newProfileDialog.ShowDialog(this)) { // create a new profile object Profile newProfile = new Profile(newProfileDialog.NewProfileName); _Profiles.Add(newProfile); // show it in the drop down as selected cboProfiles.SelectedIndex = cboProfiles.Items.Add(newProfile.Name); // load the NIC list loadNICs(); } } BuildContextMenuWithProfiles(); }