private async void Grid_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            if (!Config.AudioSupport)
            {
                return;
            }

            Grid g = sender as Grid;

            MovieCastInfo cast = g.Tag as MovieCastInfo;

            if (cast != null)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(cast.Title);
                if (!String.IsNullOrWhiteSpace(cast.ReleaseDate))
                {
                    sb.AppendFormat("released on {0}\n", cast.ReleaseDate);
                }

                if (!String.IsNullOrWhiteSpace(cast.Character))
                {
                    sb.AppendFormat("plays {0}\n", cast.Character);
                }

                await SpeechSynthesisService.SpeakOutLoud(sb.ToString());
            }
        }
Пример #2
0
        public void UpdateCell(MovieCastInfo movie, UIImage image)
        {
            this.MovieCast    = movie;
            this.Poster.Image = image;
            this.Poster.Layer.CornerRadius       = 10f;
            this.Poster.Layer.MasksToBounds      = true;
            this.Poster.Layer.RasterizationScale = UIScreen.MainScreen.Scale;
            this.Poster.Layer.Opaque             = true;

            this.ReleaseDate.Text = movie.ReleaseDate;
            this.Movie.Text       = movie.Title;
            this.Character.Text   = movie.Character;
        }