Esempio n. 1
0
        private void ReadSetting()
        {
            List <CityInfo> settingList = null;

            try
            {
                settingList = SettingManager.GetAddedCity();
            }
            catch (Exception)
            {
                return;
            }
            foreach (var item in settingList)
            {
                AddCity(item);
            }
        }
Esempio n. 2
0
 private void ReadSetting()
 {
     try
     {
         AddedCity = new ObservableCollection <CityInfo>(SettingManager.GetAddedCity());
         TileCity  = SettingManager.GetTileCity();
     }
     catch (Exception)
     {
         AddedCity = new ObservableCollection <CityInfo>();
     }
     finally
     {
         AddedCity.Add(new CityInfo {
             City = "自动定位"
         });
     }
 }