Esempio n. 1
0
        public void CreateMovieContainerView(MovieContainer container)
        {
            if (container == null)
            {
                return;
            }

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

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

            CreateDocument(() => container.GetTitle(Settings.Default.Language), documentType, container, documentId);
        }
Esempio n. 2
0
        public async Task CreateMovieView(int movieId)
        {
            string documentType = "MovieSingleView";
            string documentId   = String.Format("{0}:{1}", documentType, movieId);

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

            CancellationTokenSource tokenSource = this.GetAsyncCommand(x => x.CreateMovieView(movieId)).CancellationTokenSource;
            MovieContainer          container   = await RunAsync(() => App.Repository.GetMovieAsync(movieId, tokenSource.Token));

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