Пример #1
0
 public void SelectItem(CountryListItem country)
 {
     if (country == null)
     {
         return;
     }
     foreach (CountryListItem country1 in this.Countries)
     {
         int num = country1.Id == country.Id ? 1 : 0;
         country1.IsSelected = num != 0;
     }
 }
Пример #2
0
 public void SelectItem(CountryListItem country)
 {
     if (country == null)
     {
         return;
     }
     List <CountryListItem> .Enumerator enumerator = this.Countries.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             CountryListItem current = enumerator.Current;
             int             num     = current.Id == country.Id ? 1 : 0;
             current.IsSelected = num != 0;
         }
     }
     finally
     {
         enumerator.Dispose();
     }
 }
Пример #3
0
 private void UpdateSelectedItem()
 {
     if (this._selectedCountry == null)
     {
         return;
     }
     List <CountryListItem> .Enumerator enumerator = this.Countries.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             CountryListItem current = enumerator.Current;
             int             num     = current.Id == this._selectedCountry.id ? 1 : 0;
             current.IsSelected = num != 0;
         }
     }
     finally
     {
         enumerator.Dispose();
     }
 }