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


UCC Code Repository

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

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

revision 19 by rvvs89, Sat Sep 11 20:21:25 2010 UTC revision 20 by rvvs89, Sun Sep 12 08:23:38 2010 UTC
# Line 1  Line 1 
1  ´╗┐using System;  ´╗┐using PlaybackPlugin.Properties;
2    using System;
3  using System.Collections.Generic;  using System.Collections.Generic;
4  using System.ComponentModel;  using System.ComponentModel;
5  using System.Drawing;  using System.Drawing;
# Line 12  namespace PlaybackPlugin.Source Line 13  namespace PlaybackPlugin.Source
13  {  {
14      public partial class PlaybackControl : UserControl      public partial class PlaybackControl : UserControl
15      {      {
16            private PlaybackState state = PlaybackState.Disabled;
17          private IActivity activity = null;          private IActivity activity = null;
18    
19          public PlaybackControl()          public PlaybackControl()
20          {          {
21              InitializeComponent();              InitializeComponent();
22                UpdateUI();
23          }          }
24    
25          public PlaybackControl(IActivity activity) : this()          public PlaybackControl(IActivity activity) : this()
# Line 30  namespace PlaybackPlugin.Source Line 33  namespace PlaybackPlugin.Source
33              set { activity = value; }              set { activity = value; }
34          }          }
35    
36          public void rewind()          public PlaybackState State
37          {          {
38              // TODO              get { return state; }
39          }          }
40    
41          public void fastForward()          private void UpdateUI()
42          {          {
43              // TODO              rewindButton.Enabled = State != PlaybackState.Disabled && State != PlaybackState.Stopped;
44                fastForwardButton.Enabled = State != PlaybackState.Disabled && State != PlaybackState.Stopped;
45                playButton.Enabled = State != PlaybackState.Disabled;
46                playButton.Image = State == PlaybackState.Playing || State == PlaybackState.FastForwarding || State == PlaybackState.Rewinding ? Resources.PauseIcon : Resources.PlayIcon;
47                loopButton.Enabled = State != PlaybackState.Disabled;
48                speedLabel.Enabled = State != PlaybackState.Disabled;
49                speedSpinner.Enabled = State != PlaybackState.Disabled;
50                statusStrip.Enabled = State != PlaybackState.Disabled;
51                playbackBar.Enabled = State != PlaybackState.Disabled;
52                statusLabel.Enabled = State != PlaybackState.Disabled;
53          }          }
54    
55          public void play()          public enum PlaybackState
56          {          {
57              // TODO              Disabled,
58                Stopped,
59                Paused,
60                Playing,
61                FastForwarding,
62                Rewinding
63          }          }
64    
65          public void stop()          private void statusStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
66          {          {
67              // TODO  
68          }          }
69      }      }
70  }  }

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

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26