/[cits3200i]/branches/gps-running-clean-r116/HighScorePlugin/Source/Result.cs


UCC Code Repository

Contents of /branches/gps-running-clean-r116/HighScorePlugin/Source/Result.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (show annotations) (download)
Sun Sep 5 15:48:34 2010 UTC (11 years, 3 months ago) by rvvs89
File size: 2905 byte(s)
Branching a local copy of the HEAD revision of the gps-running project on Google Code.
We will probably have to use this project as a template for our own plugins if we want to support SportTracks 2.1.
1 /*
2 Copyright (C) 2007, 2008 Kristian Bisgaard Lassen
3 Copyright (C) 2010 Kristian Helkjaer Lassen
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 3 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 using System;
20 using System.Collections;
21 using System.Collections.Generic;
22 using System.Text;
23
24 using ZoneFiveSoftware.Common.Data;
25 using ZoneFiveSoftware.Common.Data.Fitness;
26 using ZoneFiveSoftware.Common.Data.GPS;
27 using ZoneFiveSoftware.Common.Visuals;
28 using ZoneFiveSoftware.Common.Visuals.Fitness;
29 using ZoneFiveSoftware.Common.Data.Measurement;
30 using GpsRunningPlugin.Source;
31 using GpsRunningPlugin.Properties;
32
33 namespace GpsRunningPlugin.Source
34 {
35 public class Result
36 {
37 public Result(Goal goal, IActivity activity,
38 double domainStart, double domainEnd,
39 int timeStart, int timeEnd, double meterStart, double meterEnd, double elevationStart,
40 double elevationEnd, double averagePulse)
41 {
42 this.Goal = goal;
43 this.DomainDiff = domainEnd - domainStart;
44 this.Activity = activity;
45 this.DomainStart = domainStart;
46 this.DomainEnd = domainEnd;
47 this.TimeStart = timeStart;
48 this.TimeEnd = timeEnd;
49 this.Seconds = timeEnd - timeStart;
50 this.MeterStart = meterStart;
51 this.MeterEnd = meterEnd;
52 this.Meters = MeterEnd - MeterStart;
53 this.ElevationStart = elevationStart;
54 this.ElevationEnd = elevationEnd;
55 this.Elevations = elevationEnd - elevationStart;
56 this.AveragePulse = averagePulse;
57 }
58
59 public Goal Goal;
60
61 public IActivity Activity;
62
63 public double DomainStart, DomainEnd, DomainDiff,
64 MeterStart, MeterEnd, Meters, ElevationStart, ElevationEnd, Elevations,
65 AveragePulse;
66
67 public int TimeStart, TimeEnd, Seconds;
68
69 public override String ToString()
70 {
71 string str = Time.LabelPlural(Time.TimeRange.Second);
72 //The label from ST is empty
73 if (str == null || str.Equals("")) { str = "s"; }
74 return String.Format("{0} : {1} {3}, {2} {4}", Goal.ToString(), MeterEnd - MeterEnd, Seconds,Length.LabelPlural(Length.Units.Meter), str);
75 }
76 }
77 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26