private void AddConfigurationButton_Click(object sender, RoutedEventArgs e) { AppConfiguration configuration = new AppConfiguration(); ConfigurationEditForm configurationEditForm = new ConfigurationEditForm(); configurationEditForm.BindControls(configuration); if (configurationEditForm.ShowDialog(this, "Add Configuration") == true) { AppConfigurations.Add(configuration); ConfigurationsManager configurationsManager = new ConfigurationsManager(); ConnectorExplorerState connectorExplorerState = new ConnectorExplorerState(); configurationsManager.SaveExplorerState(configuration, connectorExplorerState); RefreshAppConfigurationsListBox(); } }