[longomatch] Support editing frame drawings in playlists



commit eea71fd889963ce5aaacf410ff4429ad81763e2f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Oct 11 01:19:15 2014 +0200

    Support editing frame drawings in playlists

 LongoMatch.Services/Services/EventsManager.cs |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index 2fc4249..e52fb1d 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -35,7 +35,7 @@ namespace LongoMatch.Services
        public class EventsManager
        {
                /* Current play loaded. null if no play is loaded */
-               TimelineEvent loadedPlay = null;
+               TimelineEvent loadedPlay;
                /* current project in use */
                Project openedProject;
                ProjectType projectType;
@@ -94,6 +94,7 @@ namespace LongoMatch.Services
                        Config.EventsBroker.DuplicateEventsEvent += OnDuplicatePlays;
                        Config.EventsBroker.SnapshotSeries += OnSnapshotSeries;
                        Config.EventsBroker.EventLoadedEvent += HandlePlayLoaded;
+                       Config.EventsBroker.PlaylistElementSelectedEvent += 
HandlePlaylistElementSelectedEvent;
                        Config.EventsBroker.PlayerSubstitutionEvent += HandlePlayerSubstitutionEvent;
                        Config.EventsBroker.DashboardEditedEvent += HandleDashboardEditedEvent;
                        
@@ -143,6 +144,15 @@ namespace LongoMatch.Services
                {
                        loadedPlay = play;
                }
+               void HandlePlaylistElementSelectedEvent (Playlist playlist, IPlaylistElement element)
+               {
+                       if (element is PlaylistPlayElement) {
+                               loadedPlay = (element as PlaylistPlayElement).Play;
+                       } else {
+                               loadedPlay = null;
+                       }
+               }
+
 
                void HandleDetach ()
                {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]