Ejemplo n.º 1
0
        private async Task Initialize()
        {
            try
            {
                //LuoVols = await _dataService.GetVolList();
                //var item = await _dataService.GetData();

                HeartVM = new HeartViewModel();
                await HeartVM.RestoreListAsync();

                //DataVM = new VolDataViewModel(this, new VolService(Request.GetAllVol_w, NormalFactory, CtsFactory));

                LuoVolTags = LuoVolFactory.GetVolTagList();
                LuoVolNums = LuoVolFactory.GetVolNumList();

                DataVM = new VolDataViewModel(this,
                                              new VolService(Request.GetNumVol_w(LuoVolNums[_currentNumIndex].KeySrc), NormalFactory, CtsFactory));

                DataVM.RefreshAsync();

                TagDataVM = new VolDataViewModel(this,
                                                 new VolService(Request.GetTagVol_w(LuoVolTags[_currentTagIndex].Name), NormalFactory, CtsFactory));

                TagDataVM.RefreshAsync();

                SetPlayerCookie();

                var timer = new DispatcherTimer();
                timer.Interval = new TimeSpan(0, 0, 6);
                timer.Tick    += Timer_Tick;
                timer.Start();
            }
            catch (Exception ex)
            {
                // Report error here
            }
        }
Ejemplo n.º 2
0
 public VolService(string url, LuoVolFactory factory,
                   CancellationTokenSourceFactory ctsFactory) : base(factory, ctsFactory)
 {
     RequestUrl = url;
 }
Ejemplo n.º 3
0
 public Task <ObservableCollection <LuoVol> > GetVolList()
 {
     return(LuoVolFactory.getlist());
 }