/// <summary> /// 清理全部皮肤文件 /// </summary> /// <param name="champions"></param> public void ClearSkins(Champions champions) { this.LoLPath = ShareSetting.Setting.LOLPath + "\\"; if (System.IO.Directory.Exists(this.LoLPath + "Game\\CustomSkinZips\\")) { try { System.IO.Directory.Delete(this.LoLPath + "Game\\CustomSkinZips\\", true); } catch { } } if (System.IO.File.Exists(this.LoLPath + "Game\\CustomSkinZips.zip")) { System.IO.File.Delete(this.LoLPath + "Game\\CustomSkinZips.zip"); } var deleteList = OtherSkins.Where(skin => skin.Key != "施法伤害美化").Select(skin => skin.Key + ".zip").ToList(); foreach (string df in deleteList) { var srcfile = Path.Combine(ShareSetting.ApplicationPath, "Skins", df); ZipHelper.ClearZip(srcfile, this.LoLPath = ShareSetting.Setting.LOLPath + "\\Game\\"); } ResetAllChamps(champions); string clientZips = this.LoLPath + "Game\\ClientZips.txt"; using (StreamWriter sw = File.CreateText(clientZips)) { sw.WriteLine("HeroPak_client.zip"); } }