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


UCC Code Repository

Contents of /branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/AddToPointAction.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: 1809 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 AddToPointAction : IAction
14 {
15 private IActivity activity;
16 private IDailyActivityView view;
17 private IList<string> menuPath = new List<string> { "Metadata" };
18
19 public AddToPointAction(IDailyActivityView view)
20 {
21 this.view = view;
22 }
23
24 public bool Enabled
25 {
26 get
27 {
28 Refresh();
29 // FIXME: check selected items
30 // MetadataRouteControlLayer.Instances[0].Control.SelectedItems
31 return activity != null;
32 }
33 }
34
35 public bool HasMenuArrow
36 {
37 get { return false; }
38 }
39
40 public Image Image
41 {
42 get { return null; }
43 }
44
45 public IList<string> MenuPath
46 {
47 get { return menuPath; }
48 }
49
50 public void Refresh()
51 {
52 activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);
53 }
54
55 public void Run(Rectangle rectButton)
56 {
57 // TODO
58 }
59
60 public string Title
61 {
62 get { return "Add To Point"; }
63 }
64
65 public bool Visible
66 {
67 get { return true; }
68 }
69
70 #pragma warning disable 67
71 public event PropertyChangedEventHandler PropertyChanged;
72 #pragma warning restore 67
73 }
74 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26