private void WriteToXML() { configController.SetValue("amplitude", txtAmplitude.Text); configController.SetValue("frequency", txtFrequency.Text); configController.SetValue("radiusPEC", txtRadius.Text); configController.SetValue("thicknessTO", txtThickness.Text); configController.SetValue("materialTO", cmbMaterialTO.SelectedItem as string); configController.SetValue("materialPEC", cmbMaterialPEC.SelectedItem as string); MessageBox.Show("Data recorded"); }