L
Lonifasiko
I want to have an entry like this in my .exe.config file:
<AppSettings>
<add key="EmergencyFormColor" value="Color.Red" />
<add key="MainFormColor" value="Color.AliceBlue" />
</AppSettings>
I'm able to read this parameters from code with OpenNETCF.Configuration
namespace but I obtain string datatype. In order to assign the
BackColor property of the form, I need the type to be
System.Drawing.Color but I can't find a way to convert the value!
Another option: Instead of Color.Red, write 12,12,12, that is, RGB
values. But by code I would have to split the string in three parts,
and convert the values into integer in order to use Color.FromARGB(int
R, int G, int B).
Do you see any direct converion or way I can do this easily? I want the
user to be able to change application's color easily.
Thanks.
<AppSettings>
<add key="EmergencyFormColor" value="Color.Red" />
<add key="MainFormColor" value="Color.AliceBlue" />
</AppSettings>
I'm able to read this parameters from code with OpenNETCF.Configuration
namespace but I obtain string datatype. In order to assign the
BackColor property of the form, I need the type to be
System.Drawing.Color but I can't find a way to convert the value!
Another option: Instead of Color.Red, write 12,12,12, that is, RGB
values. But by code I would have to split the string in three parts,
and convert the values into integer in order to use Color.FromARGB(int
R, int G, int B).
Do you see any direct converion or way I can do this easily? I want the
user to be able to change application's color easily.
Thanks.