Explorar el Código

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

tangchao hace 1 año
padre
commit
9d91bca853

+ 16 - 5
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -2827,6 +2827,11 @@ extension KMMainViewController {
     }
     //MARK: 转档 - OCR
     func showOCRWindow() {
+        if !IAPProductsManager.default().isAvailableAllFunction(){
+            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+            return
+        }
+
         let com = KMOCRPDFWindowController(cpdfDocument: self.listView.document!, pwd: self.listView.document.password)
         self.km_beginSheet(windowC: com)
     }
@@ -2843,6 +2848,11 @@ extension KMMainViewController {
     }
     
     func showDigitalSignWindow(withFilePathURL fileURL: URL) {
+        if !IAPProductsManager.default().isAvailableAllFunction(){
+            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+            return
+        }
+        
         if hasShowDigitalSign() {
             self.exitDigitalSign()
         }
@@ -2887,6 +2897,11 @@ extension KMMainViewController {
     
     //MARK: 导出图片
     func extractImageAction(num: Int) {
+        if !IAPProductsManager.default().isAvailableAllFunction(){
+            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+            return
+        }
+        
         if !(self.listView.document.allowsPrinting || self.listView.document.allowsCopying) {
             let alert = NSAlert()
             alert.alertStyle = .critical
@@ -2897,11 +2912,7 @@ extension KMMainViewController {
         //        if sender is KMToolbarItem {
         //            (sender as! KMToolbarItem).isSelected = false
         //        }
-        
-        //        if !IAPProductsManager.defaultManager.isAvailableAllFunction {
-        //            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
-        //            return
-        //        }
+
         
         let document = self.listView.document
         var fileURL = document?.documentURL

+ 5 - 0
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -128,6 +128,11 @@ extension KMMainViewController: KMToolbarControllerDelegate {
     }
     
     func changeAnnotationModeAction(item: KMToolbarClickButton) {
+        if !IAPProductsManager.default().isAvailableAllFunction(){
+            KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
+            return
+        }
+
         if let type = CAnnotationType(rawValue: item.tag) {
             self.trackEvent(annotationType: type)
         }