示例#1
0
        public void UpdateWeatherInfo()
        {
            CityWeather cityWeather        = new CityWeather();
            var         weatherDataManager = new WeatherDataManager();

            string[] allCities = weatherDataManager.GetAllCities();
            foreach (string c in allCities)
            {
                Thread.Sleep(1000); // sleep 1s to avoid throttle
                this.QueryOpenWeatherAndUpdateTable(cityWeather, weatherDataManager, c);
            }
        }
示例#2
0
        public string[] GetAllCities()
        {
            var weatherDataManager = new WeatherDataManager();

            return(weatherDataManager.GetAllCities());
        }