|
0
|
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; |
|
|
11 |
using System.Xml.Linq; |
|
|
12 |
namespace Iri.Modernisation.Data.LDTClass |
|
|
13 |
{ |
|
|
14 |
/// <summary> |
|
|
15 |
/// Balise Media |
|
|
16 |
/// </summary> |
|
|
17 |
public class LDTMedia |
|
|
18 |
{ |
|
|
19 |
/// <summary> |
|
|
20 |
/// Attribut |
|
|
21 |
/// </summary> |
|
|
22 |
public String Id { get; set; } |
|
|
23 |
|
|
|
24 |
/// <summary> |
|
|
25 |
/// Attribut |
|
|
26 |
/// </summary> |
|
|
27 |
public String Src { get; set; } |
|
|
28 |
|
|
|
29 |
/// <summary> |
|
|
30 |
/// Attribut |
|
|
31 |
/// </summary> |
|
|
32 |
public String Video { get; set; } |
|
|
33 |
|
|
|
34 |
/// <summary> |
|
|
35 |
/// Attribut |
|
|
36 |
/// </summary> |
|
|
37 |
public String Pict { get; set; } |
|
|
38 |
|
|
|
39 |
/// <summary> |
|
|
40 |
/// Attribut |
|
|
41 |
/// </summary> |
|
|
42 |
public String Extra { get; set; } |
|
|
43 |
|
|
|
44 |
#region Constructors |
|
|
45 |
|
|
|
46 |
public LDTMedia() |
|
|
47 |
{ |
|
34
|
48 |
Id = String.Empty; |
|
|
49 |
Src = String.Empty; |
|
|
50 |
Video = String.Empty; |
|
|
51 |
Pict = String.Empty; |
|
|
52 |
Extra = String.Empty; |
|
0
|
53 |
} |
|
|
54 |
|
|
|
55 |
public LDTMedia(XElement e) |
|
|
56 |
{ |
|
|
57 |
if(e.Name != "media") |
|
|
58 |
{ |
|
|
59 |
throw new Exception("XML node name doesn't match (LDT Media)"); |
|
|
60 |
} |
|
|
61 |
Id = e.Attribute("id").Value; |
|
|
62 |
Src = e.Attribute("src").Value; |
|
|
63 |
Video = e.Attribute("video").Value; |
|
|
64 |
Pict = e.Attribute("pict").Value; |
|
|
65 |
Extra = e.Attribute("extra").Value; |
|
|
66 |
} |
|
|
67 |
#endregion |
|
|
68 |
public XElement XML |
|
|
69 |
{ |
|
|
70 |
get |
|
|
71 |
{ |
|
|
72 |
return new XElement("media", |
|
|
73 |
new XAttribute("id",Id), |
|
|
74 |
new XAttribute("src",Src), |
|
|
75 |
new XAttribute("video",Video), |
|
|
76 |
new XAttribute("pict",Pict), |
|
|
77 |
new XAttribute("extra",Extra) |
|
|
78 |
); |
|
|
79 |
} |
|
|
80 |
} |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
} |
|
|
84 |
} |