waypoint.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using Windows.UI.Xaml.Media.Imaging;
  4. using Windows.UI.Core;
  5. using Windows.UI.Xaml.Controls;
  6. using Windows.Devices.Geolocation;
  7. namespace Breda_Tour.Data
  8. {
  9. public class Waypoint
  10. {
  11. private Geopoint _position;
  12. public Geopoint Position
  13. {
  14. get { return _position; }
  15. }
  16. public String Title { get; private set; }
  17. public String Description { get; private set; }
  18. public List<Picture> Pictures { get; private set; }
  19. public bool FromPreview { get; set; }
  20. public Waypoint(double Lat, double Long, String Title, String Description, List<string> pictures)
  21. {
  22. this._position = new Geopoint(new BasicGeoposition() { Altitude = 0, Latitude = Lat, Longitude = Long });
  23. this.Title = Title;
  24. this.Description = Description;
  25. this.Pictures = new List<Picture>();
  26. if (pictures != null)
  27. {
  28. foreach (var imageSource in pictures)
  29. {
  30. string newSource = "ms-appx:///Storage/Images/" + imageSource;
  31. Pictures.Add(new Picture(newSource));
  32. }
  33. }
  34. }
  35. }
  36. }