|
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 |
/// Classe Abstraite pour les balises Content |
|
|
17 |
/// </summary> |
|
|
18 |
public abstract class LDTContent |
|
|
19 |
{ |
|
|
20 |
/// <summary> |
|
|
21 |
/// Attribut |
|
|
22 |
/// </summary> |
|
|
23 |
public String Id { get; set; } |
|
|
24 |
public LDTContent() |
|
|
25 |
{ } |
|
|
26 |
} |
|
|
27 |
|
|
|
28 |
/// <summary> |
|
|
29 |
/// Classe Content issue des Annotations |
|
|
30 |
/// </summary> |
|
|
31 |
public class LDTAnnotationsContent : LDTContent |
|
|
32 |
{ |
|
|
33 |
/// <summary> |
|
|
34 |
/// Attribut |
|
|
35 |
/// </summary> |
|
|
36 |
public String Title { get; set; } |
|
|
37 |
/// <summary> |
|
|
38 |
/// Attribut |
|
|
39 |
/// </summary> |
|
|
40 |
public String Author { get; set; } |
|
|
41 |
/// <summary> |
|
|
42 |
/// Attribut |
|
|
43 |
/// </summary> |
|
|
44 |
public String Abstract { get; set; } |
|
|
45 |
/// <summary> |
|
|
46 |
/// Elements |
|
|
47 |
/// </summary> |
|
|
48 |
public List<LDTAnnotationsDecoupage> Content { get; set; } |
|
|
49 |
|
|
|
50 |
public LDTAnnotationsContent(XElement e) |
|
|
51 |
{ |
|
|
52 |
Content = new List<LDTAnnotationsDecoupage>(); |
|
34
|
53 |
Id = e.Attribute("id").Value; |
|
0
|
54 |
Title = e.Attribute("title").Value; |
|
|
55 |
Author = e.Attribute("author").Value; |
|
|
56 |
Abstract = e.Attribute("abstract").Value; |
|
|
57 |
foreach (XElement Elem in e.Elements()) |
|
|
58 |
{ |
|
|
59 |
Content.Add(new LDTAnnotationsDecoupage(Elem)); |
|
|
60 |
} |
|
|
61 |
} |
|
34
|
62 |
public LDTAnnotationsContent() |
|
|
63 |
{ |
|
|
64 |
Id = String.Empty; |
|
|
65 |
Title = String.Empty; |
|
|
66 |
Author = String.Empty; |
|
|
67 |
Abstract = String.Empty; |
|
|
68 |
Content = new List<LDTAnnotationsDecoupage>(); |
|
|
69 |
} |
|
0
|
70 |
public XElement XML |
|
|
71 |
{ |
|
|
72 |
get |
|
|
73 |
{ |
|
|
74 |
XElement temp = new XElement("content", |
|
|
75 |
new XAttribute("id", Id), |
|
|
76 |
new XAttribute("title",Title), |
|
|
77 |
new XAttribute("author",Author), |
|
|
78 |
new XAttribute("abstract",Abstract) |
|
|
79 |
); |
|
|
80 |
|
|
|
81 |
foreach (LDTAnnotationsDecoupage LDTAD in Content) |
|
|
82 |
{ |
|
|
83 |
temp.Add(LDTAD.XML); |
|
|
84 |
} |
|
|
85 |
return temp; |
|
|
86 |
} |
|
|
87 |
} |
|
|
88 |
} |
|
|
89 |
|
|
|
90 |
/// <summary> |
|
|
91 |
/// Classe COntent issue des Displays |
|
|
92 |
/// </summary> |
|
|
93 |
public class LDTDisplaysContent : LDTContent |
|
|
94 |
{ |
|
|
95 |
/// <summary> |
|
|
96 |
/// Elements |
|
|
97 |
/// </summary> |
|
|
98 |
public List<LDTDisplaysDecoupage> Content { get; set; } |
|
|
99 |
|
|
|
100 |
public LDTDisplaysContent(XElement e) |
|
|
101 |
{ |
|
|
102 |
Content = new List<LDTDisplaysDecoupage>(); |
|
|
103 |
|
|
|
104 |
Id = e.Attribute("id").Value; |
|
|
105 |
foreach (XElement Elem in e.Elements()) |
|
|
106 |
{ |
|
|
107 |
Content.Add(new LDTDisplaysDecoupage(Elem)); |
|
|
108 |
} |
|
|
109 |
} |
|
|
110 |
public XElement XML |
|
|
111 |
{ |
|
|
112 |
get |
|
|
113 |
{ |
|
|
114 |
XElement temp = new XElement("content", |
|
|
115 |
new XAttribute("id",Id) |
|
|
116 |
); |
|
|
117 |
|
|
|
118 |
foreach (LDTDisplaysDecoupage LDTDD in Content) |
|
|
119 |
{ |
|
|
120 |
temp.Add(LDTDD.XML); |
|
|
121 |
} |
|
|
122 |
return temp; |
|
|
123 |
} |
|
|
124 |
} |
|
|
125 |
|
|
|
126 |
} |
|
|
127 |
} |