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


UCC Code Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 68 - (hide annotations) (download)
Thu Sep 30 05:00:14 2010 UTC (11 years, 2 months ago) by rvvs89
File size: 1902 byte(s)
Silence warnings about unused event handler in interface.
1 rvvs89 17 using PlaybackPlugin.Properties;
2     using System;
3     using System.Collections.Generic;
4 rvvs89 68 using System.ComponentModel;
5 rvvs89 17 using System.Drawing;
6     using System.Text;
7     using ZoneFiveSoftware.Common.Data.Fitness;
8     using ZoneFiveSoftware.Common.Visuals;
9     using ZoneFiveSoftware.Common.Visuals.Fitness;
10 rvvs89 19 using ZoneFiveSoftware.Common.Visuals.Util;
11 rvvs89 17
12     namespace PlaybackPlugin.Source
13     {
14     class PlaybackAction : IAction
15     {
16 rvvs89 19 private IActivity activity = null;
17 rvvs89 17 private IDailyActivityView view;
18    
19     public PlaybackAction(IDailyActivityView view)
20     {
21     this.view = view;
22     }
23    
24     public bool Enabled
25     {
26 rvvs89 19 get {
27     Refresh();
28     return activity != null;
29     }
30 rvvs89 17 }
31    
32     public bool HasMenuArrow
33     {
34     get { return false; }
35     }
36    
37     public Image Image
38     {
39 rvvs89 62 get { return Resources.PlayIcon16; }
40 rvvs89 17 }
41    
42     public IList<string> MenuPath
43     {
44     get { return null; }
45     }
46    
47     public void Refresh()
48     {
49 rvvs89 19 activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);
50 rvvs89 17 }
51    
52 rvvs89 62 public void Run(Rectangle rectButton)
53 rvvs89 17 {
54 rvvs89 65 if (PlaybackDialog.Instance != null && !PlaybackDialog.Instance.IsDisposed)
55     {
56     PlaybackDialog.Instance.Dispose();
57     }
58 rvvs89 17 PlaybackDialog control = new PlaybackDialog(activity);
59     control.Show();
60     }
61    
62     public string Title
63     {
64     get { return Resources.PlaybackBannerText; }
65     }
66    
67     public bool Visible
68     {
69     get { return true; }
70     }
71    
72 rvvs89 68 #pragma warning disable 67
73     public event PropertyChangedEventHandler PropertyChanged;
74     #pragma warning restore 67
75 rvvs89 17 }
76     }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26