|
34
|
1 |
using System; |
|
|
2 |
using System.Net; |
|
|
3 |
using System.Windows; |
|
|
4 |
using System.Windows.Controls; |
|
|
5 |
using System.Windows.Documents; |
|
|
6 |
using System.Windows.Ink; |
|
|
7 |
using System.Windows.Input; |
|
|
8 |
using System.Windows.Media; |
|
|
9 |
using System.Windows.Media.Animation; |
|
|
10 |
using System.Windows.Shapes; |
|
35
|
11 |
using System.Collections.Generic; |
|
|
12 |
using System.Xml.Linq; |
|
|
13 |
namespace Iri.Modernisation.Data.LDTClass |
|
34
|
14 |
{ |
|
|
15 |
public class IRIMedia |
|
|
16 |
{ |
|
35
|
17 |
public String Id { get; set; } |
|
|
18 |
public List<IRIVideo> Videos { get; set; } |
|
|
19 |
public IRIMedia() |
|
|
20 |
{ |
|
|
21 |
Id = String.Empty; |
|
|
22 |
Videos = new List<IRIVideo>(); |
|
|
23 |
} |
|
|
24 |
public IRIMedia(XElement elem) |
|
|
25 |
{ |
|
|
26 |
Id = elem.Attribute("id").Value; |
|
38
|
27 |
Videos = new List<IRIVideo>(); |
|
35
|
28 |
foreach (XElement XVideos in elem.Elements()) |
|
|
29 |
{ |
|
|
30 |
Videos.Add(new IRIVideo(XVideos)); |
|
|
31 |
} |
|
|
32 |
} |
|
|
33 |
public XElement XML |
|
|
34 |
{ |
|
|
35 |
get |
|
|
36 |
{ |
|
|
37 |
XElement temp = new XElement("media",new XAttribute("id",Id)); |
|
|
38 |
foreach (IRIVideo video in Videos) |
|
|
39 |
{ |
|
|
40 |
temp.Add(video.XML); |
|
|
41 |
} |
|
34
|
42 |
|
|
35
|
43 |
return temp; |
|
|
44 |
} |
|
|
45 |
} |
|
34
|
46 |
} |
|
|
47 |
} |