/[cits3200i]/trunk/UWAPlugins/PlaybackPlugin/Source/PlaybackAction.cs


UCC Code Repository

Diff of /trunk/UWAPlugins/PlaybackPlugin/Source/PlaybackAction.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by rvvs89, Sun Sep 12 05:49:52 2010 UTC revision 19 by rvvs89, Sun Sep 12 07:20:38 2010 UTC
# Line 6  using System.Text; Line 6  using System.Text;
6  using ZoneFiveSoftware.Common.Data.Fitness;  using ZoneFiveSoftware.Common.Data.Fitness;
7  using ZoneFiveSoftware.Common.Visuals;  using ZoneFiveSoftware.Common.Visuals;
8  using ZoneFiveSoftware.Common.Visuals.Fitness;  using ZoneFiveSoftware.Common.Visuals.Fitness;
9    using ZoneFiveSoftware.Common.Visuals.Util;
10    
11  namespace PlaybackPlugin.Source  namespace PlaybackPlugin.Source
12  {  {
13      class PlaybackAction : IAction      class PlaybackAction : IAction
14      {      {
15          private IActivity activity;          private IActivity activity = null;
16          private IDailyActivityView view;          private IDailyActivityView view;
17    
18          public PlaybackAction(IDailyActivityView view)          public PlaybackAction(IDailyActivityView view)
# Line 21  namespace PlaybackPlugin.Source Line 22  namespace PlaybackPlugin.Source
22    
23          public bool Enabled          public bool Enabled
24          {          {
25              get { return true; }              get {
26                    Refresh();
27                    return activity != null;
28                }
29          }          }
30    
31          public bool HasMenuArrow          public bool HasMenuArrow
# Line 41  namespace PlaybackPlugin.Source Line 45  namespace PlaybackPlugin.Source
45    
46          public void Refresh()          public void Refresh()
47          {          {
48                activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);
49          }          }
50    
51          public void Run(System.Drawing.Rectangle rectButton)          public void Run(System.Drawing.Rectangle rectButton)

Legend:
Removed from v.18  
changed lines
  Added in v.19

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26