1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //
- // KMBatchOperateBaseWindowController.swift
- // PDF Reader Pro
- //
- // Created by kdanmobile on 2023/10/26.
- //
- import Cocoa
- @objcMembers class KMBatchOperateBaseWindowController: NSWindowController{
- var files: [KMBatchOperateFile]?
- var operateType: KMBatchOperationType?{
- willSet{
-
- }
- didSet {
- switch operateType {
- case .Convert:
- self.window!.title = NSLocalizedString("Convert", comment: "")
- case .Merge:
- self.window!.title = NSLocalizedString("Merge", comment: "")
- case .Compress:
- self.window!.title = NSLocalizedString("Compress", comment: "")
- case .AddPassword:
- self.window!.title = NSLocalizedString("Set Passwords", comment: "")
- case .RemovePassword:
- self.window!.title = NSLocalizedString("Remove Security", comment: "")
- case .AddWatermark:
- self.window!.title = NSLocalizedString("Add Watermark", comment: "")
- case .RemoveWatermark:
- self.window!.title = NSLocalizedString("Remove Watermark", comment: "")
- case .AddBackground:
- self.window!.title = NSLocalizedString("Add Background", comment: "")
- case .RemoveBackground:
- self.window!.title = NSLocalizedString("Remove Background", comment: "")
- case .AddHeaderFooter:
- self.window!.title = NSLocalizedString("Add Header & Footer", comment: "")
- case .RemoveHeaderFooter:
- self.window!.title = NSLocalizedString("Remove Header & Footer", comment: "")
- case .AddBates:
- self.window!.title = NSLocalizedString("Add Bates Numbers", comment: "")
- case .RemoveBates:
- self.window!.title = NSLocalizedString("Remove Bates Numbers", comment: "")
- case .CreatePDF:
- self.window!.title = NSLocalizedString("Image To PDF", comment: "")
- default :
- self.window!.title = NSLocalizedString("Convert", comment: "")
- }
- }
- }
-
- override func windowDidLoad() {
- super.windowDidLoad()
- self.configuUI()
- files = NSMutableArray() as? [KMBatchOperateFile]
- }
- func configuUI() {
- let splitViewController = KMBatchOperateSplitViewController(nibName: "KMBatchOperateSplitViewController", bundle: nil)
- contentViewController = splitViewController
- }
- func switchToOperateType(_ operateType: KMBatchOperationType, files: [KMBatchOperateFile]) {
- self.files = files
- (self.contentViewController as? KMBatchOperateSplitViewController)?.switchToOperateType(operateType: operateType, files: files)
- self.operateType = operateType
- }
- func checkNeedPasswordSwitchToOperateType(operateType: KMBatchOperationType, files: [KMBatchOperateFile]) {
- self.files = files
- (self.contentViewController as! KMBatchOperateSplitViewController).checkNeedPasswordSwitchToOperateType(operateType, files: files)
- self.operateType = operateType
- }
- func switchToConvertType(convertType: KMConvertWithPDFType) {
- (self.contentViewController as! KMBatchOperateSplitViewController).switchToConvertType(convertType)
- }
- func watermarkInterfaceSelectWatermark(watermark: KMWatermarkModel) {
- (self.contentViewController as! KMBatchOperateSplitViewController).watermarkInterfaceSelectWatermark(watermark)
- }
- func backgroundInterfaceSelectBackGround(background: KMBackgroundModel) {
- (self.contentViewController as! KMBatchOperateSplitViewController).backgroundInterfaceSelectBackground(background)
- }
- func headerFooterInterfaceSelectHeaderFooter(headerFooter: KMHeaderFooterObject) {
- (self.contentViewController as! KMBatchOperateSplitViewController).headerFooterInterfaceSelectHeaderFooter(headerFooter)
- }
- func batesInterfaceSelectBates(headerFooter: KMHeaderFooterObject) {
- (self.contentViewController as! KMBatchOperateSplitViewController).headerFooterInterfaceSelectHeaderFooter(headerFooter)
- }
-
-
-
- }
|