/// <summary> /// 执行名称简化操作 /// </summary> private void DoSimplifiedDisplayName() { int videoLeft = 0, videoRight = 0; int subtitleLeft = 0, subtitleRight = 0; //转化数据类型 List <string> videoFileNameList = this.videoFileList.ConvertAll(x => x.fileName); List <string> subtitleFileNameList = this.subtitleFileList.ConvertAll(x => x.fileName); //收集简化的显示名称 this.CollectSimplifiedDisplayName(videoFileNameList, out videoLeft, out videoRight); this.CollectSimplifiedDisplayName(subtitleFileNameList, out subtitleLeft, out subtitleRight); //视频 for (int i = 0; i < this.videoFileList.Count; i++) { AssetFile assetFile = this.videoFileList[i]; assetFile.displayNameSimplified = this.SimplifiedDisplayName(assetFile.fileName, videoLeft, videoRight); assetFile.CalcDisplay(); } //字幕 for (int i = 0; i < this.subtitleFileList.Count; i++) { AssetFile assetFile = this.subtitleFileList[i]; assetFile.displayNameSimplified = this.SimplifiedDisplayName(assetFile.fileName, subtitleLeft, subtitleRight); assetFile.CalcDisplay(); } }