private void configBox_SelectedIndexChanged(object sender, EventArgs e) { if (_currentConfig != null && !_currentConfig.Equals(_project.BuildSystem.BuildConfigs[_currentIndex])) { if (MessageBox.Show(this, "Would you like to save the current configuration?", "Save?", MessageBoxButtons.YesNo, MessageBoxIcon.None) == DialogResult.Yes) { _project.BuildSystem.BuildConfigs[_currentIndex] = _currentConfig; } } _currentIndex = configBox.SelectedIndex; _currentConfig = (BuildConfig)_project.BuildSystem.BuildConfigs[_currentIndex].Clone(); PopulateListBox(); UpdateStepOptions(); }
public void EqualsTest() { string projectFile = @"C:\Users\Test\file.wcodeproj"; string projectName = "Project"; IProject project = new Project(projectFile, projectName); string name = "Debug Config"; BuildConfig target = new BuildConfig(project, name); BuildConfig target2 = new BuildConfig(project, name); bool expected = true; bool actual = target.Equals(target2); Assert.AreEqual(expected, actual); }