protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            lastSeance = new MainViewModel();
            lastSeance.Seances = IsolatedStorageHelper.GetObject<List<Seance>>("allSeances");

            if (lastSeance.Seances == null || lastSeance.Seances.Count == 0)
            {
                txtVitesse.Text = "No Data";
                txtDuree.Text = "No Data";
                txtDistance.Text = "No Data";
                txtCalories.Text = "No Data";
                txtDate.Text = "No Data";
            }
            else
            {

                Seance lastOne = lastSeance.Seances.Last();
                txtCalories.Text = lastOne.Calories + " Kcal";
                txtDistance.Text = lastOne.Distance + " Km";
                txtDuree.Text = lastOne.Duree + " min";
                txtVitesse.Text = lastOne.Vitesse + " Km/h";
                txtDate.Text = lastOne.DateSeance.ToString();
            }
            double bestStep = IsolatedStorageHelper.GetObject<double>("bestSteps");
            txtBestStep.Text = bestStep + "";

            double bestPush = IsolatedStorageHelper.GetObject<double>("bestPush");
            txtBestPush.Text = bestPush + "";
        }
        public ListSeance()
        {
            this.InitializeComponent();

            listSeance = new MainViewModel();
            listSeance.Seances = IsolatedStorageHelper.GetObject<List<Seance>>("allSeances");

            indiceSeance = IsolatedStorageHelper.GetObject<int>("indiceSeance");

            lst.ItemsSource = listSeance.Seances;
            lst.SelectionChanged += lst_SelectionChanged;


            Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
        }
        //List<TrackMe.Seance> listSeance;

        
        public SeancePage()
        {
            this.InitializeComponent();
           
            myTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
            myTimer.Tick += myTimer_Tick;
            btnStop.Visibility = Windows.UI.Xaml.Visibility.Collapsed;

            listSeance = new MainViewModel();
             MapIcon = new MapIcon();

             MapIcon.NormalizedAnchorPoint = new Point(0.5, 1.0);
             MapIcon.Title = "You are Here";
             MapIcon.Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/ic_runMap.png"));
             
             

            poly = new MapPolyline();
            poly.StrokeColor = Colors.Blue;
            poly.StrokeThickness = 3;
            positions = new List<BasicGeoposition>();
            //listSeance = new List<Seance>();

            /*var myPosition1 = new Windows.Devices.Geolocation.BasicGeoposition();
            myPosition1.Latitude = 41.7446;
            myPosition1.Longitude = -087.7915;

            var myPosition2 = new Windows.Devices.Geolocation.BasicGeoposition();
            myPosition2.Latitude = 4.7446;
            myPosition2.Longitude = -08.7915;

            var myPosition3 = new Windows.Devices.Geolocation.BasicGeoposition();
            myPosition3.Latitude = 42.7446;
            myPosition3.Longitude = -18.7915;
            /*    positions.Add(new BasicGeoposition()
                {
                    Latitude = myPosition1.Latitude,
                    Longitude = myPosition2.Longitude
                });
            positions.Add(myPosition1);
            positions.Add(myPosition2);
            positions.Add(myPosition3);
            poly.Path = new Geopath(positions);
            MyMap.MapElements.Add(poly);*/
            Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
        }