Пример #1
0
 private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Enum.TryParse(cbConectionType.SelectedValue.ToString(), out WPFConfig.ConnectionType connectionType);
         globalConfiguration.WPFConfig.connectionType = connectionType;
         //MessageBox.Show(globalConfiguration.WPFConfig.AppLanguage + Environment.NewLine + globalConfiguration.WPFConfig.connectionType.ToString());
         GlobalConfigReader globalConfigReader = new GlobalConfigReader();
         globalConfigReader.Save(globalConfiguration);
         MessageBox.Show("Saved");
     }
     catch (Exception ex)
     {
         MessageBox.Show("Error:" + ex.Message);
     }
 }