Exemple #1
0
 public static void SaveNewSoftSet()
 {
     SoftSave("Version", Soft.MainVersion().ToString());
     SoftSave("UpdateTime", string.Format("{0:yyyy-MM-dd}", DateTime.Now));
     SoftSave("Extraction", Soft.Temp + "Extraction\\");
     SoftSave("UpdateUrl", "http://www.lolskin.cc/update.php");
     SoftSave("SoftTheme", "Blue");
 }
Exemple #2
0
        /// <summary>
        /// 皮肤原画
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        public static string SkinOriginalPath(Skin skin)
        {
            var path = Soft.SkinOriginalPath(skin);

            if (string.IsNullOrWhiteSpace(path) || !File.Exists(path))
            {
                path = SkinBackImagePath(skin);
            }
            return(path);
        }
Exemple #3
0
        /// <summary>
        /// 皮肤载入图
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        public static string SkinLoadPath(Skin skin)
        {
            var path = Soft.SkinLoadPath(skin);

            if (string.IsNullOrWhiteSpace(path) || !File.Exists(path))
            {
                path = HeroLoadPath(skin.Hero);
            }
            if (string.IsNullOrWhiteSpace(path) || !File.Exists(path))
            {
                path = HeroLoadPath(skin.Hero);
            }
            return(path);
        }
Exemple #4
0
        /// <summary>
        /// 皮肤载入图
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        public static BitmapImage SkinLoad(Skin skin)
        {
            BitmapImage image;
            var         path = Soft.SkinLoadPath(skin);

            if (File.Exists(path))
            {
                image = BitmapLoad(path);
            }
            else
            {
                image = HeroLoad(skin.Hero);
            }
            return(image);
        }
Exemple #5
0
        /// <summary>
        /// 皮肤预览图地址
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        private static string SkinBackImagePath(Skin skin)
        {
            var path = Soft.SkinBackImagePath(skin);

            if (string.IsNullOrWhiteSpace(path) || !File.Exists(path))
            {
                path = HeroOriginalPath(skin.Hero);
            }
            if (string.IsNullOrWhiteSpace(path) || !File.Exists(path))
            {
                path = Soft.LogoIcoPath;
            }
            if (path == null)
            {
                CopyFile();
            }
            return(path);
        }
Exemple #6
0
 public static string SkinConfigSave(Skin skin)
 {
     try
     {
         var file   = Soft.SkinConfig(skin);
         var config = new Configuration();
         config["Skin"]["Hero"].SetValue(skin.Hero);
         config["Skin"]["SkinName"].SetValue(skin.SkinName);
         config["Skin"]["FileName"].SetValue(skin.SkinName + ".zip");
         config["Skin"]["Author"].SetValue(skin.Author);
         config["Skin"]["Comment"].SetValue(skin.Comment);
         config.SaveToFile(file);
         return(file);
     }
     catch
     {
         return(null);
     }
 }
Exemple #7
0
        /// <summary>
        /// 皮肤原画
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        public static BitmapImage SkinOriginal(Skin skin)
        {
            var path = Soft.SkinOriginalPath(skin);

            return(File.Exists(path) ? BitmapOrigina(path) : SkinBackImage(skin));
        }
Exemple #8
0
        /// <summary>
        /// 皮肤预览图地址
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        private static BitmapImage SkinBackImage(Skin skin)
        {
            var path = Soft.SkinBackImagePath(skin);

            return(File.Exists(path) ? BitmapLoad(path) : HeroOriginal(skin.Hero));
        }