Browse Source

【综合】首页快捷工具拆分入口去除

tangchao 1 year ago
parent
commit
b05b2a5238

+ 48 - 48
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController+Action.swift

@@ -1052,54 +1052,54 @@ extension KMHomeViewController {
     }
     
     func fastTool_BreakUp() {   // 拆分
-        let openPanel = NSOpenPanel()
-        openPanel.prompt = "提取"
-        openPanel.allowsMultipleSelection = false
-        openPanel.allowedFileTypes = ["pdf"]
-        openPanel.beginSheetModal(for: NSApp.mainWindow!) { result in
-            if result == .OK {
-                DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
-                    let document = CPDFDocument(url: openPanel.url)
-                    
-                    let model = KMPageEditSplitSettingModel()
-                    model.documentURL = openPanel.url
-                    model.fileName = model.documentURL.lastPathComponent
-                    model.pathExtension = model.fileName.components(separatedBy: ".").last
-                    
-                    let windowController = KMPageEditSplitWindowController(model)
-                    windowController.hasPreView = true
-                    self.view.window?.beginSheet(windowController.window!)
-                    self.currentWindowController = windowController
-                    
-                    windowController.itemClick = { [weak self] index, value in
-                        if (index == 1) { /// 取消
-                            self?.view.window?.endSheet((self?.currentWindowController!.window)!)
-                            self?.currentWindowController = nil
-                            return
-                        }
-                        
-                        /// 拆分
-                        let windowController_split: KMPageEditSplitWindowController = self?.currentWindowController as! KMPageEditSplitWindowController
-                        let outputModel: KMPageEditSplitSettingModel = windowController_split.model! as! KMPageEditSplitSettingModel
-                        
-                        self?.view.window?.endSheet((self?.currentWindowController!.window)!)
-                        self?.currentWindowController = nil
-                        
-                        let panel = NSOpenPanel()
-                        panel.canChooseFiles = false
-                        panel.canChooseDirectories = true
-                        panel.canCreateDirectories = true
-                        panel.beginSheetModal(for: (self?.view.window)!) { response in
-                            KMPageEditTools.split(document!, outputModel, panel.url!.path, outputModel.outputFileNameDeletePathExtension) { result, outputDocuments, error in
-                                if (result) {
-                                    
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
+//        let openPanel = NSOpenPanel()
+//        openPanel.prompt = "提取"
+//        openPanel.allowsMultipleSelection = false
+//        openPanel.allowedFileTypes = ["pdf"]
+//        openPanel.beginSheetModal(for: NSApp.mainWindow!) { result in
+//            if result == .OK {
+//                DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
+//                    let document = CPDFDocument(url: openPanel.url)
+//                    
+//                    let model = KMPageEditSplitSettingModel()
+//                    model.documentURL = openPanel.url
+//                    model.fileName = model.documentURL.lastPathComponent
+//                    model.pathExtension = model.fileName.components(separatedBy: ".").last
+//                    
+//                    let windowController = KMPageEditSplitWindowController(model)
+//                    windowController.hasPreView = true
+//                    self.view.window?.beginSheet(windowController.window!)
+//                    self.currentWindowController = windowController
+//                    
+//                    windowController.itemClick = { [weak self] index, value in
+//                        if (index == 1) { /// 取消
+//                            self?.view.window?.endSheet((self?.currentWindowController!.window)!)
+//                            self?.currentWindowController = nil
+//                            return
+//                        }
+//                        
+//                        /// 拆分
+//                        let windowController_split: KMPageEditSplitWindowController = self?.currentWindowController as! KMPageEditSplitWindowController
+//                        let outputModel: KMPageEditSplitSettingModel = windowController_split.model! as! KMPageEditSplitSettingModel
+//                        
+//                        self?.view.window?.endSheet((self?.currentWindowController!.window)!)
+//                        self?.currentWindowController = nil
+//                        
+//                        let panel = NSOpenPanel()
+//                        panel.canChooseFiles = false
+//                        panel.canChooseDirectories = true
+//                        panel.canCreateDirectories = true
+//                        panel.beginSheetModal(for: (self?.view.window)!) { response in
+//                            KMPageEditTools.split(document!, outputModel, panel.url!.path, outputModel.outputFileNameDeletePathExtension) { result, outputDocuments, error in
+//                                if (result) {
+//                                    
+//                                }
+//                            }
+//                        }
+//                    }
+//                }
+//            }
+//        }
     }
     
     func fastTool_Extract() {   // 提取

+ 19 - 19
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController+UI.swift

@@ -99,25 +99,25 @@ extension KMHomeViewController {
     }
     
     func showSecurityWindow() {
-        Task { @MainActor in
-            #if VERSION_DMG
-            if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
-                let _ = KMComparativeTableViewController.show(window: self.view.window!, .merge)
-                return
-            }
-            #endif
-
-            if await (KMLightMemberManager.manager.canPayFunction() == false) {
-                let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true) { isSubscribeSuccess, isWaterMarkExport, isClose in
-                    if (isClose) {
-                        return
-                    }
-                    self.km_secure_openPanel_security(limit: true)
-                }
-                return
-            }
-            self.km_secure_openPanel_security()
-        }
+//        Task { @MainActor in
+//            #if VERSION_DMG
+//            if await (KMLightMemberManager.manager.canUseAdvanced() == false) {
+//                let _ = KMComparativeTableViewController.show(window: self.view.window!, .merge)
+//                return
+//            }
+//            #endif
+//
+//            if await (KMLightMemberManager.manager.canPayFunction() == false) {
+//                let _ = KMSubscribeWaterMarkWindowController.show(window: self.view.window!, isContinue: true) { isSubscribeSuccess, isWaterMarkExport, isClose in
+//                    if (isClose) {
+//                        return
+//                    }
+//                    self.km_secure_openPanel_security(limit: true)
+//                }
+//                return
+//            }
+//            self.km_secure_openPanel_security()
+//        }
     }
     
     func km_secure_openPanel_security(limit: Bool = false) {