//Download pages and tags info
        async Task FetchLOData(int lo_id, bool images)
        {
            int LOID = lo_id;

            var list = await _mLearningService.GetPagesByLO(LOID);



            if (images)
            {
                IncrementalDownload _manager = new IncrementalDownload();
                await _manager.TryLoadByteVector <Page>(0, list
                                                        , (pos, bytes) =>
                {
                }
                                                        , (page) =>
                {
                    return(page.url_img);
                });
            }



            var tags = await _mLearningService.GetTagsByLO(LOID);


            //Download xmls

            //foreach (var item in list)
            //{

            //    await _mLearningService.OpenLOPage(item.url_xml);
            //}
        }
        public MainViewModel(IMLearningService mlearningService)
        {
            _mLearningService      = mlearningService;
            _locover_manager       = new IncrementalDownload();
            _user_image_manager    = new IncrementalDownload();
            _post_image_manager    = new IncrementalDownload();
            _comment_image_manager = new IncrementalDownload();

            //async call
            LoadUserInfo();

            UserID = SessionService.GetUserId();

            CircleID            = Constants.NoSelection;
            CurrentLOIDSelected = Constants.NoSelection;
            LoadCircles();

            if (this.CirclesList.Count > 0)
            {
                LoadLearningObjects(0);
            }

            NotificationHandler.Properties.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Global_PropertyChanged);

            PropertyChanged += MainViewModel_PropertyChanged;
        }
Beispiel #3
0
        async Task UpdatePagesImages(int index, ObservableCollection <page_wrapper> list)
        {
            IncrementalDownload _manager = new IncrementalDownload();;

            _manager.TryLoadByteVector <page_wrapper>(index, list.ToList()
                                                      , (pos, bytes) =>
            {
                list[pos].cover_bytes = bytes;
            }
                                                      , (page) =>
            {
                return(page.page.url_img);
            });
        }
Beispiel #4
0
        public MainViewModel(IMLearningService mlearningService)
        {
            _mLearningService = mlearningService;
            _locover_manager = new IncrementalDownload();
            _user_image_manager = new IncrementalDownload();
            _post_image_manager= new IncrementalDownload();
            _comment_image_manager = new IncrementalDownload(); 

            //async call
            LoadUserInfo();

            UserID = SessionService.GetUserId();

            CircleID = CoolBeans.Configure.Constants.NoSelection;
            CurrentLOIDSelected = CoolBeans.Configure.Constants.NoSelection;
            LoadCircles();


            NotificationHandler.Properties.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Global_PropertyChanged);

            PropertyChanged += MainViewModel_PropertyChanged;
        }
Beispiel #5
0
		async Task UpdatePagesImages(int index,ObservableCollection<page_wrapper> list)
		{


			IncrementalDownload _manager = new IncrementalDownload(); ;

			_manager.TryLoadByteVector<page_wrapper>(index, list.ToList()
				, (pos, bytes) =>
				{
					list[pos].cover_bytes = bytes;
				}
				, (page) =>
				{
					return page.page.url_img;
				});


		}
Beispiel #6
0
        //Download pages and tags info
        async Task FetchLOData(int lo_id,bool images)
        {
            int LOID = lo_id;

            var list = await _mLearningService.GetPagesByLO(LOID);

            

            if (images)
            {
                IncrementalDownload _manager = new IncrementalDownload();
                await _manager.TryLoadByteVector<Page>(0, list
                     , (pos, bytes) =>
                     {
                     }
                     , (page) =>
                     {
                         return page.url_img;
                     });

            }
            


            var tags = await _mLearningService.GetTagsByLO(LOID);


            //Download xmls

            //foreach (var item in list)
            //{

            //    await _mLearningService.OpenLOPage(item.url_xml);
            //}
        }