MonoMobile.Forms.FormDialogViewController.Reload C# (CSharp) Method

Reload() public method

public Reload ( ) : void
return void
		public void Reload(){
			PrepareRoot(new RootElement(Title));
			ReloadData();
			_processFile(Url, null);
		}
		

Same methods

FormDialogViewController::Reload ( Element el ) : void

Usage Example

		public override void Execute (FormDialogViewController controller, Element element, Action completed)
		{
			controller.SetValue("temperature", "");
			controller.SetValue("humidity", "");
			controller.SetValue("windspeed", "");
			
			var request = new NSMutableUrlRequest(new NSUrl("http://ws.geonames.org/weatherIcaoJSON?ICAO=KORD"), NSUrlRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData, 10);
			
			new UrlConnection("weather", request, (result)=>{
				var json = JsonObject.Parse(result);
				var weather = json["weatherObservation"];
				
				controller.SetValue("temperature", weather["temperature"].CleanString()+ " celsius");
				controller.SetValue("humidity", weather["humidity"].CleanString() + "%");
				controller.SetValue("windspeed", weather["windSpeed"].CleanString()+" km/h");
				
				controller.Reload();
				completed();
				
			}, (error)=>{
				controller.NetworkFailed(error);
				completed();
			});
		}