コード例 #1
0
ファイル: MainBody.cs プロジェクト: zhyongwei/imewlconverter
        public void StreamConvert(IList <string> filePathes, string outPath)
        {
            var textImport = import as IWordLibraryTextImport;

            if (textImport == null)
            {
                throw new Exception("流转换,只有文本类型的才支持。");
            }
            StreamWriter stream = FileOperationHelper.GetWriteFileStream(outPath, export.Encoding);

            foreach (string filePath in filePathes)
            {
                var wlStream = new WordLibraryStream(import, export, filePath, textImport.Encoding, stream);
                wlStream.ConvertWordLibrary(w => IsKeep(w));
            }

            stream.Close();
        }
コード例 #2
0
ファイル: MainBody.cs プロジェクト: ivlucks/imewlconverter
        public void StreamConvert(IList<string> filePathes,string outPath)
        {
            var textImport = import as IWordLibraryTextImport;
            if (textImport == null)
            {
                throw new Exception("流转换,只有文本类型的才支持。");
            }
            StreamWriter stream = FileOperationHelper.GetWriteFileStream(outPath, export.Encoding);
            foreach (string filePath in filePathes)
            {
                var wlStream = new WordLibraryStream(import, export, filePath, textImport.Encoding, stream);
                //wlStream.ConvertWordLibrary(WordFilterRetain);
            }

            stream.Close();
        }