public static LoadTimezoneFromUserData ( ) : int? | ||
Результат | int? |
/// <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(currentWiki); if (culture == null) { culture = Preferences.LoadLanguageFromCookie(); } if (culture == null) { culture = Settings.GetDefaultLanguage(currentWiki); } string tempTimezone = Preferences.LoadTimezoneFromUserData(currentWiki); if (string.IsNullOrEmpty(tempTimezone)) { tempTimezone = Preferences.LoadTimezoneFromCookie(); } if (string.IsNullOrEmpty(tempTimezone)) { tempTimezone = Settings.GetDefaultTimezone(currentWiki); } languageSelector.SelectedLanguage = culture; languageSelector.SelectedTimezone = tempTimezone; }
/// <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(); }