Exemplo n.º 1
0
        private void 解压压缩包的图片()
        {
            Comment  = "解压压缩包的图片";
            TempPath = Soft.ZipTempPath(Skin.Hero);
            FileOperations.CreateDir(TempPath);
            var files = ZipFiles.Where(d => d != null && (d.EndsWith(".dds") || d.EndsWith(".png") || d.EndsWith(".jpg") || d.EndsWith(".jpeg") || d.EndsWith(".bmp")) && !d.ToLower().Contains("particles")).ToList();

            try
            {
                Zip.UnzipFiles(FilePath, TempPath, files);
                files = FileOperations.AllFiles(TempPath);
                获取各种图片(files);
            }
            catch
            {
                AyMessageBox.Show("载入图读取失败!", "压缩包错误!");
            }
        }