Ejemplo n.º 1
0
		public void reloadDashBoard(object obj){
			this.RunOnUiThread (() => {
				if(AlertActivity.eventActivity == null || BookingRequestsActivity.bookingActivity == null || ConfirmedRequestsActivity.confirmedActivity == null || PastBookingActivity.pastBookingActivity == null){
					if(getNumBooking == null){
						getNumBooking = new GetNumberBooking(this);
						getNumBooking.actionGetNumBooking = this;
					}
					getNumBooking.getNumBookingRequest();

					if(AlertActivity.eventActivity != null)
						AlertActivity.setDataToListView ();
					if(BookingRequestsActivity.bookingActivity != null)
						BookingRequestsActivity.setDataToListView();
					if(ConfirmedRequestsActivity.confirmedActivity != null)
						ConfirmedRequestsActivity.setDataToListView ();
					if(PastBookingActivity.pastBookingActivity != null)
						PastBookingActivity.setDataToListView ();
				} else {
					AlertActivity.setDataToListView ();
					BookingRequestsActivity.setDataToListView();
					ConfirmedRequestsActivity.setDataToListView ();
					PastBookingActivity.setDataToListView ();
				}
			});
		}
Ejemplo n.º 2
0
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.home_dashboard);

			LocalActivityManager localActMgr = new LocalActivityManager (this, false);
			localActMgr.DispatchCreate (bundle);
			tabHost = FindViewById<TabHost> (Resource.Id.tabhost);
			tabHost.Setup (localActMgr);

			MApplication.getInstance().userDashboardType = (int)Constants.LISTTYPE.ALERTS;
			CreateTab(typeof(AlertActivity), "alerts", GetString(Resource.String.alerts_title), Resource.Drawable.ic_tab_alerts, 0);
			CreateTab(typeof(BookingRequestsActivity), "bookingrequests", GetString(Resource.String.booking_requests_title), Resource.Drawable.ic_tab_bookingrequests, 1);
			CreateTab(typeof(ConfirmedRequestsActivity), "confirmedbookings", GetString(Resource.String.confirmed_booking_title), Resource.Drawable.ic_tab_confirmedbookings, 2);
			CreateTab(typeof(PastBookingActivity), "pastbookings", GetString(Resource.String.past_booking_title), Resource.Drawable.ic_tab_pasthistory, 3);

			getNumBooking = new GetNumberBooking (this);
			getNumBooking.actionGetNumBooking = this;
			getNumBooking.getNumBookingRequest ();

			homeDashBoardActivity = this;
			popupNoticeAlert = new PopupNoticeInfomation (this);
			popupNoticeAlert.noticeDelegate = this;

			popupNoticeRequest = new PopupNoticeInfomation (this);
			popupNoticeRequest.noticeDelegate = this;

			popupNoticeConfirm = new PopupNoticeInfomation (this);
			popupNoticeConfirm.noticeDelegate = this;

			popupNoticePast = new PopupNoticeInfomation (this);
			popupNoticePast.noticeDelegate = this;

			TCNotificationCenter.defaultCenter.addObserver (this, Constants.kPostNotifyAlertChange, new TCSelector (reloadDashBoard));
		}