private void AddSupportedConfigAndGoBack(ServerConfiguration config) { if (ServerConfigurationModel.IsServerConfigurationNameValid(config.Name) == false) { //TODO: Show error saying there already is a config with this name, or something return; } var configClone = config.Clone(); ServerConfigurationModel.AddServerConfiguration(configClone); OnBackButtonClicked(); }
private void OnConfigurationEditSaved() { var config = serverConfigurationEditPresenter.ServerConfigurationToEdit; if (ServerConfigurationModel.Contains(config) == false) { //TODO: Check that a config with the same name doesn't exist, or do this in input field validation in ServerConfigurationEditPresenter ServerConfigurationModel.AddServerConfiguration(config); } else { //Save changes ServerConfigurationModel.SaveServerConfigurations(); } SwitchToList(); }