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


UCC Code Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (show annotations) (download)
Sun Sep 5 15:48:34 2010 UTC (11 years, 2 months ago) by rvvs89
File size: 2462 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.Generic;
21 using System.Text;
22 using ZoneFiveSoftware.Common.Visuals.Fitness;
23 using ZoneFiveSoftware.Common.Data.Fitness;
24 using ZoneFiveSoftware.Common.Visuals;
25
26 namespace GpsRunningPlugin.Source
27 {
28 class HighScoreActivityEdit :
29 #if ST_2_1
30 IExtendActivityEditActions
31 #else
32 IExtendDailyActivityViewActions, IExtendActivityReportsViewActions
33 #endif
34 {
35
36 #if ST_2_1
37 #region IExtendActivityEditActions Members
38 public IList<IAction> GetActions(IList<IActivity> activities)
39 {
40 return new IAction[] { new HighScoreAction(activities) };
41 }
42
43 public IList<IAction> GetActions(IActivity activity)
44 {
45 return new IAction[] { new HighScoreAction(new IActivity[] { activity }) };
46 }
47 #endregion
48 #else
49 #region IExtendDailyActivityViewActions Members
50 public IList<IAction> GetActions(IDailyActivityView view,
51 ExtendViewActions.Location location)
52 {
53 if (location == ExtendViewActions.Location.AnalyzeMenu)
54 {
55 return new IAction[] { new HighScoreAction(view) };
56 }
57 else return new IAction[0];
58 }
59 public IList<IAction> GetActions(IActivityReportsView view,
60 ExtendViewActions.Location location)
61 {
62 if (location == ExtendViewActions.Location.AnalyzeMenu)
63 {
64 return new IAction[] { new HighScoreAction(view) };
65 }
66 else return new IAction[0];
67 }
68 #endregion
69 #endif
70 }
71 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26