/[cits3200i]/branches/playback-branch-rvvs89/UWAPlugins/PlaybackPlugin/Plugin.cs


UCC Code Repository

Contents of /branches/playback-branch-rvvs89/UWAPlugins/PlaybackPlugin/Plugin.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61 - (show annotations) (download)
Thu Sep 30 03:03:02 2010 UTC (11 years, 2 months ago) by rvvs89
File size: 1227 byte(s)
Implemented playback.
Timer resolution and playback bar resolution is currently hardcoded into PlaybackControl.
Removed some listeners from PlaybackControl that were not necessary.
Print current time and time limits to status bar.
Update current position of the playback bar is altered by the user.
If current state is Paused and Rewind or FastForward is pressed, then step back/forward one unit of STEP_SIZE.
Added FollowButton that causes the map to follow playback when checked.
Added FollowIcon for FollowButton.
Increased size of PlaybackDialog to accomodate the new button.
If LoopButton is checked, move back to the startTime if the currentTime exceeds endTime.
If LoopButton is not checked, go to stopped state if the end is reached.
If PlayButton is pressed and currentTime is equal to endTime, move it back to startTime.
If no section of track has been selected, use the entire track.
If a section of track has been selected, use that as the start and end limits for playback.
If a single point on the track has been selected, start playback from that point.
Display markers at the start and end limits.
Don't display markers at the start and end limits if they coincide with the start and end of the track.
On form closing, remove ST event listeners, restore previous selection of track, disable playback timer, hide map markers and dispose forms.
Moved icons that are not compiled in to the executable to a separate directory, Data (start.png, stop.png).
Restructured Plugin to allow other source files to reference it.
Attempt to find icons in the plugin data directory using references from Plugin.
Added PlaybackRouteControlSelection, a simple implementation of IRouteControlSelection to allow PlaybackPlugin to alter the selected area of track thereby allowing playback.
Added a hack to PlaybackControl to prevent problems with Visual Studio's Designer, though the designer still seems to think there are problems with properties.
Added CurrentTime property to PlaybackControl to automatically trigger UI updates when the currentTime is modified.
Added functions to calculate times from the distances provided by SportTracks selection utility since it provides no simple way to convert from distance to time, only from time to distance.
Added listener to SelectedItems on the route control to watch for user interaction, playback is moved to the point the user selected bounded to the current playback limits.
Modified build script to include the Data directory.
Reduced AssemblyInfo version number to 0.1 since this is an alpha.
Removed playing.cs, it doesn't do anything.
Probably some other things too.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Xml;
5 using ZoneFiveSoftware.Common.Visuals.Fitness;
6
7 namespace PlaybackPlugin
8 {
9 class Plugin : IPlugin
10 {
11 private static IApplication application;
12 private static Plugin instance;
13
14 public IApplication Application
15 {
16 get { return application; }
17 set { application = value; }
18 }
19
20 public static Plugin Instance
21 {
22 get { return instance; }
23 }
24
25 public Plugin()
26 {
27 instance = this;
28 }
29
30 public Guid Id
31 {
32 get { return new Guid("4ff7f488-8eb0-4cf7-8e9f-e5bc823b2174"); }
33 }
34
35 public string Name
36 {
37 get { return "Route Playback Plugin"; }
38 }
39
40 public string Version
41 {
42 get { return GetType().Assembly.GetName().Version.ToString(3); }
43 }
44
45 public void ReadOptions(XmlDocument xmlDoc, XmlNamespaceManager nsmgr, XmlElement pluginNode)
46 {
47 }
48
49 public void WriteOptions(XmlDocument xmlDoc, XmlElement pluginNode)
50 {
51 }
52 }
53 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26