/// <summary> /// Get the edited configuration. /// </summary> /// <returns>The edited configuration.</returns> public ClusterConfiguration GetConfiguration() { var type = (ClusterConfiguration.ClusterType)Enum.Parse(typeof(ClusterConfiguration.ClusterType), this.comboBox_clusterType.Text); ClusterConfigurationSerialization ser = new ClusterConfigurationSerialization { Name = this.textBox_name.Text, Type = type, Properties = new List <PropertySetting>() }; foreach (var ctrl in this.propEditor) { ser.Properties.Add(new PropertySetting(ctrl.Key, ctrl.Value.Text)); } ClusterConfiguration result = ser.Create(); string error = result.Initialize(); if (error == null) { return(result); } else { MessageBox.Show("Error while initializing cluster configuration: " + error); return(null); } }