private void GetData(Program plugin, string importProjectPath) { importVarSettings = new VariableDataSet(); importVarSettings.ReadXml(plugin.getSettingsFile(importProjectPath)); plugin.fixVariablesDecimalSeparator(importVarSettings); importVarSettings.AcceptChanges(); masterVarSettings = plugin.settingsData; }
internal static void RemoveCountryReferences(VariableDataSet dataSet, List <string> countries) { // for the advanced and derived variables and for the country-specific names of basic variables // countries are stored in a column as string (AT,XX,CY,UK) // in this case the string is either changed (AT,CY,UK) or the row removed if only relevant for the country/ies to remove RemoveCountriesFromColumn(dataSet.Cur_BasicCountrySpecificDetail, countries); RemoveCountriesFromColumn(dataSet.Cur_AdvancedVariables, countries); RemoveCountriesFromColumn(dataSet.Cur_DerivedVariables, countries); // for advanced country specific variables there is one row for each country List <VariableDataSet.Cur_AdvancedCountrySpecificDetailRow> delRows = new List <VariableDataSet.Cur_AdvancedCountrySpecificDetailRow>(); foreach (VariableDataSet.Cur_AdvancedCountrySpecificDetailRow row in dataSet.Cur_AdvancedCountrySpecificDetail) { if (countries.Contains(row.Country.ToUpper().Trim())) { delRows.Add(row); } } foreach (VariableDataSet.Cur_AdvancedCountrySpecificDetailRow delRow in delRows) { delRow.Delete(); } }