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

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