소스 검색

【综合】批量转档&压缩完善

niehaoyu 9 달 전
부모
커밋
a412942975
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      PDF Office/PDF Master/Class/Batch/WindowController/Base/KMBatchOperateBaseViewController.swift

+ 6 - 2
PDF Office/PDF Master/Class/Batch/WindowController/Base/KMBatchOperateBaseViewController.swift

@@ -136,9 +136,13 @@ class KMBatchOperateBaseViewController: NSViewController, KMBatchOperateProtocol
     func operationWithFile(_ file: KMBatchOperateFile) -> KMBatchOperation {
         var operation: KMBatchOperation?
         if self.operateType == .Convert {
-            return KMBatchConvertOperation(file: file, convertType: self.convertType!)
+            let batchOperate = KMBatchConvertOperation(file: file, convertType: self.convertType!)
+            batchOperate.viewController = self
+            return batchOperate
         } else if self.operateType == .Compress {
-            return KMCompressOperation(file: file, compressValue: 60)
+            let batchOperate = KMCompressOperation(file: file, compressValue: 60)
+            batchOperate.viewController = self
+            return batchOperate
         } else if self.operateType == .AddPassword {
             // handle AddPassword operation
         } else if self.operateType == .RemovePassword {