public static string GetDrawPosition() { string result = SettingsHelper.GetSetting <string>(SettingKey.DrawPosition.ToString()); if (result == null) { var size = GetWindowsResolution(); var drawPosition = "R-30||WN-30|Q-" + size.Height + "|"; SetDrawPosition(drawPosition); result = drawPosition; } else { var size = GetWindowsResolution(); var area = result.Split('|'); for (var i = 0; i < area.Length; i++) { if ((i >= 3) && (area[i] != "")) { var strArr = area[i].Split('-'); var strHeight = size.Height.ToString(CultureInfo.InvariantCulture); if (strArr[1] != strHeight) { area[i] = string.Format("{0}-{1}", strArr[0], strHeight); } } } var newDrawPosition = $"{area[0]}|{area[1]}|{area[2]}|{area[3]}|{area[4]}"; SetDrawPosition(newDrawPosition); } return(result); }
public static Tuple <bool, bool> GetIsDisplayRss() { bool isDisplayRss = SettingsHelper.GetSetting <bool>(SettingKey.IsDisplayRss.ToString()); bool isDisplayRssDescription = SettingsHelper.GetSetting <bool>(SettingKey.IsDisplayRssDescription.ToString()); Tuple <bool, bool> result = new Tuple <bool, bool>(isDisplayRss, isDisplayRssDescription); return(result); }
public static int GetImageService() { return(SettingsHelper.GetSetting <int>(SettingKey.ImageService.ToString())); }
public static string GetSaveToken() { return(SettingsHelper.GetSetting <string>(SettingKey.SaveToken.ToString())); }
public static int GetSaveMode() { return(SettingsHelper.GetSetting <int>(SettingKey.SaveMode.ToString())); }
public static string GetUserLocation() { return(SettingsHelper.GetSetting <string>(SettingKey.UserLocation.ToString())); }
public static Windows.Foundation.Size GetWindowsResolution() { return(SettingsHelper.GetSetting <Windows.Foundation.Size>(SettingKey.WindowsResolution.ToString())); }
public static int GetRssItemNum() { int result = SettingsHelper.GetSetting <int>(SettingKey.RssItemNum.ToString()); return(result == 0 ? 3 : result); }
public static string GetRssLink() { return(SettingsHelper.GetSetting <string>(SettingKey.RssLink.ToString())); }
public static string GetNote() { return(SettingsHelper.GetSetting <string>(SettingKey.Note.ToString())); }
public static string GetOfflineQuote() { return(SettingsHelper.GetSetting <string>(SettingKey.OfflineQuote.ToString())); }
public static bool BingGetShowInfo() { return(SettingsHelper.GetSetting <bool>(SettingKey.BingIsShowInfo.ToString())); }
public static string BingGetLanguage() { return(SettingsHelper.GetSetting <string>(SettingKey.BingLanguage.ToString())); }