Exemplo n.º 1
0
        public async void Initialize()
        {
            IsActive = true;
            Status   = "更新中";
            NowLiveList.Clear();

            var list = await NotifyInstance.GetLiveInformationAsync();

            if (list != null)
            {
                foreach (var entry in list)
                {
                    NowLiveList.Add(new LiveNotifyEntryViewModel(entry));
                }

                Badge = list.Count;
            }
            else
            {
                Badge = null;
            }

            IsActive = false;
            Status   = "";
        }
Exemplo n.º 2
0
        public void  Refresh()
        {
            Task.Run(() => {
                IsActive = true;
                Status   = "更新中";
                NowLiveList.Clear();

                var list = LiveInstance.GetLiveInformation();

                if (list != null)
                {
                    foreach (var entry in list)
                    {
                        NowLiveList.Add(entry);
                    }

                    Badge = list.Count;
                }
                else
                {
                    Badge = null;
                }

                IsActive = false;
                Status   = "";
            });
        }