예제 #1
0
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;

            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
                var dataSource = new Ioc.Container().Resolve<Repositories.Istarters_startersCollection>();
                AddHomeAppBarButton();
                var pinnedItem  = dataSource.GetData().FirstOrDefault(x => IsPinnedItem(x.Id.ToString(), currentId));
                if(pinnedItem==null)
                    MessageBox.Show(Localization.AppResources.PinError);
                ((IViewModels.Istarters_DetailViewModel)DataContext).CurrentstartersSchema = pinnedItem;
            }
        }
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;
			
            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
				var dataSource = new Ioc.Container().Resolve<Repositories.IEditorialFeed_EditorialFeed>();
				AddHomeAppBarButton();
				var pinnedItem  = (await dataSource.GetData()).FirstOrDefault(x => IsPinnedItem(x.Title.ToString(), currentId));
				if(pinnedItem==null)
					MessageBox.Show(Localization.AppResources.PinError);
				((IViewModels.IEditorialFeed_DetailViewModel)DataContext).CurrentRssSearchResult = pinnedItem;				
			}
		}
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;
			
            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
				var dataSource = new Ioc.Container().Resolve<Repositories.Imoviebuzz_reviewsDataSource>();
				AddHomeAppBarButton();
				var pinnedItemSpec = new FilterSpecification().AddPredicate("Title", ColumnOperatorEnum.Equals, currentId);
				var pinnedItem  = (await dataSource.Search(pinnedItemSpec)).FirstOrDefault();
				if(pinnedItem==null)
					MessageBox.Show(Localization.AppResources.PinError);
				((IViewModels.Imoviebuzz_DetailViewModel)DataContext).CurrentRssSearchResult = pinnedItem;				
			}
		}
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;

            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
                var dataSource = new Ioc.Container().Resolve<Repositories.Icostumes_suitsCollection>();
                AddHomeAppBarButton();
                var pinnedItemSpec = new FilterSpecification().AddPredicate("Id", ColumnOperatorEnum.Equals, currentId);
                var pinnedItem  = dataSource.Search(pinnedItemSpec).FirstOrDefault();
                if(pinnedItem==null)
                    MessageBox.Show(Localization.AppResources.PinError);
                ((IViewModels.Icostumes_DetailViewModel)DataContext).CurrentsuitsCollectionSchema = pinnedItem;
            }
        }
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;
			
            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
				var dataSource = new Ioc.Container().Resolve<Repositories.IMovie_Movie>();
				AddHomeAppBarButton();
				var pinnedItem  = (await dataSource.GetData()).FirstOrDefault(x => IsPinnedItem(x.VideoId.ToString(), currentId));
				if(pinnedItem==null)
					MessageBox.Show(Localization.AppResources.PinError);
				((IViewModels.IMovie_DetailVideosViewModel)DataContext).CurrentYouTubeVideo = pinnedItem;				
			}
			MyToolkit.Multimedia.YouTube.CancelPlay();
		}
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;
			
            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
				var dataSource = new Ioc.Container().Resolve<Repositories.IYoutube_YoutubeChannel>();
				AddHomeAppBarButton();
				var pinnedItemSpec = new FilterSpecification().AddPredicate("VideoId", ColumnOperatorEnum.Equals, currentId);
				var pinnedItem  = (await dataSource.Search(pinnedItemSpec)).FirstOrDefault();
				if(pinnedItem==null)
					MessageBox.Show(Localization.AppResources.PinError);
				((IViewModels.IYoutube_DetailVideosViewModel)DataContext).CurrentYouTubeVideo = pinnedItem;				
			}
			MyToolkit.Multimedia.YouTube.CancelPlay();
		}
예제 #7
0
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;

            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
                var dataSource = new Ioc.Container().Resolve <Repositories.Imonuments_monumentsCollection>();
                AddHomeAppBarButton();
                var pinnedItem = dataSource.GetData().FirstOrDefault(x => IsPinnedItem(x.Id.ToString(), currentId));
                if (pinnedItem == null)
                {
                    MessageBox.Show(Localization.AppResources.PinError);
                }
                ((IViewModels.Imonuments_DetailViewModel)DataContext).CurrentmonumentsCollectionSchema = pinnedItem;
            }
        }
        /// <summary>
        /// Called when the page becomes the active page.
        /// </summary>
        /// <param name="e">Contains information about the navigation done.</param>
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            string currentId;

            if (NavigationContext.QueryString.TryGetValue("currentID", out currentId))
            {
                var dataSource = new Ioc.Container().Resolve <Repositories.ICnetNEWS_s4>();
                AddHomeAppBarButton();
                var pinnedItemSpec = new FilterSpecification().AddPredicate("Title", ColumnOperatorEnum.Equals, currentId);
                var pinnedItem     = (await dataSource.Search(pinnedItemSpec)).FirstOrDefault();
                if (pinnedItem == null)
                {
                    MessageBox.Show(Localization.AppResources.PinError);
                }
                ((IViewModels.ICnetNEWS_DetailViewModel)DataContext).CurrentRssSearchResult = pinnedItem;
            }
        }