public static List <string> GetAllSkinName()
        {
            List <string> SkinName = new List <string>();

            foreach (var currentDirectory in Directory.GetDirectories($@"{PathRootSkinFolder}\"))
            {
                foreach (var CurrentSkinName in Directory.GetFiles(currentDirectory, "*.png"))
                {
                    if (!CurrentSkinName.Contains("temp") && !CurrentSkinName.Contains("converted"))
                    {
                        SkinName.Add(CurrentSkinName);
                    }
                }
            }
            return(SkinName);
        }
Esempio n. 2
0
 public static void CleanFolder()
 {
     foreach (string currentDirectory in Directory.GetDirectories($@"{PathRootSkinFolder}\"))
     {
         foreach (string CurrentSkinName in Directory.GetFiles(currentDirectory, "*"))
         {
             if (CurrentSkinName.Contains("temp.png"))
             {
                 File.Delete(CurrentSkinName);
             }
             else if (CurrentSkinName.Contains("temp.dds"))
             {
                 File.Move(CurrentSkinName, CurrentSkinName.Replace("-temp.dds", ".dds"));
             }
             else if (!CurrentSkinName.Contains("-converted.png"))
             {
                 File.Move(CurrentSkinName, CurrentSkinName.Replace(".png", "-converted.png"));
             }
         }
     }
 }
Esempio n. 3
0
        public static void IndexSkins()
        {
            foreach (string currentDirectory in Directory.GetDirectories($@"{PathRootSkinFolder}\"))
            {
                foreach (string CurrentSkinName in Directory.GetFiles(currentDirectory, "*.png"))
                {
                    if (!CurrentSkinName.Contains("temp") & !CurrentSkinName.Contains("-converted"))
                    {
                        OrignalTexture.Add(CurrentSkinName);
                        Console.WriteLine("{0}{1}", ConsoleInfoText, CurrentSkinName);
                    }
                }
            }
            if (OrignalTexture.Count == 0)
            {
                Console.WriteLine("{0} No skin find".Pastel(Color.Red), ConsoleError);
                Console.WriteLine("Press any key to exit...");
                Console.ReadKey();
                Environment.Exit(0);
            }

            Console.WriteLine("{0}{1} skins indexed", ConsoleValidateText, OrignalTexture.Count);
        }