Click here to Skip to main content
15,918,275 members
Home / Discussions / C#
   

C#

 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 8:40
Le centriste14-Feb-08 8:40 
GeneralRe: Thread-safetiness of XmlSerializer Pin
led mike14-Feb-08 9:03
led mike14-Feb-08 9:03 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 9:11
Le centriste14-Feb-08 9:11 
GeneralRe: Thread-safetiness of XmlSerializer Pin
led mike14-Feb-08 9:21
led mike14-Feb-08 9:21 
GeneralRe: Thread-safetiness of XmlSerializer Pin
Le centriste14-Feb-08 9:25
Le centriste14-Feb-08 9:25 
GeneralGraph excel with C# Pin
JeremH14-Feb-08 4:34
JeremH14-Feb-08 4:34 
GeneralRe: Graph excel with C# Pin
Cwenee23-Sep-09 5:17
Cwenee23-Sep-09 5:17 
GeneralLoadProperties Pin
s3rro14-Feb-08 4:04
s3rro14-Feb-08 4:04 
I want to write a function to change the color property of all the controllers from an XML. XML tags are same as the controller names.

public void LoadProperties(Control control)
{
string name = control.Name;
control.ForeColor = ColorTranslator.FromHtml(xDoc1.SelectSingleNode("COLOR/Settings/" + (Name + "/ForeColor").InnerText.Trim());

}

So if the name exist in the XML it will retrieve the color info of fore and back color and and overwrite with the default ones.


XML:

<color> <settings>
<label1>
<forecolor>#FFFFFF
<backcolor>#330000


therefore under InitializeComponent(); when I run :

this.label1.ForeColor = System.Drawing.SystemColors.ActiveCaption;
// LoadProperties(this.label1);


LoadProperties will overwrite the default ForeColor with #FFFFFF

Right now it doesnt work. Do I have a logical mistake?
Thanks
GeneralRe: LoadProperties Pin
s3rro14-Feb-08 4:09
s3rro14-Feb-08 4:09 
GeneralRe: LoadProperties Pin
led mike14-Feb-08 4:34
led mike14-Feb-08 4:34 
GeneralC# Serial port communication Pin
Scalpa14-Feb-08 3:53
Scalpa14-Feb-08 3:53 
GeneralRe: C# Serial port communication Pin
DaveyM6914-Feb-08 4:14
professionalDaveyM6914-Feb-08 4:14 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 4:24
Scalpa14-Feb-08 4:24 
GeneralRe: C# Serial port communication Pin
Luc Pattyn14-Feb-08 4:42
sitebuilderLuc Pattyn14-Feb-08 4:42 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 5:22
Scalpa14-Feb-08 5:22 
GeneralRe: C# Serial port communication Pin
Luc Pattyn14-Feb-08 5:34
sitebuilderLuc Pattyn14-Feb-08 5:34 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 5:45
Scalpa14-Feb-08 5:45 
GeneralRe: C# Serial port communication Pin
Luc Pattyn14-Feb-08 5:52
sitebuilderLuc Pattyn14-Feb-08 5:52 
GeneralRe: C# Serial port communication Pin
DaveyM6914-Feb-08 5:48
professionalDaveyM6914-Feb-08 5:48 
GeneralRe: C# Serial port communication Pin
Luc Pattyn14-Feb-08 6:03
sitebuilderLuc Pattyn14-Feb-08 6:03 
GeneralRe: C# Serial port communication Pin
Scalpa14-Feb-08 6:22
Scalpa14-Feb-08 6:22 
GeneralRe: C# Serial port communication Pin
Scalpa26-Feb-08 6:04
Scalpa26-Feb-08 6:04 
GeneralUsing Google Maps in a C# application Pin
biscoito14-Feb-08 3:13
biscoito14-Feb-08 3:13 
GeneralRe: Using Google Maps in a C# application Pin
Mircea Puiu14-Feb-08 4:05
Mircea Puiu14-Feb-08 4:05 
GeneralRe: Using Google Maps in a C# application Pin
biscoito14-Feb-08 5:02
biscoito14-Feb-08 5:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.