[longomatch] Change TimeNodeChanged signature to use Time



commit 219d60f6ead2db7c622a7434e0bc917003f3837f
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Fri Feb 6 12:58:43 2015 +0100

    Change TimeNodeChanged signature to use Time

 LongoMatch.Core/Common/EventsBroker.cs          |    4 ++--
 LongoMatch.Core/Handlers/Handlers.cs            |    2 +-
 LongoMatch.Services/Services/PlaylistManager.cs |    9 ++++-----
 3 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/LongoMatch.Core/Common/EventsBroker.cs b/LongoMatch.Core/Common/EventsBroker.cs
index 28b39c5..98fd46b 100644
--- a/LongoMatch.Core/Common/EventsBroker.cs
+++ b/LongoMatch.Core/Common/EventsBroker.cs
@@ -154,10 +154,10 @@ namespace LongoMatch.Core.Common
                                PlaylistElementSelectedEvent (playlist, element);
                }
                
-               public void EmitTimeNodeChanged (TimeNode tn, object val)
+               public void EmitTimeNodeChanged (TimeNode tn, Time time)
                {
                        if (TimeNodeChanged != null)
-                               TimeNodeChanged(tn, val);
+                               TimeNodeChanged (tn, time);
                }
                
                public virtual void EmitMoveToEventType(TimelineEvent evnt, EventType eventType)
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 2af3987..d7ab3d8 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -42,7 +42,7 @@ namespace LongoMatch.Core.Handlers
        /* Add a new play to the current project */
        public delegate void NewTimelineEventHandler (TimelineEvent evt);
        /* An event was edited */
-       public delegate void TimeNodeChangedHandler (TimeNode tNode,object val);
+       public delegate void TimeNodeChangedHandler (TimeNode tNode, Time time);
        public delegate void TimerNodeAddedHandler (Timer timer, TimeNode tn);
        /* Edit EventType properties */
        public delegate void EditEventTypeHandler (EventType cat);
diff --git a/LongoMatch.Services/Services/PlaylistManager.cs b/LongoMatch.Services/Services/PlaylistManager.cs
index a219494..dd695d0 100644
--- a/LongoMatch.Services/Services/PlaylistManager.cs
+++ b/LongoMatch.Services/Services/PlaylistManager.cs
@@ -97,13 +97,12 @@ namespace LongoMatch.Services
                        }
                }
 
-               void HandlePlayChanged (TimeNode tNode, object val)
+               void HandlePlayChanged (TimeNode tNode, Time time)
                {
-                       /* FIXME: Tricky, create a new handler for categories */
-                       if (tNode is TimelineEvent && val is Time) {
-                               LoadPlay (tNode as TimelineEvent, val as Time, false);
+                       if (tNode is TimelineEvent) {
+                               LoadPlay (tNode as TimelineEvent, time, false);
+                               filter.Update ();
                        }
-                       filter.Update ();
                }
                
                void HandleOpenedProjectChanged (Project project, ProjectType projectType,


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