/// <summary>
/// Loads language and time zone settings.
/// </summary>
private void LoadLanguageAndTimezoneSettings()
{
// Load hard-stored settings
// If not available, look for cookie
// If not available, load defaults
string culture = Preferences.LoadLanguageFromUserData();
if (culture == null)
{
culture = Preferences.LoadLanguageFromCookie();
}
if (culture == null)
{
culture = Settings.DefaultLanguage;
}
int?tempTimezone = Preferences.LoadTimezoneFromUserData();
if (!tempTimezone.HasValue)
{
tempTimezone = Preferences.LoadTimezoneFromCookie();
}
if (!tempTimezone.HasValue)
{
tempTimezone = Settings.DefaultTimezone;
}
languageSelector.SelectedLanguage = culture;
languageSelector.SelectedTimezone = tempTimezone.ToString();
}