|
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.Collections.Generic; |
|
|
12 |
using System.Xml.Linq; |
|
|
13 |
namespace Iri.Modernisation.Data.LDTClass |
|
|
14 |
{ |
|
|
15 |
/// <summary> |
|
|
16 |
/// Balise Display |
|
|
17 |
/// </summary> |
|
|
18 |
public class LDTDisplay |
|
|
19 |
{ |
|
|
20 |
/// <summary> |
|
|
21 |
/// Attribut |
|
|
22 |
/// </summary> |
|
|
23 |
public int Id{get;set;} |
|
|
24 |
/// <summary> |
|
|
25 |
/// Attribut |
|
|
26 |
/// </summary> |
|
|
27 |
public String Title{get;set;} |
|
|
28 |
/// <summary> |
|
|
29 |
/// Attribut |
|
|
30 |
/// </summary> |
|
|
31 |
public String IdSel{get;set;} |
|
|
32 |
/// <summary> |
|
|
33 |
/// Attribut |
|
|
34 |
/// </summary> |
|
|
35 |
public int Tc{get;set;} |
|
|
36 |
/// <summary> |
|
|
37 |
/// Attribut |
|
|
38 |
/// </summary> |
|
|
39 |
public int Zoom{get;set;} |
|
|
40 |
/// <summary> |
|
|
41 |
/// Attribut |
|
|
42 |
/// </summary> |
|
|
43 |
public int Scroll{get;set;} |
|
|
44 |
/// <summary> |
|
|
45 |
/// Attribut |
|
|
46 |
/// </summary> |
|
|
47 |
public String InfoBAB{get;set;} |
|
|
48 |
/// <summary> |
|
|
49 |
/// Elements |
|
|
50 |
/// </summary> |
|
|
51 |
public List<LDTDisplaysContent> Content{get;set;} |
|
|
52 |
public LDTDisplay(XElement e) |
|
|
53 |
{ |
|
|
54 |
Content = new List<LDTDisplaysContent>(); |
|
|
55 |
|
|
|
56 |
Id = int.Parse(e.Attribute("id").Value); |
|
|
57 |
Title = e.Attribute("title").Value; |
|
|
58 |
IdSel = e.Attribute("idsel").Value; |
|
|
59 |
Tc = int.Parse(e.Attribute("tc").Value); |
|
|
60 |
Zoom = int.Parse(e.Attribute("zoom").Value); |
|
|
61 |
Scroll = int.Parse(e.Attribute("scroll").Value); |
|
|
62 |
InfoBAB = e.Attribute("infoBAB").Value; |
|
39
|
63 |
if (e.Element("content")!=null) |
|
0
|
64 |
{ |
|
39
|
65 |
foreach (XElement Elem in e.Element("content").Elements()) |
|
|
66 |
{ |
|
|
67 |
Content.Add(new LDTDisplaysContent(Elem)); |
|
|
68 |
} |
|
0
|
69 |
} |
|
|
70 |
} |
|
|
71 |
public XElement XML |
|
|
72 |
{ |
|
|
73 |
get |
|
|
74 |
{ |
|
|
75 |
XElement temp = new XElement("display", |
|
|
76 |
new XAttribute("id",Id), |
|
|
77 |
new XAttribute("title",Title), |
|
|
78 |
new XAttribute("idsel",IdSel), |
|
|
79 |
new XAttribute("tc",Tc), |
|
|
80 |
new XAttribute("zoom",Zoom), |
|
|
81 |
new XAttribute("scroll",Scroll), |
|
|
82 |
new XAttribute("infoBAB",InfoBAB) |
|
|
83 |
); |
|
|
84 |
foreach (LDTDisplaysContent LDTDC in Content) |
|
|
85 |
{ |
|
|
86 |
temp.Add(LDTDC.XML); |
|
|
87 |
} |
|
|
88 |
return temp; |
|
|
89 |
|
|
|
90 |
} |
|
|
91 |
} |
|
|
92 |
|
|
|
93 |
} |
|
|
94 |
} |