author | cavaliet |
Tue, 24 Nov 2009 22:08:57 +0100 | |
changeset 229 | 05aba5def1fc |
parent 192 | 11083c390ce4 |
permissions | -rw-r--r-- |
55 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
5 |
using System.Windows.Media; |
55 | 6 |
|
7 |
namespace FingersDance.Data |
|
8 |
{ |
|
69 | 9 |
public class Cutting |
55 | 10 |
{ |
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
11 |
private String _id; |
69 | 12 |
private List<Annotation> _annotList; |
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
13 |
private String _title; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
14 |
private Color _color; |
55 | 15 |
|
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
16 |
public Cutting(String idPar, String titlePar, List<Annotation> annotListPar, Color col) |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
17 |
{ |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
18 |
this._id = idPar; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
19 |
this._title = titlePar; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
20 |
this._annotList = annotListPar; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
21 |
this._color = col; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
22 |
} |
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
23 |
public Cutting(String idPar, String titlePar, List<Annotation> annotListPar) |
55 | 24 |
{ |
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
25 |
this._id = idPar; |
69 | 26 |
this._title = titlePar; |
27 |
this._annotList = annotListPar; |
|
55 | 28 |
} |
143 | 29 |
public Cutting() |
30 |
{} |
|
69 | 31 |
|
192
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
32 |
public String Id |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
33 |
{ |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
34 |
get { return _id; } |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
35 |
set |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
36 |
{ |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
37 |
if (value == _id || String.IsNullOrEmpty(value)) |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
38 |
return; |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
39 |
_id = value; |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
40 |
} |
11083c390ce4
Second step of data saving : id added for cutting and annotation, and now we can load/display/change the already existing projects.
cavaliet
parents:
143
diff
changeset
|
41 |
} |
69 | 42 |
public String Title |
43 |
{ |
|
44 |
get { return _title; } |
|
45 |
set |
|
46 |
{ |
|
47 |
if (value == _title || String.IsNullOrEmpty(value)) |
|
48 |
return; |
|
49 |
_title = value; |
|
50 |
} |
|
51 |
} |
|
52 |
public List<Annotation> AnnotList |
|
53 |
{ |
|
54 |
get { return _annotList; } |
|
55 |
set |
|
56 |
{ |
|
57 |
_annotList = value; |
|
58 |
} |
|
59 |
} |
|
229
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
60 |
public Color Color |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
61 |
{ |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
62 |
get { return _color; } |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
63 |
set |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
64 |
{ |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
65 |
if (value == _color) |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
66 |
return; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
67 |
_color = value; |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
68 |
} |
05aba5def1fc
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.
cavaliet
parents:
192
diff
changeset
|
69 |
} |
69 | 70 |
|
55 | 71 |
} |
72 |
} |