コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public static int GetImageService()
 {
     return(SettingsHelper.GetSetting <int>(SettingKey.ImageService.ToString()));
 }
コード例 #4
0
 public static string GetSaveToken()
 {
     return(SettingsHelper.GetSetting <string>(SettingKey.SaveToken.ToString()));
 }
コード例 #5
0
 public static int GetSaveMode()
 {
     return(SettingsHelper.GetSetting <int>(SettingKey.SaveMode.ToString()));
 }
コード例 #6
0
 public static string GetUserLocation()
 {
     return(SettingsHelper.GetSetting <string>(SettingKey.UserLocation.ToString()));
 }
コード例 #7
0
 public static Windows.Foundation.Size GetWindowsResolution()
 {
     return(SettingsHelper.GetSetting <Windows.Foundation.Size>(SettingKey.WindowsResolution.ToString()));
 }
コード例 #8
0
        public static int GetRssItemNum()
        {
            int result = SettingsHelper.GetSetting <int>(SettingKey.RssItemNum.ToString());

            return(result == 0 ? 3 : result);
        }
コード例 #9
0
 public static string GetRssLink()
 {
     return(SettingsHelper.GetSetting <string>(SettingKey.RssLink.ToString()));
 }
コード例 #10
0
 public static string GetNote()
 {
     return(SettingsHelper.GetSetting <string>(SettingKey.Note.ToString()));
 }
コード例 #11
0
 public static string GetOfflineQuote()
 {
     return(SettingsHelper.GetSetting <string>(SettingKey.OfflineQuote.ToString()));
 }
コード例 #12
0
 public static bool BingGetShowInfo()
 {
     return(SettingsHelper.GetSetting <bool>(SettingKey.BingIsShowInfo.ToString()));
 }
コード例 #13
0
 public static string BingGetLanguage()
 {
     return(SettingsHelper.GetSetting <string>(SettingKey.BingLanguage.ToString()));
 }