btnAdd_Click
(
object sender,
EventArgs e
)
{
AssertValid();
// Let the user edit a new TopNByMetricUserSettings object.
TopNByMetricUserSettings oTopNByMetricUserSettings =
new TopNByMetricUserSettings();
if ( TryEditTopNByMetricUserSettings(oTopNByMetricUserSettings) )
{
// Add the new object to the List and the ListBox, then select the
// object in the ListBox.
m_oTopNByMetricUserSettingsClone.Add(oTopNByMetricUserSettings);
DoDataExchange(false);
lbxTopNByMetricUserSettings.SelectedIndex =
lbxTopNByMetricUserSettings.Items.Count - 1;
}
}