コード例 #1
0
ファイル: MotherViewModel.cs プロジェクト: balrajg/ipa-master
        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);
            });
        }
コード例 #2
0
ファイル: MotherViewModel.cs プロジェクト: balrajg/ipa-master
        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);
            });
        }
コード例 #3
0
ファイル: MotherViewModel.cs プロジェクト: balrajg/ipa-master
        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);
            });
        }
コード例 #4
0
        protected override void OnAppearing()
        {
            base.OnAppearing();
            SettingViewModel vm = (SettingViewModel)this.BindingContext;

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