RouteExample.xaml.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using Breda_Tour.Data;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Runtime.InteropServices.WindowsRuntime;
  8. using Windows.Foundation;
  9. using Windows.Foundation.Collections;
  10. using Windows.UI.Xaml;
  11. using Windows.UI.Xaml.Controls;
  12. using Windows.UI.Xaml.Controls.Primitives;
  13. using Windows.UI.Xaml.Data;
  14. using Windows.UI.Xaml.Input;
  15. using Windows.UI.Xaml.Media;
  16. using Windows.UI.Xaml.Navigation;
  17. using Breda_Tour.MapScreen;
  18. // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
  19. namespace Breda_Tour.RouteSelectScreen
  20. {
  21. /// <summary>
  22. /// An empty page that can be used on its own or navigated to within a Frame.
  23. /// </summary>
  24. public sealed partial class RouteExample : Page
  25. {
  26. Route route;
  27. public string WaypointsText { get; set; }
  28. public RouteExample()
  29. {
  30. this.InitializeComponent();
  31. }
  32. protected override void OnNavigatedTo(NavigationEventArgs e)
  33. {
  34. route = e.Parameter as Route;
  35. WaypointsText = "Aantal waypoints: " + 0;
  36. if (route.Waypoints.Count != 0){
  37. WaypointsText = "Aantal waypoints: " +route.Waypoints.Count;
  38. }
  39. }
  40. private void Button_Click(object sender, RoutedEventArgs e)
  41. {
  42. MainPage.RootFrame.Navigate(typeof(MapPage),route);
  43. }
  44. private void ShowRouteInfo()
  45. {
  46. }
  47. }
  48. }