private void buttonAdd_Click(object sender, EventArgs e) { FormConfigurationName formGetName = new FormConfigurationName(); string configName = formGetName.GetConfigName(this); if (String.IsNullOrEmpty(configName)) { return; } ClassFormConfig.SaveNewConfiguration(configName); ShowConfigurations(); }
private void buttonRename_Click(object sender, EventArgs e) { if (listBoxConfigs.SelectedIndex < 0) { return; } FormConfigurationName formGetName = new FormConfigurationName(); string configName = formGetName.GetConfigName(this, (string)listBoxConfigs.SelectedItem); if (String.IsNullOrEmpty(configName)) { return; } if (ClassFormConfig.RenameConfiguration((string)listBoxConfigs.SelectedItem, configName)) { ShowConfigurations(configName); } }