client/src/Iri.Modernisation.Data/Models/VideoSequence.cs
changeset 36 b6df6fce6e5d
parent 34 4d9ebc6fbbe8
--- a/client/src/Iri.Modernisation.Data/Models/VideoSequence.cs	Mon Jan 25 09:30:22 2010 +0100
+++ b/client/src/Iri.Modernisation.Data/Models/VideoSequence.cs	Wed Jan 27 10:37:39 2010 +0100
@@ -8,7 +8,8 @@
 using System.Windows.Media;
 using System.Windows.Media.Animation;
 using System.Windows.Shapes;
-
+using System.Xml.Linq;
+using System.Collections.Generic;
 namespace Iri.Modernisation.Data.Models
 {
     /// <summary>
@@ -73,7 +74,26 @@
                 return TimerIn + Duration;
             }
         }
-        
+
+        static public List<VideoSequence> GetProductionVideo(XDocument xdoc)
+        {
+            List<VideoSequence> returnList = new List<VideoSequence>();
+            foreach (XElement XVideo in xdoc.Root.Elements()) 
+            {
+              
+               returnList.Add(
+                   new VideoSequence()
+                    {
+                        Path =   XVideo.Attribute("mediafile").Value,
+                        RunTime = TimeSpan.FromMilliseconds(double.Parse(XVideo.Attribute("dur").Value)),
+                        BeginTrim = new TimeSpan(0, 0, 0),
+                        EndTrim = new TimeSpan(0, 0, 0),
+                    }
+                );
+            }
+            return returnList;
+        }
+
 
     }
 }