Esempio n. 1
0
        public App()
        {
            InitializeComponent();
            MainEvents = new EventEntriesMain();
            MyEvents   = new MyEventEntries();



            InteractivePage            = new InteractiveSchedulePage(MainEvents, MyEvents, MyPage);
            MyPage                     = new MySchedulePage(MyEvents, InteractivePage);
            InteractivePage.mySchudule = MyPage;

            Task.Factory.StartNew(() => {
                return(MainEvents.refreshData(saveLoad.loadDatabaseFromFile()));
            })
            .ContinueWith(task =>
            {
                InteractivePage.refresh();
                refreshInteractivePage(task.Result);
            }, TaskScheduler.FromCurrentSynchronizationContext());

            Task.Factory.StartNew(() => { updateMyEvents(); }).ContinueWith(task =>
            {
                MyPage.refresh();
            }, TaskScheduler.FromCurrentSynchronizationContext());


            MyPage.Title          = "Personal";
            InteractivePage.Title = "Main";
            var nav = new NavigationPage();

            var tab = new TabbedPage
            {
                Padding  = 0,
                Children =
                {
                    InteractivePage,
                    MyPage,
                    new MapPage(),
                    new InfoPage()
                }
            };

            var passwordPage = new Password(tab);

            passwordPage.Start(tab);
            NavigationPage.SetHasNavigationBar(tab, false);
            NavigationPage.SetHasBackButton(tab, false);

            //Preload about image
            ImageService.Instance.LoadUrl(AppResources.aboutPicture).Preload();
            //Preload the default image
            ImageService.Instance.LoadUrl(AppResources.defaultPicture).Preload();
        }
Esempio n. 2
0
        public MySchedulePage(MyEventEntries _MyEvents, InteractiveSchedulePage _interactiveSchedule = null)
        {
            InitializeComponent();

            interactiveSchedule = _interactiveSchedule;

            MyEvents = _MyEvents;

            this.Padding = GetPagePadding();

            lvForEvents = new SchedListView(MyEvents.Events);
            lvForEvents.ItemSelected += PopUpWithData;

            refresh();
        }