private void RaiseCountryCreatedEvent(string countryName)
        {
            var handler = CountryCreated;

            if (handler != null)
            {
                CountryEventArgs e = new CountryEventArgs(countryName);
                handler(this, e);
            }
        }
        private void OnGotUserCountry(object sender, CountryEventArgs args)
        {
            Country country = null;

            foreach (var c in CountryUtils.CountriesSource)
            {
                if (string.Equals(c.Code, args.Country, StringComparison.OrdinalIgnoreCase))
                {
                    country = c;
                    break;
                }
            }

            if (country != null && SelectedCountry == null && string.IsNullOrEmpty(PhoneNumber))
            {
                OnCountrySelected(country);
            }
        }
Example #3
0
        private void GotUserCountry(object sender, CountryEventArgs e)
        {
            Country country = null;

            foreach (var local in Country.Countries)
            {
                if (string.Equals(local.Code, e.Country, StringComparison.OrdinalIgnoreCase))
                {
                    country = local;
                    break;
                }
            }

            if (country != null && SelectedCountry == null && string.IsNullOrEmpty(PhoneNumber))
            {
                Execute.BeginOnUIThread(() =>
                {
                    SelectedCountry = country;
                });
            }
        }