[longomatch] Add duration to CVS file



commit a5544bbbbd9418841c0429b597a2b189101b5510
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Dec 24 20:23:47 2009 +0100

    Add duration to CVS file

 LongoMatch/IO/CSVExport.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch/IO/CSVExport.cs b/LongoMatch/IO/CSVExport.cs
index 595d050..91e6be5 100644
--- a/LongoMatch/IO/CSVExport.cs
+++ b/LongoMatch/IO/CSVExport.cs
@@ -51,12 +51,17 @@ namespace LongoMatch.IO
 			list = project.GetDataArray();
 			sectionNames = project.GetSectionsNames();
 
-			tx.WriteLine("Section;Name;Team;StartTime;StopTime");
+			tx.WriteLine("Section;Name;Team;StartTime;StopTime;Duration");
 
 			for (int i=0; i<list.Count; i++) {
 				string sectionName = sectionNames[i];
 				foreach (MediaTimeNode tn in list[i]) {
-					tx.WriteLine("\""+sectionName+"\";\""+tn.Name+"\";\""+tn.Team+"\";\""+tn.Start.ToMSecondsString()+"\";\""+tn.Stop.ToMSecondsString()+"\"");
+					tx.WriteLine("\""+sectionName+"\";\""+
+					             tn.Name+"\";\""+
+					             tn.Team+"\";\""+
+					             tn.Start.ToMSecondsString()+"\";\""+
+					             tn.Stop.ToMSecondsString()+"\";\""+
+					             (tn.Stop-tn.Start).ToMSecondsString()+"\"");
 				}
 			}
 			tx.Close();



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