Beispiel #1
0
        void InitClientMode(MotherPage page, List <Course> courseList)
        {
            ClientHomePage      homePage      = new ClientHomePage();
            ClientHomeViewModel homeViewModel = new ClientHomeViewModel(courseList);

            HomeViewModel           = homeViewModel;
            homePage.BindingContext = homeViewModel;

            ClientReportPage      reportPage      = new ClientReportPage();
            ClientReportViewModel reportViewModel = new ClientReportViewModel();

            ReportViewModel           = reportViewModel;
            reportPage.BindingContext = reportViewModel;

//			ForumPage forumPage = new ForumPage ();
//			ForumListPageViewModel forumViewModel = new ForumListPageViewModel (courseList);
//			ForumViewModel = forumViewModel;
//			forumPage.BindingContext = forumViewModel;

            SettingPage      settingPage      = new SettingPage();
            SettingViewModel settingViewModel = new SettingViewModel();

            SettingViewModel           = settingViewModel;
            settingPage.BindingContext = new SettingViewModel();

            Device.BeginInvokeOnMainThread(() => {
                page.Children.Add(homePage);
                page.Children.Add(reportPage);
                //page.Children.Add (forumPage);
                page.Children.Add(settingPage);
                NavigationHandler.GlobalNavigator.Navigation.PushAsync(page, true);
            });
        }
Beispiel #2
0
        void InitPartnerMode(MotherPage page, List <Course> courseList, string courseIdToSelect = null)
        {
            PartnerHomePage      homePage      = new PartnerHomePage();
            PartnerHomeViewModel homeViewModel = new PartnerHomeViewModel(courseList, courseIdToSelect);

            HomeViewModel           = homeViewModel;
            homePage.BindingContext = homeViewModel;
            //notification for mark attendance.


            //		ForumPage forumPage = new ForumPage ();
            //		ForumListPageViewModel forumViewModel = new ForumListPageViewModel (courseList);
            //		ForumViewModel = forumViewModel;
            //		forumPage.BindingContext = forumViewModel;

            SettingPage      settingPage      = new SettingPage();
            SettingViewModel settingViewModel = new SettingViewModel();

            SettingViewModel           = settingViewModel;
            settingPage.BindingContext = new SettingViewModel();


            Device.BeginInvokeOnMainThread(() =>
            {
                page.Children.Add(homePage);
                //page.Children.Add (forumPage);
                page.Children.Add(settingPage);
                NavigationHandler.GlobalNavigator.Navigation.PushAsync(page, true);
                homeViewModel.LaunchActivity(courseIdToSelect);
            });
        }
Beispiel #3
0
        private void InitParticipantMode(MotherPage motherPage, List <Course> courseList, string courseId = null, string activityId = null)
        {
            ParticipantHomePage      homePage      = new ParticipantHomePage();
            ParticipantHomeViewModel homeViewModel = new ParticipantHomeViewModel(courseList, courseId, activityId);

            HomeViewModel           = homeViewModel;
            homePage.BindingContext = homeViewModel;

            ParticipantReportPage      reportPage      = new ParticipantReportPage();
            ParticipantReportViewModel reportViewModel = new ParticipantReportViewModel(courseList);

            ReportViewModel           = reportViewModel;
            reportPage.BindingContext = reportViewModel;

            //ForumPage forumPage = new ForumPage ();
            //ForumListPageViewModel forumViewModel = new ForumListPageViewModel (courseList);
            //ForumViewModel = forumViewModel;
            //forumPage.BindingContext = forumViewModel;

            SettingPage      settingPage      = new SettingPage();
            SettingViewModel settingViewModel = new SettingViewModel();

            SettingViewModel           = settingViewModel;
            settingPage.BindingContext = new SettingViewModel();


            Device.BeginInvokeOnMainThread(() => {
                motherPage.Children.Add(homePage);
                motherPage.Children.Add(reportPage);
                //motherPage.Children.Add (forumPage);
                motherPage.Children.Add(settingPage);
                NavigationHandler.GlobalNavigator.Navigation.PushAsync(motherPage);
            });
        }
Beispiel #4
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            SettingViewModel vm = (SettingViewModel)this.BindingContext;

            this.BindingContext = vm;
            vm.SetProfileInfo();
        }