L
Lonifasiko
Hi,
I would need some expert advice around this issue:
My application is divided into 4/5 different areas, therefore, 4/5
different kinds of forms. Each area is going to have a different
bakground color for the form, for the buttons, for the textboxes, the
forecolor of the texts and so on.
I was thinking in using a XML file (or .config file in order to read it
with OpenNETCF.Configuration classes) to mantain this information
correctly structured. I think this is better instead of hardcodiing the
RGB values in each form of the application ;-)
This way, I change the values in this file, I read all values and load
them into memory (static structure accesible along all the
application:NameValueCollection) when starting the application and
finally, each form loads its corresponding values.
What do you think about?
I also would like to have some predefined masks or colors
configuration. This is the idea I have:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Colors"
type="OpenNETCF.Configuration.NameValueSectionHandler" />
</configSections>
<Colors>
<Fashion>
<Area1>
<FormBackColor>255,255,255</FormBackColor>
<TextForeColor>41,41,56</TextForeColor>
<ButtonActiveBackColor>89,89,230</ButtonActiveBackColor>
</Area1>
<Area2>
<FormBackColor>255,1,255</FormBackColor>
<TextForeColor>41,67,56</TextForeColor>
<ButtonActiveBackColor>89,90,230</ButtonActiveBackColor>
</Area2>
...
</Fashion>
<Classic>
<Area1>
<FormBackColor>0,255,255</FormBackColor>
<TextForeColor>56,56,56</TextForeColor>
<ButtonActiveBackColor>89,230,230</ButtonActiveBackColor>
</Area1>
<Area2>
<FormBackColor>78,1,255</FormBackColor>
<TextForeColor>41,20,44</TextForeColor>
<ButtonActiveBackColor>45,78,30</ButtonActiveBackColor>
</Area2>
...
</Classic>
...
</Colors>
</configuration>
What do you think of this? Too many work maybe? Any other ideas taking
into account performance is very important for me?
Another problem is that I would read the file and would have
"222,56,57" like values. Then I should make a convertion in order to
use Color.FromArgb(int R, int G, int B) method? I'm sure this operation
hits performance very much. Any other way?
Storing in database is another possibility but I think would take much
time.
Thanks very much in advance.
I would need some expert advice around this issue:
My application is divided into 4/5 different areas, therefore, 4/5
different kinds of forms. Each area is going to have a different
bakground color for the form, for the buttons, for the textboxes, the
forecolor of the texts and so on.
I was thinking in using a XML file (or .config file in order to read it
with OpenNETCF.Configuration classes) to mantain this information
correctly structured. I think this is better instead of hardcodiing the
RGB values in each form of the application ;-)
This way, I change the values in this file, I read all values and load
them into memory (static structure accesible along all the
application:NameValueCollection) when starting the application and
finally, each form loads its corresponding values.
What do you think about?
I also would like to have some predefined masks or colors
configuration. This is the idea I have:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Colors"
type="OpenNETCF.Configuration.NameValueSectionHandler" />
</configSections>
<Colors>
<Fashion>
<Area1>
<FormBackColor>255,255,255</FormBackColor>
<TextForeColor>41,41,56</TextForeColor>
<ButtonActiveBackColor>89,89,230</ButtonActiveBackColor>
</Area1>
<Area2>
<FormBackColor>255,1,255</FormBackColor>
<TextForeColor>41,67,56</TextForeColor>
<ButtonActiveBackColor>89,90,230</ButtonActiveBackColor>
</Area2>
...
</Fashion>
<Classic>
<Area1>
<FormBackColor>0,255,255</FormBackColor>
<TextForeColor>56,56,56</TextForeColor>
<ButtonActiveBackColor>89,230,230</ButtonActiveBackColor>
</Area1>
<Area2>
<FormBackColor>78,1,255</FormBackColor>
<TextForeColor>41,20,44</TextForeColor>
<ButtonActiveBackColor>45,78,30</ButtonActiveBackColor>
</Area2>
...
</Classic>
...
</Colors>
</configuration>
What do you think of this? Too many work maybe? Any other ideas taking
into account performance is very important for me?
Another problem is that I would read the file and would have
"222,56,57" like values. Then I should make a convertion in order to
use Color.FromArgb(int R, int G, int B) method? I'm sure this operation
hits performance very much. Any other way?
Storing in database is another possibility but I think would take much
time.
Thanks very much in advance.