S
schaf
Hi NG !
I set the CurrentCulture and the CurrentUICulture at the start of my
app using this code:
string sUICulture =
System.Configuration.ConfigurationSettings.AppSettings["UICulture"];
if (sUICulture != null) {
CultureInfo cultInfo = new CultureInfo(sUICulture);
Thread.CurrentThread.CurrentUICulture = cultInfo;
Thread.CurrentThread.CurrentCulture = cultInfo;
}
That fine, all my UI text appears according the settings in the
app.config. But in one case, I handle an event of a related system. (At
the moment no synchronisation is done). This code runs with the culture
settings of the System. (That's OK, because i did not synchronize). Now
I would like to check if Invoke is required (InvokeRequired). But this
does not work. The value is set to true, but if I debug the project,
the code within the if clause would not be executed. Why ?
In this state of execution it is possible to retrieve the
CurrentUICulture for the thread, but after an aditional call of a
function, it is neither possible the get the UICulture from the thread,
nor from the System. Why? What could go wrong ?
Thanks
Marcel
I set the CurrentCulture and the CurrentUICulture at the start of my
app using this code:
string sUICulture =
System.Configuration.ConfigurationSettings.AppSettings["UICulture"];
if (sUICulture != null) {
CultureInfo cultInfo = new CultureInfo(sUICulture);
Thread.CurrentThread.CurrentUICulture = cultInfo;
Thread.CurrentThread.CurrentCulture = cultInfo;
}
That fine, all my UI text appears according the settings in the
app.config. But in one case, I handle an event of a related system. (At
the moment no synchronisation is done). This code runs with the culture
settings of the System. (That's OK, because i did not synchronize). Now
I would like to check if Invoke is required (InvokeRequired). But this
does not work. The value is set to true, but if I debug the project,
the code within the if clause would not be executed. Why ?
In this state of execution it is possible to retrieve the
CurrentUICulture for the thread, but after an aditional call of a
function, it is neither possible the get the UICulture from the thread,
nor from the System. Why? What could go wrong ?
Thanks
Marcel