コード例 #1
0
        public void CreateTvShowContainerView(TvShowContainer container)
        {
            if (container == null)
            {
                return;
            }

            string documentType = "TvShowSingleView";
            string documentId   = String.Format("{0}:{1}", documentType, container.Id);

            if (ShowDocument(String.Empty, documentId))
            {
                return;
            }

            CreateDocument(() => container.GetName(Settings.Default.Language), documentType, container, documentId);
        }
コード例 #2
0
        public async Task CreateTvShowView(int tvShowId)
        {
            string documentType = "TvShowSingleView";
            string documentId   = String.Format("{0}:{1}", documentType, tvShowId);

            if (ShowDocument(String.Empty, documentId))
            {
                return;
            }

            CancellationTokenSource tokenSource = this.GetAsyncCommand(x => x.CreateTvShowView(tvShowId)).CancellationTokenSource;
            TvShowContainer         container   = await RunAsync(() => App.Repository.GetTvShowAsync(tvShowId, tokenSource.Token));

            if (container != null)
            {
                CreateDocument(() => container.GetName(Settings.Default.Language), documentType, container, documentId);
            }
        }