void AddButtonClick(object sender, EventArgs e) { using (AddNewConfigurationDialog dlg = new AddNewConfigurationDialog (configurable is ISolution, editPlatforms, editedCollection, delegate(string name) { return(EnsureCorrectName(ref name)); } )) { if (dlg.ShowDialog(this) == DialogResult.OK) { editedCollection.Add(dlg.NewName, dlg.CopyFrom); if (dlg.CreateInAllProjects) { foreach (var project in ((ISolution)configurable).Projects) { if (editPlatforms) { project.PlatformNames.Add(dlg.NewName, dlg.CopyFrom); } else { project.ConfigurationNames.Add(dlg.NewName, dlg.CopyFrom); } } } InitList(); } } }
void AddButtonClick(object sender, EventArgs e) { using (AddNewConfigurationDialog dlg = new AddNewConfigurationDialog (configurable is ISolution, editPlatforms, editedCollection, delegate (string name) { return EnsureCorrectName(ref name); } )) { if (dlg.ShowDialog(this) == DialogResult.OK) { editedCollection.Add(dlg.NewName, dlg.CopyFrom); if (dlg.CreateInAllProjects) { foreach (var project in ((ISolution)configurable).Projects) { if (editPlatforms) project.PlatformNames.Add(dlg.NewName, dlg.CopyFrom); else project.ConfigurationNames.Add(dlg.NewName, dlg.CopyFrom); } } InitList(); } } }