/[cits3200i]/branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/AddToRouteAction.cs


UCC Code Repository

Contents of /branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/AddToRouteAction.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 86 - (show annotations) (download)
Mon Oct 11 06:42:56 2010 UTC (11 years, 1 month ago) by rvvs89
File size: 1680 byte(s)
Committing partially implemented Metadata plugin.
Couldn't finish it before the meeting :(
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Text;
6 using ZoneFiveSoftware.Common.Data.Fitness;
7 using ZoneFiveSoftware.Common.Visuals;
8 using ZoneFiveSoftware.Common.Visuals.Fitness;
9 using ZoneFiveSoftware.Common.Visuals.Util;
10
11 namespace MetadataPlugin.Source
12 {
13 class AddToRouteAction : IAction
14 {
15 private IActivity activity;
16 private IDailyActivityView view;
17 private IList<string> menuPath = new List<string> { "Metadata" };
18
19 public AddToRouteAction(IDailyActivityView view)
20 {
21 this.view = view;
22 }
23
24 public bool Enabled
25 {
26 get
27 {
28 Refresh();
29 return activity != null;
30 }
31 }
32
33 public bool HasMenuArrow
34 {
35 get { return false; }
36 }
37
38 public Image Image
39 {
40 get { return null; }
41 }
42
43 public IList<string> MenuPath
44 {
45 get { return menuPath; }
46 }
47
48 public void Refresh()
49 {
50 activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);
51 }
52
53 public void Run(Rectangle rectButton)
54 {
55 // TODO
56 }
57
58 public string Title
59 {
60 get { return "Add To Route"; }
61 }
62
63 public bool Visible
64 {
65 get { return true; }
66 }
67
68 #pragma warning disable 67
69 public event PropertyChangedEventHandler PropertyChanged;
70 #pragma warning restore 67
71 }
72 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26