Exemple #1
0
 void fillCurrentPoint(GPSPointViewModel point)
 {
     tbCurrentAltitude.Text = string.Format("{0} {1}", point.DisplayAltitude, UIHelper.AltitudeType);
     tbCurrentSpeed.Text    = string.Format("{0} {1}", point.DisplaySpeed, UIHelper.SpeedType);
     tbCurrentPace.Text     = point.DisplayPace;
     tbCurrentTime.Text     = point.DisplayDateTime;
     tbCurrentDistance.Text = string.Format("{0} {1}", point.DisplayDistance, UIHelper.DistanceType);
 }
Exemple #2
0
        private void Track_OnPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            var track = (TrackballBehaviour)sender;
            var pkt   = track.CurrentPoints.FirstOrDefault();
            DataPoint <DateTime, decimal> timePoint     = pkt as DataPoint <DateTime, decimal>;
            DataPoint <decimal, decimal>  distancePoint = pkt as DataPoint <decimal, decimal>;
            GPSPointViewModel             tag           = null;

            if (timePoint != null)
            {
                tag = (GPSPointViewModel)timePoint.Tag;
            }
            if (distancePoint != null)
            {
                tag = (GPSPointViewModel)distancePoint.Tag;
            }
            if (tag != null)
            {
                ShowGpsPoint(tag.Point);
                fillCurrentPoint(tag);
            }
        }
 public LapViewModel(GPSPointViewModel startPoint, GPSPointViewModel endPoint)
 {
     this.startPoint = startPoint;
     this.endPoint   = endPoint;
 }