/[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 98 - (show annotations) (download)
Wed Oct 13 01:09:10 2010 UTC (11 years, 1 month ago) by rvvs89
File size: 1723 byte(s)
Replace Crystal icons with ones made by Joel for licensing reasons.
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 using MetadataPlugin.Properties;
11
12 namespace MetadataPlugin.Source
13 {
14 class AddToRouteAction : IAction
15 {
16 private IActivity activity;
17 private IList<string> menuPath = new List<string> { "Metadata" };
18
19 public bool Enabled
20 {
21 get
22 {
23 Refresh();
24 return activity != null;
25 }
26 }
27
28 public bool HasMenuArrow
29 {
30 get { return false; }
31 }
32
33 public Image Image
34 {
35 get { return Resources.Attach; }
36 }
37
38 public IList<string> MenuPath
39 {
40 get { return menuPath; }
41 }
42
43 public void Refresh()
44 {
45 activity = CollectionUtils.GetSingleItemOfType<IActivity>(MetadataActivityReportPages.View.SelectionProvider.SelectedItems);
46 }
47
48 public void Run(Rectangle rectButton)
49 {
50 AddMetadataDialog.Instance.Control.MetadataLocation = MetadataLocation.TRACK;
51 AddMetadataDialog.Instance.ShowDialog();
52 }
53
54 public string Title
55 {
56 get { return "Add To Route"; }
57 }
58
59 public bool Visible
60 {
61 get { return true; }
62 }
63
64 #pragma warning disable 67
65 public event PropertyChangedEventHandler PropertyChanged;
66 #pragma warning restore 67
67 }
68 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26