Beispiel #1
0
        private async void Refresh()
        {
            this.loadingControl.IsLoading = true;
            this.Danmus.Clear();
            var ids = await NetworkGet.GetMyDanmus();

            foreach (int id in ids)
            {
                var dan = new FullDanmu(id);
                await NetworkGet.GetFullDanmuContent(dan);

                this.Danmus.Add(dan);
            }
            this.loadingControl.IsLoading = false;
        }
Beispiel #2
0
        public static async Task GetFullDanmuContent(FullDanmu danmu)
        {
            var query = new QueryObject("GetFullDanmuContent")
            {
                DanmuId = danmu.ID
            };

            if (Storage.Test)
            {
                danmu.Content  = "6666666666666666";
                danmu.BookName = "松浦彌太郎說:假如我現在25歲,最想做的50件事";
                danmu.EditTime = DateTime.Now;
                danmu.PageNum  = 102;
                return;
            }

            var recv = await Connection.SendAndReceive.GlobalLock(query);

            danmu.Content  = recv.Content;
            danmu.BookName = recv.BookName;
            danmu.EditTime = recv.TimeStap.Value.GetTime();
            danmu.PageNum  = recv.PageNum.Value;
        }