var zones = new TimeZoneIds().GetTimeZoneIds();
foreach (var tz in zones)
{
cbTimeZone.Items.Add(tz.Key);
}
cbTimeZone.Text = settings.Auth.CurrentAuthConfig.TimeZone;
Save ComboBox Selected:
//TimeZones for current Player
var x = new TimeZoneIds().GetTimeZoneIds();
_settings.Auth.CurrentAuthConfig.TimeZone = cbTimeZone.Text;
_settings.Auth.CurrentAuthConfig.Country = x[cbTimeZone.Text].Item1;
_settings.Auth.CurrentAuthConfig.Language = x[cbTimeZone.Text].Item2;
_settings.Auth.CurrentAuthConfig.POSIX = x[cbTimeZone.Text].Item3;
//
//TODO: need edition!!! //Ordre: TimeZone Name, Country, Language, POSIX
Source and credits
TimeZones file
Usage load ComboBox values:
Save ComboBox Selected:
Settings result: