Esempio n. 1
0
        public MainViewModel()
        {
            _weatherConnection = new OpenWeatherConnection();
            if (_weatherConnection.City == null)
            {
                _weatherConnection.City = "New York";
            }

            WeatherData = _weatherConnection.GetWeatherData();
            ForecastPartialViewModel = new ForecastPartialViewModel(_weatherConnection.GetDateWeatherData(), () => { OnPropertyChanged("ForecastPartialViewModel"); });
            OnPropertyChanged("");

            timerConfiguration();
        }
Esempio n. 2
0
 void getForecastData()
 {
     ForecastPartialViewModel = new ForecastPartialViewModel(
         _weatherConnection.GetDateWeatherData(),
         () =>
         {
             OnPropertyChanged("ForecastPartialViewModel");
         });
 }