author | cavaliet |
Wed, 25 Nov 2009 10:48:46 +0100 | |
changeset 230 | 010a2af88bb7 |
parent 229 | 05aba5def1fc |
permissions | -rw-r--r-- |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
1 |
using System; |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
2 |
using System.Collections.Generic; |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
3 |
using System.Linq; |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
4 |
using System.Text; |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
5 |
using System.Windows.Media; |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
6 |
|
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
7 |
namespace FingersDance.Factory |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
8 |
{ |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
9 |
public class ColorFactory |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
10 |
{ |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
11 |
|
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
12 |
static Dictionary<uint, string> _ColorsStringId; |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
13 |
static Dictionary<uint, Color> _Colors; |
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:
160
diff
changeset
|
14 |
static Dictionary<uint, Color> _ColorsOrig; |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
15 |
|
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
16 |
public Dictionary<uint, string> ColorsStringId |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
17 |
{ |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
18 |
get { return _ColorsStringId; } |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
19 |
} |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
20 |
public Dictionary<uint, Color> Colors |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
21 |
{ |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
22 |
get { return _Colors; } |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
23 |
} |
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:
160
diff
changeset
|
24 |
public Dictionary<uint, Color> ColorsOrig |
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:
160
diff
changeset
|
25 |
{ |
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:
160
diff
changeset
|
26 |
get { return _ColorsOrig; } |
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:
160
diff
changeset
|
27 |
} |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
28 |
|
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
29 |
public ColorFactory() |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
30 |
{ |
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:
160
diff
changeset
|
31 |
init(); |
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:
160
diff
changeset
|
32 |
} |
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:
160
diff
changeset
|
33 |
|
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:
160
diff
changeset
|
34 |
private static void init() |
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:
160
diff
changeset
|
35 |
{ |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
36 |
if (_ColorsStringId == null) |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
37 |
{ |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
38 |
_ColorsStringId = new Dictionary<uint, string>(); |
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:
160
diff
changeset
|
39 |
//_ColorsStringId.Add(0, "DefaultColor_xaml"); |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
40 |
_ColorsStringId.Add(1, "Color_1_#FFFF00_xaml"); |
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:
160
diff
changeset
|
41 |
_ColorsStringId.Add(2, "Color_12_#00C800_xaml"); |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
42 |
_ColorsStringId.Add(3, "Color_3_#FF7D00__xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
43 |
_ColorsStringId.Add(4, "Color_4_#FF0000_xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
44 |
_ColorsStringId.Add(5, "Color_5_#FF0064_xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
45 |
_ColorsStringId.Add(6, "Color_6_#C80FA0_xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
46 |
_ColorsStringId.Add(7, "Color_7_#5A0FC8_xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
47 |
_ColorsStringId.Add(8, "Color_8_#230FD2_xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
48 |
_ColorsStringId.Add(9, "Color_9_#0096FF__xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
49 |
_ColorsStringId.Add(10, "Color_10_#009664_xaml"); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
50 |
_ColorsStringId.Add(11, "Color_11_#006432_xaml"); |
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:
160
diff
changeset
|
51 |
_ColorsStringId.Add(12, "Color_2_#FFC800_xaml"); |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
52 |
} |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
53 |
|
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
54 |
if (_Colors == null) |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
55 |
{ |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
56 |
_Colors = new Dictionary<uint, Color>(); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
57 |
_Colors.Add(0, Color.FromRgb(0x88, 0x88, 0x88)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
58 |
_Colors.Add(1, Color.FromRgb(0xFF, 0xFF, 0x00)); |
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:
160
diff
changeset
|
59 |
_Colors.Add(2, Color.FromRgb(0x00, 0xC8, 0x00)); |
160
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
60 |
_Colors.Add(3, Color.FromRgb(0xFF, 0x7D, 0x00)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
61 |
_Colors.Add(4, Color.FromRgb(0xFF, 0x00, 0x00)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
62 |
_Colors.Add(5, Color.FromRgb(0xFF, 0x00, 0x64)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
63 |
_Colors.Add(6, Color.FromRgb(0xC8, 0x0F, 0xA0)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
64 |
_Colors.Add(7, Color.FromRgb(0x5A, 0x0F, 0xC8)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
65 |
_Colors.Add(8, Color.FromRgb(0x23, 0x0F, 0xD2)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
66 |
_Colors.Add(9, Color.FromRgb(0x00, 0x96, 0xFF)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
67 |
_Colors.Add(10, Color.FromRgb(0x00, 0x96, 0x64)); |
e940ca798fe3
Enhance color factory and send the current project (data) to the timeline instance in order to build the project's cutting's annotation list.
cavaliet
parents:
156
diff
changeset
|
68 |
_Colors.Add(11, Color.FromRgb(0x00, 0x64, 0x32)); |
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:
160
diff
changeset
|
69 |
_Colors.Add(12, Color.FromRgb(0xFF, 0xC8, 0x00)); |
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:
160
diff
changeset
|
70 |
|
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:
160
diff
changeset
|
71 |
_ColorsOrig = new Dictionary<uint, 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:
160
diff
changeset
|
72 |
_ColorsOrig.Add(0, Color.FromRgb(0x88, 0x88, 0x88)); |
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:
160
diff
changeset
|
73 |
_ColorsOrig.Add(1, Color.FromRgb(0xFF, 0xFF, 0x00)); |
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:
160
diff
changeset
|
74 |
_ColorsOrig.Add(2, Color.FromRgb(0x00, 0xC8, 0x00)); |
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:
160
diff
changeset
|
75 |
_ColorsOrig.Add(3, Color.FromRgb(0xFF, 0x7D, 0x00)); |
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:
160
diff
changeset
|
76 |
_ColorsOrig.Add(4, Color.FromRgb(0xFF, 0x00, 0x00)); |
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:
160
diff
changeset
|
77 |
_ColorsOrig.Add(5, Color.FromRgb(0xFF, 0x00, 0x64)); |
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:
160
diff
changeset
|
78 |
_ColorsOrig.Add(6, Color.FromRgb(0xC8, 0x0F, 0xA0)); |
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:
160
diff
changeset
|
79 |
_ColorsOrig.Add(7, Color.FromRgb(0x5A, 0x0F, 0xC8)); |
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:
160
diff
changeset
|
80 |
_ColorsOrig.Add(8, Color.FromRgb(0x23, 0x0F, 0xD2)); |
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:
160
diff
changeset
|
81 |
_ColorsOrig.Add(9, Color.FromRgb(0x00, 0x96, 0xFF)); |
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:
160
diff
changeset
|
82 |
_ColorsOrig.Add(10, Color.FromRgb(0x00, 0x96, 0x64)); |
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:
160
diff
changeset
|
83 |
_ColorsOrig.Add(11, Color.FromRgb(0x00, 0x64, 0x32)); |
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:
160
diff
changeset
|
84 |
_ColorsOrig.Add(12, Color.FromRgb(0xFF, 0xC8, 0x00)); |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
85 |
} |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
86 |
} |
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:
160
diff
changeset
|
87 |
|
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:
160
diff
changeset
|
88 |
public static void TakeOffColor(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:
160
diff
changeset
|
89 |
{ |
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:
160
diff
changeset
|
90 |
init(); |
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:
160
diff
changeset
|
91 |
foreach(KeyValuePair<uint,Color> kvp in _Colors) |
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:
160
diff
changeset
|
92 |
{ |
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:
160
diff
changeset
|
93 |
if (_Colors[kvp.Key] == 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:
160
diff
changeset
|
94 |
{ |
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:
160
diff
changeset
|
95 |
_Colors.Remove(kvp.Key); |
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:
160
diff
changeset
|
96 |
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:
160
diff
changeset
|
97 |
} |
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:
160
diff
changeset
|
98 |
} |
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:
160
diff
changeset
|
99 |
} |
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:
160
diff
changeset
|
100 |
|
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:
160
diff
changeset
|
101 |
public static KeyValuePair<uint,Color> getAvailablePairUintColor() |
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:
160
diff
changeset
|
102 |
{ |
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:
160
diff
changeset
|
103 |
init(); |
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:
160
diff
changeset
|
104 |
foreach(KeyValuePair<uint,Color> kvp in _Colors) |
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:
160
diff
changeset
|
105 |
{ |
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:
160
diff
changeset
|
106 |
if (kvp.Value != Color.FromRgb(0x88, 0x88, 0x88)) |
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:
160
diff
changeset
|
107 |
return kvp; |
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:
160
diff
changeset
|
108 |
} |
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:
160
diff
changeset
|
109 |
return new KeyValuePair<uint,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:
160
diff
changeset
|
110 |
} |
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:
160
diff
changeset
|
111 |
|
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:
160
diff
changeset
|
112 |
public static uint getId(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:
160
diff
changeset
|
113 |
{ |
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:
160
diff
changeset
|
114 |
init(); |
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:
160
diff
changeset
|
115 |
foreach (KeyValuePair<uint, Color> kvp in _ColorsOrig) |
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:
160
diff
changeset
|
116 |
{ |
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:
160
diff
changeset
|
117 |
if (_ColorsOrig[kvp.Key] == 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:
160
diff
changeset
|
118 |
{ |
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:
160
diff
changeset
|
119 |
return kvp.Key; |
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:
160
diff
changeset
|
120 |
} |
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:
160
diff
changeset
|
121 |
} |
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:
160
diff
changeset
|
122 |
return 0; |
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:
160
diff
changeset
|
123 |
} |
156
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
124 |
} |
e16c8c913c65
Color Factory et application des couleurs au pivot
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff
changeset
|
125 |
} |