public void UpdateWeather(WeatherInfo weatherInfo)
		{
			InvokeOnMainThread (() =>
			{
				this.labelTemp.Text = weatherInfo.GetTempInCelsius().ToString() + "°";
				this.labelLocation.Text = weatherInfo.name;
			});
		}
 public void UpdateWeather(WeatherInfo weatherInfo)
 {
     InvokeOnMainThread(() =>
     {
         this.labelTemp.Text     = weatherInfo.GetTempInCelsius().ToString() + "°";
         this.labelLocation.Text = weatherInfo.name;
     });
 }
		void CacheWeatherAsync(WeatherInfo weatherInfo)
		{
			var file = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.Personal), "weather.json");

			File.WriteAllText(file, JsonConvert.SerializeObject (weatherInfo));	
		}
Ejemplo n.º 4
0
        void CacheWeatherAsync(WeatherInfo weatherInfo)
        {
            var file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "weather.json");

            File.WriteAllText(file, JsonConvert.SerializeObject(weatherInfo));
        }