Exemple #1
0
        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;
        }
Exemple #2
0
 private void LoadData()
 {
     this.topViewDS = new TwoDaysTopViewPostsDS();
     this.topViewDS.OnLoadMoreStarted   += TitleControl.DS_OnLoadMoreStarted;
     this.topViewDS.OnLoadMoreCompleted += TitleControl.DS_OnLoadMoreCompleted;
     this.gv_HotPosts.ItemsSource        = this.topViewDS;
     this.gv_SimplePosts.ItemsSource     = this.topViewDS;
     this.DataContext = this.topViewDS;
 }
Exemple #3
0
        private async void LoadData()
        {
            //FunctionHelper.Functions.RefreshUIOnDataLoading(this.pb_Top, this.appbar);

            this.hotPostsDS = new DataHelper.CloudAPI.TwoDaysTopViewPostsDS();
            this.hotPostsDS.OnLoadMoreStarted   += hotPostsDS_OnLoadMoreStarted;
            this.hotPostsDS.OnLoadMoreCompleted += hotPostsDS_OnLoadMoreCompleted;
            this.lv_HotPosts.ItemsSource         = this.hotPostsDS;
            await this.hotPostsDS.LoadMoreItemsAsync(20);

            //FunctionHelper.Functions.RefreshUIOnDataLoaded(this.pb_Top, this.appbar);
        }
 private void LoadData()
 {
     this.topViewDS = new TwoDaysTopViewPostsDS();
     this.gv_HotPosts.ItemsSource = this.topViewDS;
     this.DataContext             = this.topViewDS;
 }