protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var display = WindowManager.DefaultDisplay; horiPager = new HorizontalPager(this.ApplicationContext, display); SetContentView(horiPager); TextView test = new TextView(this); test.Text = "Laden..."; horiPager.AddView(test); var _loadedLuchtable = ApplicationSettings.Instance.Persistency.Load <Lunchtable>(); if (_loadedLuchtable != null && _loadedLuchtable.LunchDays.Count > 0) { var cal = CultureInfo.CurrentCulture.Calendar; int db = cal.GetWeekOfYear(_loadedLuchtable.LastUpdated, DateTimeFormatInfo.CurrentInfo.CalendarWeekRule, DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek); int act = cal.GetWeekOfYear(System.DateTime.Today, DateTimeFormatInfo.CurrentInfo.CalendarWeekRule, DateTimeFormatInfo.CurrentInfo.FirstDayOfWeek); if (act <= db) { addLunchtable(_loadedLuchtable); DomainLibraryHelper.GetUserBadgeInformation(ApplicationSettings.Instance.UserCredentials, badgeInfoCallback); return; } } DomainLibraryHelper.GetLunchtable(lunchtableCallback); DomainLibraryHelper.GetUserBadgeInformation(ApplicationSettings.Instance.UserCredentials, badgeInfoCallback); }
public override bool OnOptionsItemSelected(IMenuItem item) { switch (item.ItemId) { case 1: DomainLibraryHelper.GetLunchtable(lunchtableCallback); DomainLibraryHelper.GetUserBadgeInformation(ApplicationSettings.Instance.UserCredentials, badgeInfoCallback); return(true); case 2: Finish(); return(true); default: return(base.OnOptionsItemSelected(item)); } }