|
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 inst |
|
|
16 |
/// </summary> |
|
|
17 |
public class LDTInst |
|
|
18 |
{ |
|
|
19 |
/// <summary> |
|
|
20 |
/// Attribut |
|
|
21 |
/// </summary> |
|
|
22 |
public String Ref { get; set; } |
|
|
23 |
/// <summary> |
|
|
24 |
/// Attribut |
|
|
25 |
/// </summary> |
|
|
26 |
public long Begin { get; set; } |
|
|
27 |
/// <summary> |
|
|
28 |
/// Attribut |
|
|
29 |
/// </summary> |
|
|
30 |
public long End { get; set; } |
|
|
31 |
/// <summary> |
|
|
32 |
/// Attribut |
|
|
33 |
/// </summary> |
|
|
34 |
public int M { get; set; } |
|
|
35 |
/// <summary> |
|
|
36 |
/// Attribut |
|
|
37 |
/// </summary> |
|
|
38 |
public int V { get; set; } |
|
|
39 |
/// <summary> |
|
|
40 |
/// Attribut |
|
|
41 |
/// </summary> |
|
|
42 |
public int eBegin { get; set; } |
|
|
43 |
/// <summary> |
|
|
44 |
/// Attribut |
|
|
45 |
/// </summary> |
|
|
46 |
public int eEnd { get; set; } |
|
|
47 |
/// <summary> |
|
|
48 |
/// Attribut |
|
|
49 |
/// </summary> |
|
|
50 |
public int TrId { get; set; } |
|
|
51 |
/// <summary> |
|
|
52 |
/// Attribut |
|
|
53 |
/// </summary> |
|
|
54 |
public int TrIc { get; set; } |
|
|
55 |
/// <summary> |
|
|
56 |
/// Attribut |
|
|
57 |
/// </summary> |
|
|
58 |
public int TrOd { get; set; } |
|
|
59 |
/// <summary> |
|
|
60 |
/// Attribut |
|
|
61 |
/// </summary> |
|
|
62 |
public int TrOc { get; set; } |
|
|
63 |
public LDTInst(XElement e) |
|
|
64 |
{ |
|
|
65 |
Ref = e.Attribute("ref").Value; |
|
|
66 |
Begin = long.Parse(e.Attribute("begin").Value); |
|
|
67 |
End = long.Parse(e.Attribute("end").Value); |
|
|
68 |
M = int.Parse(e.Attribute("m").Value); |
|
|
69 |
V = int.Parse(e.Attribute("v").Value); |
|
|
70 |
eBegin = int.Parse(e.Attribute("eBegin").Value); |
|
|
71 |
eEnd = int.Parse(e.Attribute("eEnd").Value); |
|
|
72 |
TrId = int.Parse(e.Attribute("trId").Value); |
|
|
73 |
TrIc = int.Parse(e.Attribute("trIc").Value); |
|
|
74 |
TrOd = int.Parse(e.Attribute("trOd").Value); |
|
|
75 |
TrOc = int.Parse(e.Attribute("trOc").Value); |
|
|
76 |
} |
|
|
77 |
|
|
|
78 |
public XElement XML |
|
|
79 |
{ |
|
|
80 |
get |
|
|
81 |
{ |
|
|
82 |
return new XElement("inst", |
|
|
83 |
new XAttribute("ref",Ref), |
|
|
84 |
new XAttribute("begin",Begin), |
|
|
85 |
new XAttribute("end",End), |
|
|
86 |
new XAttribute("m",M), |
|
|
87 |
new XAttribute("v",V), |
|
|
88 |
new XAttribute("eBegin",eBegin), |
|
|
89 |
new XAttribute("eEnd",eEnd), |
|
|
90 |
new XAttribute("trId",TrId), |
|
|
91 |
new XAttribute("trIc",TrIc), |
|
|
92 |
new XAttribute("trOd",TrOd), |
|
|
93 |
new XAttribute("trOc",TrOc) |
|
|
94 |
); |
|
|
95 |
} |
|
|
96 |
} |
|
|
97 |
} |
|
|
98 |
} |