private void GetFeaturedList() { var featuredListRequest = new ListCategoryMotionStoreRequest(CategoryMotionRequest.Type.FEATURE, 0, 16); featuredListRequest.ProcessSuccessfully += (reply) => Dispatcher.BeginInvoke((Action) delegate { foreach (var info in reply.list_motion.motion_short_info) { var motionItem = new MotionHorizontalItem(); motionItem.SetInfo(info); motionItem.MotionClicked += motionItem_MotionClicked; ViewModel.FeaturedMotionsList.Add(motionItem); DownloadImage(info.motion_id, info.icon_url, motionItem); } StaticMainWindow.Window.ShowContentScreen(); }); featuredListRequest.ProcessError += (reply, msg) => { Debug.Assert(false, msg); Dispatcher.BeginInvoke((Action)(() => StaticMainWindow.Window.ShowErrorScreen())); }; //featuredListRequest.SuccesfullyEvent += OnFeaturedListRequestOnProcessSuccessfully; GlobalVariables.StoreWorker.ForceAddRequest(featuredListRequest); }
private void GetHotList() { var hotListRequest = new ListCategoryMotionStoreRequest(CategoryMotionRequest.Type.TOPRATED, 0, 15); hotListRequest.ProcessSuccessfully += (reply) => Dispatcher.BeginInvoke((Action) delegate { foreach (var info in reply.list_motion.motion_short_info) { var motionItem = new MotionHorizontalItem(); motionItem.SetInfo(info); motionItem.MotionClicked += motionItem_MotionClicked; ViewModel.HotMotionsList.Add(motionItem); DownloadImage(info.motion_id, info.icon_url, motionItem); } //hotListRequest.ProcessSuccessfully-= }); hotListRequest.ProcessError += (reply, msg) => { Debug.Assert(false, msg); Dispatcher.BeginInvoke((Action)(() => StaticMainWindow.Window.ShowErrorScreen())); }; GlobalVariables.StoreWorker.ForceAddRequest(hotListRequest); }
private void GetHotList() { var hotListRequest = new ListCategoryMotionStoreRequest(CategoryMotionRequest.Type.TOPRATED, 0, 15); hotListRequest.ProcessSuccessfully += (reply) => Dispatcher.BeginInvoke((Action)delegate { foreach (var info in reply.list_motion.motion_short_info) { var motionItem = new MotionHorizontalItem(); motionItem.SetInfo(info); motionItem.MotionClicked += motionItem_MotionClicked; ViewModel.HotMotionsList.Add(motionItem); DownloadImage(info.motion_id, info.icon_url, motionItem); } //hotListRequest.ProcessSuccessfully-= }); hotListRequest.ProcessError += (reply, msg) => { Debug.Assert(false, msg); Dispatcher.BeginInvoke((Action)(() => StaticMainWindow.Window.ShowErrorScreen())); }; GlobalVariables.StoreWorker.ForceAddRequest(hotListRequest); }
private void GetFeaturedList() { var featuredListRequest = new ListCategoryMotionStoreRequest(CategoryMotionRequest.Type.FEATURE, 0, 16); featuredListRequest.ProcessSuccessfully += (reply) => Dispatcher.BeginInvoke((Action)delegate { foreach (var info in reply.list_motion.motion_short_info) { var motionItem = new MotionHorizontalItem(); motionItem.SetInfo(info); motionItem.MotionClicked += motionItem_MotionClicked; ViewModel.FeaturedMotionsList.Add(motionItem); DownloadImage(info.motion_id, info.icon_url, motionItem); } StaticMainWindow.Window.ShowContentScreen(); }); featuredListRequest.ProcessError += (reply, msg) => { Debug.Assert(false, msg); Dispatcher.BeginInvoke((Action)(() => StaticMainWindow.Window.ShowErrorScreen())); }; //featuredListRequest.SuccesfullyEvent += OnFeaturedListRequestOnProcessSuccessfully; GlobalVariables.StoreWorker.ForceAddRequest(featuredListRequest); }