Пример #1
0
		void HandleTodaysMenuCompleted (object sender, TodaysMenuCompletedEventArgs args)
		{
			InvokeOnMainThread (delegate	{
				if (Util.IsAsynchCompletedError (args, "TodaysMenu")) {
					//Util.PopNetworkActive ();
					_hud.StopAnimating ();
					//_hud.Hide (true);
					this.NavigationItem.RightBarButtonItem.Enabled = true;
					return;
				}
				try {
					DishesOfTheDay result = args.Result;
					this.tblTageskarte.Source = new TableSource (result.DishOfTheDay.ToList ());
					this.tblTageskarte.ReloadData ();
				} catch (Exception ex) {
					using (UIAlertView alert = new UIAlertView("TodaysMenuCompleted",ex.Message,null,"OK",null)) {
						alert.Show ();
					}
				} finally {
					//Util.PopNetworkActive ();
					this.NavigationItem.RightBarButtonItem.Enabled = true;
					
					_hud.StopAnimating ();
					//_hud.Hide (true);
					//_hud.RemoveFromSuperview ();
					//_hud = null;
				}
			});
		}
Пример #2
0
		private void HandleTodaysMenuCompleted (object sender, TodaysMenuCompletedEventArgs args)
		{
			bool error = ServiceAgent.HandleAsynchCompletedError (args, "GetEvents");
			InvokeOnMainThread (delegate	{
				Busy = false;
				if (error)
					return;
				
				DishesOfTheDay result = args.Result;
				BindDishes (result);
			});
		}