/[cits3200i]/branches/gps-running-clean-r116/AccumulatedSummaryPlugin/Source/AccumulatedSummaryEdit.cs


UCC Code Repository

Contents of /branches/gps-running-clean-r116/AccumulatedSummaryPlugin/Source/AccumulatedSummaryEdit.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: 2532 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 Copyright (C) 2010 Gerhard Olsson
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 3 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 using System;
21 using System.Collections.Generic;
22 using System.Text;
23 using ZoneFiveSoftware.Common.Visuals;
24 using ZoneFiveSoftware.Common.Visuals.Fitness;
25 using ZoneFiveSoftware.Common.Data.Fitness;
26
27 namespace GpsRunningPlugin.Source
28 {
29 class AccumulatedSummaryEdit :
30 #if ST_2_1
31 IExtendActivityEditActions
32 #else
33 IExtendDailyActivityViewActions, IExtendActivityReportsViewActions
34 #endif
35 {
36
37 #if ST_2_1
38 #region IExtendActivityEditActions Members
39 public IList<IAction> GetActions(IList<IActivity> activities)
40 {
41 return new IAction[] { new AccumulatedSummaryAction(activities) };
42 }
43
44 public IList<IAction> GetActions(IActivity activity)
45 {
46 return new IAction[] { new AccumulatedSummaryAction(new IActivity[] { activity }) };
47 }
48
49 #endregion
50 #else
51 #region IExtendDailyActivityViewActions Members
52 public IList<IAction> GetActions(IDailyActivityView view,
53 ExtendViewActions.Location location)
54 {
55 if (location == ExtendViewActions.Location.AnalyzeMenu)
56 {
57 return new IAction[] { new AccumulatedSummaryAction(view) };
58 }
59 else return new IAction[0];
60 }
61 public IList<IAction> GetActions(IActivityReportsView view,
62 ExtendViewActions.Location location)
63 {
64 if (location == ExtendViewActions.Location.AnalyzeMenu)
65 {
66 return new IAction[] { new AccumulatedSummaryAction(view) };
67 }
68 else return new IAction[0];
69 }
70 #endregion
71 #endif
72 }
73 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26