|
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 Project |
|
|
16 |
/// </summary> |
|
|
17 |
public class LDTProject |
|
|
18 |
{ |
|
|
19 |
/// <summary> |
|
|
20 |
/// Attribut |
|
|
21 |
/// </summary> |
|
|
22 |
public int Id { get; set; } |
|
|
23 |
/// <summary> |
|
|
24 |
/// Attribut |
|
|
25 |
/// </summary> |
|
|
26 |
public String User { get; set; } |
|
|
27 |
/// <summary> |
|
|
28 |
/// Attribut |
|
|
29 |
/// </summary> |
|
|
30 |
public String Title { get; set; } |
|
|
31 |
/// <summary> |
|
|
32 |
/// Attribut |
|
|
33 |
/// </summary> |
|
|
34 |
public String Abstract { get; set;} |
|
|
35 |
|
|
|
36 |
public LDTProject(XElement e) |
|
|
37 |
{ |
|
|
38 |
if (e.Name != "project") |
|
|
39 |
{ |
|
|
40 |
throw new Exception("XML node name doesn't match (LDT Project)"); |
|
|
41 |
} |
|
|
42 |
Id = int.Parse(e.Attribute("id").Value); |
|
|
43 |
User = e.Attribute("user").Value; |
|
|
44 |
Title = e.Attribute("title").Value; |
|
|
45 |
Abstract = e.Attribute("abstract").Value; |
|
|
46 |
} |
|
|
47 |
public LDTProject() |
|
|
48 |
{ |
|
34
|
49 |
Id = 0; |
|
|
50 |
User = String.Empty; |
|
|
51 |
Title = String.Empty; |
|
|
52 |
Abstract = String.Empty; |
|
0
|
53 |
} |
|
|
54 |
public XElement XML |
|
|
55 |
{ |
|
|
56 |
get |
|
|
57 |
{ |
|
|
58 |
return new XElement("project", |
|
|
59 |
new XAttribute("id",Id), |
|
|
60 |
new XAttribute("user",User), |
|
|
61 |
new XAttribute("title",Title), |
|
|
62 |
new XAttribute("abstract",Abstract) |
|
|
63 |
); |
|
|
64 |
} |
|
|
65 |
} |
|
|
66 |
|
|
|
67 |
} |
|
|
68 |
} |