|
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 m |
|
|
16 |
/// </summary> |
|
|
17 |
public class LDTm |
|
|
18 |
{ |
|
|
19 |
/// <summary> |
|
|
20 |
/// Attribut |
|
|
21 |
/// </summary> |
|
|
22 |
public String Ref { get; set; } |
|
|
23 |
|
|
|
24 |
/// <summary> |
|
|
25 |
/// Attribut |
|
|
26 |
/// </summary> |
|
|
27 |
public String T { get; set; } |
|
|
28 |
|
|
|
29 |
/// <summary> |
|
|
30 |
/// Attribut |
|
|
31 |
/// </summary> |
|
|
32 |
public int Id { get; set; } |
|
|
33 |
|
|
|
34 |
/// <summary> |
|
|
35 |
/// Attribut |
|
|
36 |
/// </summary> |
|
|
37 |
public long C { get; set; } |
|
|
38 |
|
|
|
39 |
/// <summary> |
|
|
40 |
/// Elements |
|
|
41 |
/// </summary> |
|
|
42 |
public String Content { get; set; } |
|
|
43 |
public LDTm(XElement e) |
|
|
44 |
{ |
|
|
45 |
Ref = e.Attribute("ref").Value; |
|
|
46 |
T = e.Attribute("t").Value; |
|
|
47 |
Id = int.Parse(e.Attribute("id").Value); |
|
|
48 |
C = long.Parse(e.Attribute("c").Value); |
|
|
49 |
Content = e.Element("content").Value; |
|
|
50 |
} |
|
|
51 |
|
|
|
52 |
public XElement XML |
|
|
53 |
{ |
|
|
54 |
get |
|
|
55 |
{ |
|
|
56 |
return new XElement("m", |
|
|
57 |
new XAttribute("ref",Ref), |
|
|
58 |
new XAttribute("t",T), |
|
|
59 |
new XAttribute("id",Id), |
|
|
60 |
new XAttribute("c",C), |
|
|
61 |
new XElement("content",Content) |
|
|
62 |
); |
|
|
63 |
} |
|
|
64 |
} |
|
|
65 |
} |
|
|
66 |
} |