コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: elainte/cnblogs-UAP
        private async void LoadData()
        {
            // hide splash screen after 2 seconds
            ThreadPoolTimer.CreateTimer(SplashTimeOut, new TimeSpan(0, 0, 2));

            this.recentDS = new LatestPostsDS();
            this.recentDS.DataRequestError    += recentDS_DataRequestError;
            this.recentDS.OnLoadMoreCompleted += recentDS_OnLoadMoreCompleted;
            this.lv_HomePosts.ItemsSource      = this.recentDS;
            this.tb_HomeTag.DataContext        = this.recentDS;

            this.topViewDS = new DataHelper.CloudAPI.TwoDaysTopViewPostsDS();
            this.topViewDS.DataRequestError += recentDS_DataRequestError;
            this.lv_HotPosts.ItemsSource     = this.topViewDS;
            this.tb_HotTag.DataContext       = this.topViewDS;

            this.topLikeDS = new TenDaysTopLikePostsDS();
            this.topLikeDS.DataRequestError += recentDS_DataRequestError;
            this.lv_BestPosts.ItemsSource    = this.topLikeDS;
            this.tb_BestTag.DataContext      = this.topLikeDS;

            this.topBloggerDS = new RecommendBloggerDS();
            this.topBloggerDS.DataRequestError += recentDS_DataRequestError;
            this.lv_Bloggers.ItemsSource        = this.topBloggerDS.Bloggers;
            await topBloggerDS.LoadRemoteData();

            this.newsDs = new NewsDS();
            this.newsDs.DataRequestError += recentDS_DataRequestError;
            this.lv_News.ItemsSource      = this.newsDs;
            this.tb_NewsTag.DataContext   = this.newsDs;
        }
コード例 #2
0
        private async void LoadData()
        {
            this.topBloggerDS            = new RecommendBloggerDS();
            this.gv_Bloggers.ItemsSource = this.topBloggerDS.Bloggers;
            await topBloggerDS.LoadRemoteData();

            this.DataContext = this.topBloggerDS.Bloggers;
        }
コード例 #3
0
        private async void LoadData()
        {
            this.topBloggerDS            = new RecommendBloggerDS();
            this.gv_Bloggers.ItemsSource = this.topBloggerDS.Bloggers;
            TitleControl.DS_OnLoadMoreStarted(0);
            await topBloggerDS.LoadRemoteData();

            TitleControl.DS_OnLoadMoreCompleted(0);
            this.DataContext = this.topBloggerDS.Bloggers;
        }
コード例 #4
0
        private async void LoadData()
        {
            FunctionHelper.Functions.RefreshUIOnDataLoading(this.pb_Top, this.appbar);

            this.topBloggerDS            = new RecommendBloggerDS();
            this.lv_Bloggers.ItemsSource = this.topBloggerDS.Bloggers;
            await topBloggerDS.LoadRemoteData();

            this.control_PageTitle.SubTitleContent = this.topBloggerDS.Bloggers.Count.ToString();

            FunctionHelper.Functions.RefreshUIOnDataLoaded(this.pb_Top, this.appbar);
        }