コード例 #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            var display = WindowManager.DefaultDisplay;

            horiPager = new HorizontalPager(this.ApplicationContext, display);
            TextView test = new TextView(this);

            test.Text = "Laden...";

            horiPager.AddView(test);
            SetContentView(horiPager);

            var _loadedTimetable = ApplicationSettings.Instance.Persistency.Load <Timetable>(new Timetable()
            {
                Username = ApplicationSettings.Instance.UserCredentials.Name
            });

            if (_loadedTimetable != null && _loadedTimetable.TimetableDays.Count > 0)
            {
                displayTimetable(_loadedTimetable);
            }
            else
            {
                DomainLibraryHelper.GetUserTimetable(ApplicationSettings.Instance.UserCredentials, TimetableCallback);
            }
        }
コード例 #2
0
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case 1:
                DomainLibraryHelper.GetUserTimetable(ApplicationSettings.Instance.UserCredentials, TimetableCallback);
                return(true);

            case 2:
                Finish();
                return(true);

            default:
                return(base.OnOptionsItemSelected(item));
            }
        }