private void clearToolStripMenuItem_Click(object sender, EventArgs e) { BaseIncrementSettings selectedIncrementSettings = this.SelectedIncrementSettings; if (selectedIncrementSettings != null) { DialogResult dialogResult = MessageBox.Show(this, "Reset the increment settings of \"" + this.solutionTreeView.SelectedNode.Text + "\" to the defaults?", "Reset settings", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.Yes) { Logger.Write("Resetting increment settings of \"" + this.solutionTreeView.SelectedNode.Text + "\"", LogLevel.Debug); selectedIncrementSettings.Reset(); this.propertyGrid.Refresh(); } } }
private void clearToolStripMenuItem_Click(object sender, EventArgs e) { BaseIncrementSettings toReset = SelectedIncrementSettings; if (toReset != null) { DialogResult r = MessageBox.Show(this, "Reset the increment settings of \"" + solutionTreeView.SelectedNode.Text + "\" to the defaults?", "Reset settings", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (r == System.Windows.Forms.DialogResult.Yes) { Logger.Write("Resetting increment settings of \"" + solutionTreeView.SelectedNode.Text + "\"", LogLevel.Debug); toReset.Reset(); propertyGrid.Refresh(); } } }