예제 #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();
        }
예제 #2
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();
        }
예제 #3
0
 public WeatherEngine(IWeatherConnection weatherConnection, IMapper mapper, ICityRepository cityRepository)
 {
     this._cityRepository    = cityRepository;
     this._weatherConnection = weatherConnection;
     _mapper = mapper;
 }