[longomatch] Add rendering from the timescale



commit 01a5c77de7501389d3a8b39fe30229f0bf942a93
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jun 13 22:24:27 2013 +0200

    Add rendering from the timescale

 LongoMatch.GUI/Gui/Component/TimeLineWidget.cs |    3 ++-
 LongoMatch.GUI/Gui/Component/TimeScale.cs      |   10 +++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/TimeLineWidget.cs b/LongoMatch.GUI/Gui/Component/TimeLineWidget.cs
index 756f0f2..e9d9afe 100644
--- a/LongoMatch.GUI/Gui/Component/TimeLineWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/TimeLineWidget.cs
@@ -73,7 +73,8 @@ namespace LongoMatch.Gui.Component {
                        
                        foreach(Category cat in  categories) {
                                List<Play> playsList = project.PlaysInCategory(cat);
-                               TimeScale ts = new TimeScale(cat, playsList, frames, filter);
+                               TimeScale ts = new TimeScale(cat, playsList, frames, filter,
+                                                            project.Description.File);
                                tsList[cat] = ts;
                                ts.TimeNodeChanged += HandleTimeNodeChanged;
                                ts.TimeNodeSelected += HandleTimeNodeSelected;
diff --git a/LongoMatch.GUI/Gui/Component/TimeScale.cs b/LongoMatch.GUI/Gui/Component/TimeScale.cs
index ea76705..ddf1094 100644
--- a/LongoMatch.GUI/Gui/Component/TimeScale.cs
+++ b/LongoMatch.GUI/Gui/Component/TimeScale.cs
@@ -40,6 +40,7 @@ namespace LongoMatch.Gui.Component
        public class TimeScale : TimeScaleBase<Play>
        {
                Category category;
+               MediaFile mediaFile;
                
                public event NewTagAtFrameHandler NewMarkAtFrameEvent;
                public event TimeNodeChangedHandler TimeNodeChanged;
@@ -51,9 +52,10 @@ namespace LongoMatch.Gui.Component
                public event RenderPlaylistHandler RenderPlaylist;
 
 
-               public TimeScale(Category category, List<Play> list, uint frames, PlaysFilter filter): 
base(list, frames, filter)
+               public TimeScale(Category category, List<Play> list, uint frames, PlaysFilter filter, 
MediaFile mediaFile): base(list, frames, filter)
                {
                        this.category = category;
+                       this.mediaFile = mediaFile;
                        elementName = Catalog.GetString("play");
                        filter.FilterUpdated += () => {
                                Visible = filter.VisibleCategories.Contains (category);
@@ -124,6 +126,12 @@ namespace LongoMatch.Gui.Component
 
                void HandleRender (object sender, EventArgs e)
                {
+                       if (RenderPlaylist != null) {
+                               PlayList pl = new PlayList();
+                               pl.Add (new PlayListPlay (menuToNodeDict[sender as MenuItem],
+                                                         mediaFile, 1.0f, true));
+                               RenderPlaylist (pl);
+                       }
                        
                }
 


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