/[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 88 - (show annotations) (download)
Tue Oct 12 04:54:08 2010 UTC (11 years, 1 month ago) by rvvs89
File size: 1677 byte(s)
Syncing.
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 IList<string> menuPath = new List<string> { "Metadata" };
17
18 public bool Enabled
19 {
20 get
21 {
22 Refresh();
23 return activity != null;
24 }
25 }
26
27 public bool HasMenuArrow
28 {
29 get { return false; }
30 }
31
32 public Image Image
33 {
34 get { return null; }
35 }
36
37 public IList<string> MenuPath
38 {
39 get { return menuPath; }
40 }
41
42 public void Refresh()
43 {
44 activity = CollectionUtils.GetSingleItemOfType<IActivity>(MetadataActivityReportPages.View.SelectionProvider.SelectedItems);
45 }
46
47 public void Run(Rectangle rectButton)
48 {
49 AddMetadataDialog.Instance.Control.MetadataLocation = MetadataLocation.TRACK;
50 AddMetadataDialog.Instance.ShowDialog();
51 }
52
53 public string Title
54 {
55 get { return "Add To Route"; }
56 }
57
58 public bool Visible
59 {
60 get { return true; }
61 }
62
63 #pragma warning disable 67
64 public event PropertyChangedEventHandler PropertyChanged;
65 #pragma warning restore 67
66 }
67 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26