Click here to Skip to main content
16,006,348 members
Home / Discussions / C#
   

C#

 
GeneralRe: ListBox events Pin
Jacky Yiu5-Dec-07 0:45
Jacky Yiu5-Dec-07 0:45 
GeneralRe: ListBox events Pin
Deian5-Dec-07 1:04
Deian5-Dec-07 1:04 
GeneralRe: ListBox events Pin
Justin Perez5-Dec-07 2:19
Justin Perez5-Dec-07 2:19 
GeneralRe: ListBox events Pin
Deian5-Dec-07 2:36
Deian5-Dec-07 2:36 
GeneralRe: ListBox events Pin
Justin Perez5-Dec-07 2:50
Justin Perez5-Dec-07 2:50 
GeneralBinding Combo box with database Pin
sindhutiwari5-Dec-07 0:29
sindhutiwari5-Dec-07 0:29 
GeneralRe: Binding Combo box with database Pin
Jacky Yiu5-Dec-07 0:40
Jacky Yiu5-Dec-07 0:40 
GeneralSetting Labels text specific to the current system culture . Pin
PranavThakur5-Dec-07 0:08
PranavThakur5-Dec-07 0:08 
I am using the concept of satellite assembly in my application.I have created two satellite assemblies as Satellite.fr-FR.resources.dll and Satellite.en-US.resources.dll for french and english respectively.

I have initialize resource manager as:-

ResourceManager rm = new ResourceManager("Satellite." + System.Globalization.CultureInfo.CurrentCulture.Name, Assembly.GetExecutingAssembly());

From the above code the application automatically detects the current culture of the system.Depending on the current culture I am setting the labels text on a form like this:-


private void button1_Click(object sender, EventArgs e)
{
SetText(this);
}

void SetText(Control ctl)
{

string text = rm.GetString(ctl.Name);

if (text != null)
ctl.Text = text;


foreach (Control ctl1 in ctl.Controls)
{

SetText(ctl1);
}

}
I am trying to find out a way by which my application set the Labels text itself when ever the system language changes. I mean i want to get rid of SetText() method written above.Is there any way by which I don't have to write any method like SetText() for setting all my controls text.If any one has any idea then please let me know.

Thanks.
GeneralRemove "Delete-Key" on dataGridView Pin
M Riaz Bashir5-Dec-07 0:08
M Riaz Bashir5-Dec-07 0:08 
GeneralRe: Remove "Delete-Key" on dataGridView Pin
dan!sh 5-Dec-07 0:12
professional dan!sh 5-Dec-07 0:12 
GeneralRe: Remove "Delete-Key" on dataGridView Pin
M Riaz Bashir5-Dec-07 0:14
M Riaz Bashir5-Dec-07 0:14 
QuestionVista file access Pin
brain2cpu4-Dec-07 23:39
professionalbrain2cpu4-Dec-07 23:39 
GeneralRe: Vista file access Pin
mav.northwind4-Dec-07 23:49
mav.northwind4-Dec-07 23:49 
GeneralRe: Vista file access Pin
Pete O'Hanlon5-Dec-07 3:16
mvePete O'Hanlon5-Dec-07 3:16 
GeneralRe: Vista file access Pin
David Knechtges5-Dec-07 4:07
David Knechtges5-Dec-07 4:07 
Questionfile operation problem Pin
leovava4-Dec-07 23:17
leovava4-Dec-07 23:17 
GeneralRe: file operation problem Pin
CKnig5-Dec-07 0:47
CKnig5-Dec-07 0:47 
Generalupdate desktop project from web Pin
greekius4-Dec-07 22:36
greekius4-Dec-07 22:36 
GeneralRe: update desktop project from web Pin
Jacky Yiu4-Dec-07 23:47
Jacky Yiu4-Dec-07 23:47 
GeneralLoading treeview from database using BackGroundWorker class Pin
D i x y4-Dec-07 22:34
D i x y4-Dec-07 22:34 
GeneralRe: Loading treeview from database using BackGroundWorker class Pin
mav.northwind4-Dec-07 23:50
mav.northwind4-Dec-07 23:50 
GeneralRe: Loading treeview from database using BackGroundWorker class Pin
Jacky Yiu5-Dec-07 0:02
Jacky Yiu5-Dec-07 0:02 
QuestionContains dows not work properly...? Pin
Pankaj - Joshi4-Dec-07 22:16
Pankaj - Joshi4-Dec-07 22:16 
AnswerRe: Contains dows not work properly...? Pin
dan!sh 4-Dec-07 22:52
professional dan!sh 4-Dec-07 22:52 
GeneralNot working yet???? Pin
Pankaj - Joshi4-Dec-07 23:03
Pankaj - Joshi4-Dec-07 23:03 

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.