/// <summary> /// Select address elements that need to be displayed per the given country /// Use properties from IAddressElementInputSelection to obtain element selection values /// </summary> /// <param name="country">Country in the form of CountryRegion code</param> public void SetElementSelection(string country) { var formatter = new AddressFormatter(ApplicationSettings.Database.LocalConnection, ApplicationSettings.Database.DATAAREAID); if (!string.IsNullOrEmpty(country)) { elementSelection = formatter.ElementSelection(country); } RefreshControlVisibility(); }
/// <summary> /// Select address elements that need to be displayed per the given country /// Use properties from IAddressElementInputSelection to obtain element selection values /// </summary> /// <param name="country">Country for which the elements are to be selected</param> public void SetElementSelection(SupportedCountryRegion country) { var formatter = new AddressFormatter(ApplicationSettings.Database.LocalConnection, ApplicationSettings.Database.DATAAREAID); string isoCode = string.Empty; isoCode = Enum.GetName(typeof(SupportedCountryRegion), country); var countryRegion = formatter.GetCountryRegion(searchISOCode: isoCode); elementSelection = formatter.ElementSelection(countryRegion); RefreshControlVisibility(); }