Ejemplo n.º 1
0
 public void GetWeatherForcast(Action<List<WeatherModel>> callback, String location, String country)
 {
     ViewCallback = callback;
     WeatherRepository weatherRep = new WeatherRepository();
     GetWeatherForcastCallback handler = new GetWeatherForcastCallback(GetWeatherForcastCompleted);
     weatherRep.GetWeatherForcast(new Action<List<WeatherModel>>(handler), location, country);
 }
Ejemplo n.º 2
0
 private void loadWeatherBtn_Click(object sender, RoutedEventArgs e)
 {
     String location = locationTxt.Text;
     String country = countryTxt.Text;
     WeatherModel weatherModel = new WeatherModel();
     GetWeatherForcastCallback handler = new GetWeatherForcastCallback(GetWeatherForcastCompleted);
     weatherModel.GetWeatherForcast(new Action<List<WeatherModel>>(handler), location, country);
 }