public void Share(Movie m, string message) { var accessToken = SettingsManager.FacebookToken; FacebookClient fb= new FacebookClient(accessToken); fb.PostCompleted += (o, args) => { if (args.Error != null) { OnComplete(new FacebookResult() { Error = args.Error }); } else { OnComplete(new FacebookResult() { Result = (IDictionary<string, object>)args.GetResultData() }); //var result = (IDictionary<string, object>)args.GetResultData(); //_lastMessageId = (string)result["id"]; } }; var parameters = new Dictionary<string, object>(); parameters["caption"] = "Checa 'My Movies' en Windows Phone!"; parameters["message"] = message; parameters["name"] = m.Title; parameters["description"] = m.Sinopsis; parameters["picture"] = m.PosterUri; parameters["link"] = m.MovieUri; fb.PostAsync("me/feed", parameters); }
protected override void OnNavigatedTo(NavigationEventArgs e) { var movieCode = NavigationContext.QueryString["m"]; _movie = AppState.Current.City.Movies.Where(x => x.Code == movieCode).SingleOrDefault(); var theaterList = new List<Theater>(); foreach (var theater in AppState.Current.City.Theaters) { theater.Movies.Clear(); theater.Movies.Add(new Movie() { Showtimes = theater.Showtimes.Where(x => x.MovieCode == movieCode).ToList() }); if (theater.Movies[0].Showtimes.Count > 0) theaterList.Add(theater); } ShowData(_movie, theaterList); base.OnNavigatedTo(e); }
private void ShowData(Movie movie, List<Theater> theaterList) { txtScheadulesTitle.Header = Utils.GetMessage(Info.Sheadules); txtMovieTitle.Header = movie.Title; txtSinopsis.Text = movie.Sinopsis; panMovie.Title = movie.Title; imgPoster.Source = movie.Poster; lstShowtimes.ItemsSource = theaterList; }
private Movie ReadMovie(XmlReader reader) { var p = new Movie(); string val; if (GetAttribute(reader, "peliculaid", out val)) p.MovieUri = string.Format(MoviesRootPath, val); if (GetAttribute(reader, "peliculaidVista", out val)) p.Code = val; if (GetAttribute(reader, "nombre", out val)) p.Title = val; while (reader.Read() && reader.Name != "pelicula" || reader.NodeType != XmlNodeType.EndElement) { if (GetValue(reader, "clasificacion", out val)) p.Classification = val; if (GetValue(reader, "imagencartel", out val)) p.PosterUri = string.Format(ImagesRootPath, val); if (GetValue(reader, "sinopsis", out val)) p.Sinopsis = val; if (GetValue(reader, "actores", out val)) p.Actors = val; if (GetValue(reader, "calificacion", out val)) p.Rating = val; } return p; }