/[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 - (show 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 using PlaybackPlugin.Properties;
2 using System;
3 using System.Collections.Generic;
4 using System.ComponentModel;
5 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 using ZoneFiveSoftware.Common.Visuals.Util;
11
12 namespace PlaybackPlugin.Source
13 {
14 class PlaybackAction : IAction
15 {
16 private IActivity activity = null;
17 private IDailyActivityView view;
18
19 public PlaybackAction(IDailyActivityView view)
20 {
21 this.view = view;
22 }
23
24 public bool Enabled
25 {
26 get {
27 Refresh();
28 return activity != null;
29 }
30 }
31
32 public bool HasMenuArrow
33 {
34 get { return false; }
35 }
36
37 public Image Image
38 {
39 get { return Resources.PlayIcon16; }
40 }
41
42 public IList<string> MenuPath
43 {
44 get { return null; }
45 }
46
47 public void Refresh()
48 {
49 activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);
50 }
51
52 public void Run(Rectangle rectButton)
53 {
54 if (PlaybackDialog.Instance != null && !PlaybackDialog.Instance.IsDisposed)
55 {
56 PlaybackDialog.Instance.Dispose();
57 }
58 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 #pragma warning disable 67
73 public event PropertyChangedEventHandler PropertyChanged;
74 #pragma warning restore 67
75 }
76 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26