예제 #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");
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
     }
 }
예제 #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));
        }
예제 #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));
        }