[longomatch/fakelive: 11/24] Update ellpased time using EllapasedTime event



commit 4cdc089608e2596b70691f017bf589a1c84b588a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Feb 18 00:24:32 2010 +0100

    Update ellpased time using EllapasedTime event

 CesarPlayer/Gui/CapturerBin.cs |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index b2be538..8d88c12 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -19,9 +19,10 @@
 //
 
 using System;
-using LongoMatch.Video.Capturer;
-using LongoMatch.Video;
 using Gtk;
+using LongoMatch.Video;
+using LongoMatch.Video.Capturer;
+using LongoMatch.Video.Utils;
 
 namespace LongoMatch.Gui
 {
@@ -46,7 +47,8 @@ namespace LongoMatch.Gui
 					capturerhbox.Remove(capturer as Gtk.Widget);
 				}
 				MultimediaFactory factory = new MultimediaFactory();
-				capturer = factory.getCapturer(value);			
+				capturer = factory.getCapturer(value);	
+				capturer.EllapsedTime += OnTick;
 				capturerhbox.Add((Widget)capturer);
 				((Widget)capturer).Show();
 			}
@@ -108,6 +110,10 @@ namespace LongoMatch.Gui
 		protected virtual void OnStopbuttonClicked (object sender, System.EventArgs e)
 		{
 			this.Stop();
-		}		
+		}				
+		
+		protected virtual void OnTick (int ellapsedTime){
+			timelabel.Text = "Time: " + TimeString.MSecondsToSecondsString(CurrentTime);
+		}
 	}
 }



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