Parcourir la source

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

niehaoyu il y a 1 semaine
Parent
commit
bb4e525eca
51 fichiers modifiés avec 163 ajouts et 1425 suppressions
  1. 1 1
      PDF Office/PDF Master/AppDelegate.swift
  2. 1 34
      PDF Office/PDF Master/Class/Batch/WindowController/KMBatchOperateLeftViewController.swift
  3. 8 14
      PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateConvertViewController.swift
  4. 0 11
      PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateImageToPDFViewController.swift
  5. 5 5
      PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift
  6. 2 2
      PDF Office/PDF Master/Class/ChromiumTabs/src/Tab Strip/CTTabStripDragController.m
  7. 0 4
      PDF Office/PDF Master/Class/ChromiumTabs/src/Tab Strip/CTTabStripModel.m
  8. 1 1
      PDF Office/PDF Master/Class/Common/OC/StatusBar/KMStatusBar.m
  9. 1 1
      PDF Office/PDF Master/Class/Document/KMMainDocument.swift
  10. 0 8
      PDF Office/PDF Master/Class/GuideInfo/KMFunctionGuideWindowController.swift
  11. 3 10
      PDF Office/PDF Master/Class/Home/NSObject/Services/DropboxModel.m
  12. 2 88
      PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController+Action.swift
  13. 5 36
      PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift
  14. 4 4
      PDF Office/PDF Master/Class/KMAdvertisement/Manager/KMAdvertisementManager.swift
  15. 1 1
      PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/KMPurchaseManager.swift
  16. 0 5
      PDF Office/PDF Master/Class/PDFTools/AddPassword/New/View/KMSecurityView.swift
  17. 0 5
      PDF Office/PDF Master/Class/PDFTools/Compress/Controller/KMCompressWIndowControllerNew.swift
  18. 5 28
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift
  19. 2 11
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMToolCompareWindowController.swift
  20. 0 30
      PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/KMMergeWindowController.swift
  21. 0 24
      PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/View/KMMergeView.swift
  22. 0 38
      PDF Office/PDF Master/Class/PDFTools/Merge/OCPart/KMPDFEditAppendWindow.m
  23. 1 154
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift
  24. 1 7
      PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/SplitWindowController.swift
  25. 0 5
      PDF Office/PDF Master/Class/PDFTools/Print/KMPrintWindowController.swift
  26. 0 24
      PDF Office/PDF Master/Class/PDFTools/Print/PrintHelper/PrintManage/KMPDFPrintManageWindowController.m
  27. 0 7
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.swift
  28. 0 7
      PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.swift
  29. 0 5
      PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m
  30. 0 45
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Thumbnail.swift
  31. 0 20
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift
  32. 0 54
      PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Thumbnail/Base/KMPDFThumbViewBaseController.swift
  33. 0 17
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationSelectLinkViewController.swift
  34. 0 5
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayCustomThemesCollectionViewItem.swift
  35. 3 19
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift
  36. 1 6
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayThemeCollectionViewItem.swift
  37. 0 12
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureAnnotationViewController.m
  38. 0 25
      PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.swift
  39. 1 9
      PDF Office/PDF Master/Class/PDFWindowController/TabWindowController/KMTabbingHintWindowController.swift
  40. 0 8
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift
  41. 2 124
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift
  42. 0 41
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift
  43. 0 28
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift
  44. 4 52
      PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift
  45. 1 8
      PDF Office/PDF Master/Class/Preference/Controller/KMGeneralPreferences.swift
  46. 27 356
      PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m
  47. 2 2
      PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.xib
  48. 0 10
      PDF Office/PDF Master/Class/Tools/Search/Window/KMSearchReplaceWindowController.swift
  49. 11 11
      PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.xib
  50. 67 2
      PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift
  51. 1 1
      PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

+ 1 - 1
PDF Office/PDF Master/AppDelegate.swift

@@ -230,7 +230,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
     func initDidFinish() {
 #if VERSION_DMG
         let memberInfo: KMMemberInfo = KMMemberInfo.shared
-        if IAPProductsManager.default().isAvailableAllFunction() == false  &&  memberInfo.isLogin == false {
+        if KMMemberInfo.shared.isMemberAllFunction == false && memberInfo.isLogin == false {
                 checkLoginAndPrompt()
             }
 #endif

+ 1 - 34
PDF Office/PDF Master/Class/Batch/WindowController/KMBatchOperateLeftViewController.swift

@@ -164,16 +164,6 @@ class KMBatchOperateLeftViewController: NSViewController,NSTableViewDelegate,NST
     
     func chooseFile() {
 #if VERSION_FREE
-//        if !IAPProductsManager.default().isAvailableAllFunction() {
-//            if files.count >= 1 {
-//                let winC = KMProductCompareWC.shared
-//                if type == .CreatePDF {
-//                    winC.kEventName = "Onbrd_ImagetoPDF_BuyNow"
-//                }
-//                winC.showWindow(nil)
-//                return
-//            }
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             if files.count >= 1 {
                 let winC = KMProductCompareWC.shared
@@ -192,7 +182,7 @@ class KMBatchOperateLeftViewController: NSViewController,NSTableViewDelegate,NST
         } else {
             panel.allowedFileTypes = ["pdf", "PDF"]
         }
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             panel.allowsMultipleSelection = true
             panel.canChooseDirectories = true
         }
@@ -470,25 +460,13 @@ class KMBatchOperateLeftViewController: NSViewController,NSTableViewDelegate,NST
         for i in 0..<documentArray.count {
             let document = documentArray[i]
             let path: String = document.fileURL?.path ?? ""
-//            let UTTypeString = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, path!.customPathExtension as CFString, nil)
             let UTTypeString = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, path.customPathExtension as CFString, nil)?.takeRetainedValue() as String?
             let TypeCFString = UTTypeString as CFString?
             if UTTypeConformsTo(TypeCFString!, kUTTypePDF) {
                 pdfArray.add(path as Any)
-//                UTTypeString?.release()
             } else {
-//                UTTypeString?.release()
             }
         }
-//        if !IAPProductsManager.default().isAvailableAllFunction() {
-//            if self.files.count < 1 {
-//                pdfArray = NSMutableArray(array: [pdfArray.firstObject as Any])
-//            } else {
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//                return
-//            }
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             if self.files.count < 1 {
                 pdfArray = NSMutableArray(array: [pdfArray.firstObject as Any])
@@ -739,17 +717,6 @@ class KMBatchOperateLeftViewController: NSViewController,NSTableViewDelegate,NST
                     }
                 }
             }
-//            if !(IAPProductsManager.default().isAvailableAllFunction)() {
-//                if self.files.count < 1 && insertArray.count > 0 {
-//                    let firstObject = insertArray.firstObject
-//                    insertArray.removeAllObjects()
-//                    insertArray.add(firstObject as Any)
-//                } else {
-//                    KMProductCompareWC.shared.orientation = false
-//                    KMProductCompareWC.shared.showWindow(nil)
-//                    return false
-//                }
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 if self.files.count < 1 && insertArray.count > 0 {
                     let firstObject = insertArray.firstObject

+ 8 - 14
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateConvertViewController.swift

@@ -152,7 +152,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
 #if VERSION_FREE
 #if VERSION_DMG
         // 桌机版
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
             } else {
                 isShowUpgrade = true
@@ -162,7 +162,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
         }
 #else
         // 免费版
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
             } else {
                 isShowUpgrade = true
@@ -188,9 +188,9 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
 
         var moreLabelString = ""
 #if VERSION_FREE
-        if !IAPProductsManager.default().isAvailableAllFunction() {
+        if !KMMemberInfo.shared.isMemberAllFunction {
             moreLabelString = String(format: "%@ %@", KMLocalizedString("The first 10 pages for free"), KMLocalizedString("Unlimited Convert"))
-        }else {
+        } else {
             if !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 if .WordAdvance == self.convertType ||
                     .WordStandard == self.convertType ||
@@ -432,7 +432,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
         
 #if VERSION_FREE
         // 桌机版
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 needShowAdvance = true
                 needShowDefault = false
@@ -463,7 +463,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
 #if VERSION_DMG
         // 桌机版
         isShowAdvanced = true
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 isShowAdvanced = false
             }
@@ -471,7 +471,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
 #else
         // 免费版
         isShowAdvanced = true
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 isShowAdvanced = false
             }
@@ -712,7 +712,7 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
     func moreConvertInfoAction() {
         if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false {
 #if VERSION_DMG
-            if IAPProductsManager.default().isAvailableAllFunction() && IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false {
+            if KMMemberInfo.shared.isMemberAllFunction && IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false {
                 let limitWC = KMPurchaseLimitWindowController.currentLimitWC()
                 limitWC.continueBlock = { windowController in
                     
@@ -737,12 +737,6 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController{
                 winC.showWindow(nil)
             }
 #else
-//            if IAPProductsManager.default().isAvailableAllFunction() {
-//                self.convertActionVC()
-//            } else {
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == true {
                 self.convertActionVC()
             } else {

+ 0 - 11
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateImageToPDFViewController.swift

@@ -378,12 +378,6 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController,
     
     @IBAction func buttonClicked_OCRSelect(_ sender: NSButton) {
         //MARK: 判断是否付费用户
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            self.ocrSelectBtn.state = .off
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             self.ocrSelectBtn.state = .off
@@ -430,11 +424,6 @@ class KMBatchOperateImageToPDFViewController: KMBatchOperateBaseViewController,
         if self.files?.count ?? 0 < 1 {
             return
         }
-//        if IAPProductsManager.default().isAvailableAllFunction() == false && self.files?.count ?? 0 > 1{
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false && self.files?.count ?? 0 > 1 {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 5 - 5
PDF Office/PDF Master/Class/ChromiumTabs/KMBrowserWindowController.swift

@@ -99,7 +99,7 @@ import Cocoa
             tabbingMode = .disallowed
         }
 #if VERSION_FREE
-        if IAPProductsManager.default().isAvailableAllFunction() == false {
+        if KMMemberInfo.shared.isMemberAllFunction == false {
             tabbingMode = .disallowed
         }
 #endif
@@ -349,7 +349,7 @@ import Cocoa
         var needShowChooseWindow = false
 //#if VERSION_FREE
 //#if VERSION_DMG
-        if (!IAPProductsManager.default().isAvailableAllFunction()) {
+        if (!KMMemberInfo.shared.isMemberAllFunction) {
             needShowChooseWindow = true
         }
 //#endif
@@ -367,7 +367,7 @@ import Cocoa
                         let winC = self?.kmCurrentWindowC as? KMTabbingHintWindowController
                         let newTab = winC?.newTabInWindowButton.state == .on
                         if continueOrNot {
-                            if IAPProductsManager.default().isAvailableAllFunction() && newTab {
+                            if KMMemberInfo.shared.isMemberAllFunction && newTab {
                                 self?.openDocumentWindow()
                             } else {
                                 self?.reopenDocument(forPaths: nil)
@@ -550,7 +550,7 @@ import Cocoa
             return
         }
         if let cnt = self.browser?.tabCount(), cnt > 1{
-            if !IAPProductsManager.default().isAvailableAllFunction() {
+            if !KMMemberInfo.shared.isMemberAllFunction {
                 if !KMDataManager.default.isTabbingWin{
                     KMDataManager.default.isTabbingWin = true
                     let tabbingWin: KMTabbingHintWindowController = KMTabbingHintWindowController()
@@ -1551,7 +1551,7 @@ extension KMBrowserWindowController: KMSystemFileMenuProtocol {
     func checkOpenNewDocument(path: String) -> Bool {
         let tabCount = self.km_browser?.tabCount() ?? 0
         if tabCount > 1{
-            if !IAPProductsManager.default().isAvailableAllFunction() {
+            if !KMMemberInfo.shared.isMemberAllFunction {
                 let preferenceNoteShow = UserDefaults.standard.bool(forKey: KMTabbingHintShowFlag)
                 if preferenceNoteShow {
                     menuItemAction_newTagPageToNewWindow("")

+ 2 - 2
PDF Office/PDF Master/Class/ChromiumTabs/src/Tab Strip/CTTabStripDragController.m

@@ -12,6 +12,7 @@
 #import "CTBrowserWindowController.h"
 #import "common.h"
 #import "IAPProductsManager.h"
+#import <PDF_Reader_Pro-Swift.h>
 
 // Replicate specific 10.7 SDK declarations for building with prior SDKs.
 #if !defined(MAC_OS_X_VERSION_10_7) || \
@@ -74,8 +75,7 @@ const NSTimeInterval kTearDuration = 0.333;
             return NO;
         }
     }
-//    CTBrowserWindowController *tBrowserWindowController  = (CTBrowserWindowController *)draggedController_;
-    if (![IAPProductsManager defaultManager].isAvailableAllFunction /*&& tBrowserWindowController.browser.tabCount > 1*/) {
+    if (![KMMemberInfo shared].isMemberAllFunction) {
         return NO;
     }
 

+ 0 - 4
PDF Office/PDF Master/Class/ChromiumTabs/src/Tab Strip/CTTabStripModel.m

@@ -295,10 +295,6 @@ const int kNoTab = NSNotFound;
     NSLog(@"切换document:%d",index);
 #endif
 	if ([self containsIndex:index]) {
-//        if (![IAPProductsManager defaultManager].isAvailableAllFunction && [self count] > 1 && activeIndex_ != index){
-//            [[NSNotificationCenter defaultCenter]postNotificationName:@"KMCTTableChangeShowAlertView" object:nil userInfo:nil];
-//            return;
-//        }
 		[self changeSelectedContentsFrom:[self activeTabContents]
 								 toIndex:index
 							 userGesture:userGesture];

+ 1 - 1
PDF Office/PDF Master/Class/Common/OC/StatusBar/KMStatusBar.m

@@ -111,7 +111,7 @@
 #pragma mark - Item Action
 
 - (void)convertItemAction:(id)sender {
-    if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
+    if (KMMemberInfo.shared.isMemberAllFunction) {
         NSOpenPanel *openPanel = [NSOpenPanel openPanel];
         [openPanel setAllowedFileTypes:@[@"pdf",@"PDF"]];
         [openPanel setAllowsMultipleSelection:NO];

+ 1 - 1
PDF Office/PDF Master/Class/Document/KMMainDocument.swift

@@ -239,7 +239,7 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
                     }
                 }
             } else {
-                if currentWindowController?.browser.tabCount() ?? 0 > 1 && (!IAPProductsManager.default().isAvailableAllFunction() || KMPreference.shared.openDocumentType == .newWindow){
+                if currentWindowController?.browser.tabCount() ?? 0 > 1 && (!KMMemberInfo.shared.isMemberAllFunction || KMPreference.shared.openDocumentType == .newWindow){
                         // 开启新窗口
                         let browser = KMBrowser.init() as KMBrowser
                         browser.windowController = KMBrowserWindowController.init(browser: browser)

+ 0 - 8
PDF Office/PDF Master/Class/GuideInfo/KMFunctionGuideWindowController.swift

@@ -124,14 +124,6 @@ class KMFunctionGuideWindowController: NSWindowController {
                             AIPurchaseWindowController.currentWC().showWindow(nil)
                         }
                     } else if controller.currentNameKEY == controller.MeasureInfoKey {
-//                        if IAPProductsManager.default().isAvailableAllFunction() {
-//                            self?.closeAction()
-//                        } else {
-//                            KMProductCompareWC.shared.orientation = false
-//                            let singleTon = KMProductCompareWC.shared
-//                            singleTon.showWindow(nil)
-//                            singleTon.window?.center()
-//                        }
                         if KMMemberInfo.shared.isMemberAllFunction == true {
                             self?.closeAction()
                         } else {

+ 3 - 10
PDF Office/PDF Master/Class/Home/NSObject/Services/DropboxModel.m

@@ -257,18 +257,11 @@
 - (BOOL)uploadFile:(NSArray *)filePathArray
 {
     self.filePathArray = filePathArray;
-//    if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
         //免費版當天只能限制dropbox 10個檔案同步
         NSUInteger count = [self numberOfUploadFile];
-//        if (10 <= count) {
-//            [KMPurchaseCompareTool showPurchaseCompareWindowController];
-//            return NO;
-//        } else if (count<10 && count > 0) {
-            if (self.filePathArray.count > (10-count)) {
-                self.filePathArray = [filePathArray subarrayWithRange:NSMakeRange(0, 10-count)];
-            }
-//        }
-//    }
+    if (self.filePathArray.count > (10-count)) {
+        self.filePathArray = [filePathArray subarrayWithRange:NSMakeRange(0, 10-count)];
+    }
     if ([self isLinked]) {
         [self uploadFileToServer];
     } else {

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

@@ -439,7 +439,7 @@ extension KMHomeViewController {
                 if !alreadyOpen {
                     let controll: KMBrowserWindowController? = self.view.window?.windowController as? KMBrowserWindowController
                     if controll?.browser?.tabCount() ?? 0 > 1{
-                        if !IAPProductsManager.default().isAvailableAllFunction() {
+                        if !KMMemberInfo.shared.isMemberAllFunction {
                             showLimitWindowAlert(url: url)
                             return
                         }else {
@@ -987,11 +987,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_Batch() { // Batch
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1001,13 +996,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_OCR() {   // OCR
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_OCR_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_OCR_BuyNow"
@@ -1118,10 +1106,7 @@ extension KMHomeViewController {
         //MARK: 允许多选还是单选,如果是付费用户允许多选
         openPanel.allowsMultipleSelection = true
         openPanel.message = KMLocalizedString("Select images to create a new document. To select multiple files press cmd ⌘ button on keyboard and click on the target files one by one.", nil)
-//        openPanel.canChooseFiles = false
-//        openPanel.canChooseDirectories = true
-//        openPanel.canCreateDirectories = true
-        if IAPProductsManager.default().isAvailableAllFunction(){
+        if KMMemberInfo.shared.isMemberAllFunction {
             openPanel.allowsMultipleSelection = true
         }else{
             openPanel.allowsMultipleSelection = false
@@ -1332,13 +1317,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_FileCompare() {    // 文件对比
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_Compare_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_Compare_BuyNow"
@@ -1444,13 +1422,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_Watermark() { // 水印
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_Watermard_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_Watermard_BuyNow"
@@ -1498,13 +1469,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_Background() {    // 背景
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_Background_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_Background_BuyNow"
@@ -1552,13 +1516,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_HeaderAndFooter() {   // 页眉页脚
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_HeaderFooter_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_HeaderFooter_BuyNow"
@@ -1607,13 +1564,6 @@ extension KMHomeViewController {
     
     
     func fastTool_BatesCode() { // 贝茨码
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_Bates_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_Bates_BuyNow"
@@ -1669,11 +1619,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_Insert() {    // 插入
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1701,11 +1646,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_BreakUp() {   // 拆分
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1742,11 +1682,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_MarkCipher() {    // 标记密文
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1824,13 +1759,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_printBooklet() {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_PrintBooklet_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_PrintBooklet_BuyNow"
@@ -1871,13 +1799,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_printPoster() {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_PrintPoster_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_PrintPoster_BuyNow"
@@ -1918,13 +1839,6 @@ extension KMHomeViewController {
     }
     
     func fastTool_printMultple() {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_PrintMultiple_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_PrintMultiple_BuyNow"

+ 5 - 36
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -209,7 +209,7 @@ import Cocoa
                 var infos: [KMAdvertisementItemInfo] = []
                 for info in item?.content ?? [] {
                     if info.version == "recommondPDF-PDFtoOfficePack" {
-                        if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false && IAPProductsManager.default().isAvailableAllFunction() {
+                        if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false && KMMemberInfo.shared.isMemberAllFunction {
                             infos.append(info)
                         }
                     } else {
@@ -338,7 +338,7 @@ import Cocoa
             self.fastToolItemAction(item.type!)
         }
         
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             self.advertisementShowView.isHidden = true
         } else {
             self.advertisementShowView.isHidden = false
@@ -750,7 +750,7 @@ extension KMHomeViewController {
     
     func needShowTabbingHintWindow() -> Bool {
         let controll: KMBrowserWindowController? = self.view.window?.windowController as? KMBrowserWindowController
-        if controll?.browser?.tabCount() ?? 0 > 1 && !IAPProductsManager.default().isAvailableAllFunction() {
+        if controll?.browser?.tabCount() ?? 0 > 1 && !KMMemberInfo.shared.isMemberAllFunction {
             return true
         }
         return false
@@ -875,42 +875,11 @@ extension KMHomeViewController {
     
     func newFromImages() {
         fastTool_ImageToPDF()
-//        let openPanel = NSOpenPanel()
-//        openPanel.allowedFileTypes = KMImageAccessoryController.supportedImageTypes()
-//        if IAPProductsManager.defaultManager().isAvailableAllFunction {
-//            openPanel.allowsMultipleSelection = true
-//        } else {
-//            openPanel.allowsMultipleSelection = false
-//        }
-//        openPanel.message = NSLocalizedString("Select images to create a new document. To select multiple files press cmd ⌘ button on the keyboard and click on the target files one by one.", comment: "")
-//        openPanel.beginSheetModal(for: NSApp.mainWindow!) { result in
-//            if result == .OK {
-//                DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
-//                    debugPrint("缺少图片转PDF")
-//                    let baseWindowController = KMBatchOperateBaseWindowController(windowNibName: "KMBatchOperateBaseWindowController")
-//                    var arr: [KMBatchOperateFile] = []
-//                    for url in openPanel.urls {
-//                        let file = KMBatchOperateFile(filePath: url.path, type: .createPDF)
-//                        arr.append(file)
-//                    }
-//                   
-//                    if #available(macOS 10.13, *) {
-//                        baseWindowController.window?.makeKeyAndOrderFront(nil)
-//                    } else {
-//                        baseWindowController.showWindow(nil)
-//                    }
-//                    baseWindowController.checkNeedPasswordSwitch(toOperateType: .createPDF, files: arr)
-//                    if #available(macOS 10.13, *) {
-//                        baseWindowController.release()
-//                    }
-//                }
-//            }
-//        }
     }
     
     //MARK: Purchase
     @objc func purchaseStateUpdateNoti() {
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             self.advertisementShowView.isHidden = true
             
             guard let content = self.advertisementTableView.inputData else {
@@ -920,7 +889,7 @@ extension KMHomeViewController {
             var infos: [KMAdvertisementItemInfo] = []
             for info in item?.content ?? [] {
                 if info.version == "recommondPDF-PDFtoOfficePack" {
-                    if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false && IAPProductsManager.default().isAvailableAllFunction() {
+                    if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() == false && KMMemberInfo.shared.isMemberAllFunction {
                         infos.append(info)
                     }
                 } else {

+ 4 - 4
PDF Office/PDF Master/Class/KMAdvertisement/Manager/KMAdvertisementManager.swift

@@ -248,11 +248,11 @@ extension KMAdvertisementManager {
                 
                 var canAdd = true
                 if item.subscriptionType == "1" {
-                    if (IAPProductsManager.default().isAvailableAllFunction()) {
+                    if (KMMemberInfo.shared.isMemberAllFunction == true) {
                         canAdd = false
                     }
                 } else if item.subscriptionType == "2" {
-                    if (IAPProductsManager.default().isAvailableAllFunction() == false) {
+                    if (KMMemberInfo.shared.isMemberAllFunction == false) {
                         canAdd = false
                     }
                 }
@@ -322,11 +322,11 @@ extension KMAdvertisementManager {
         }
         
         if info.subscriptionType == "1" {
-            if IAPProductsManager.default().isAvailableAllFunction() == true {
+            if KMMemberInfo.shared.isMemberAllFunction == true {
                 return false
             }
         } else if info.subscriptionType == "2" {
-            if !IAPProductsManager.default().isAvailableAllFunction() {
+            if !KMMemberInfo.shared.isMemberAllFunction {
                 return true
             }
         }

+ 1 - 1
PDF Office/PDF Master/Class/KMLightMember/InAppPurchase/KMPurchaseManager.swift

@@ -32,7 +32,7 @@ class KMPurchaseManager: NSObject {
             //方便调整订阅状态
 //            return .subscription
 #endif
-            if (IAPProductsManager.default().isAvailableAllFunction()) {
+            if (KMMemberInfo.shared.isMemberAllFunction) {
                 return .subscription
             }
             

+ 0 - 5
PDF Office/PDF Master/Class/PDFTools/AddPassword/New/View/KMSecurityView.swift

@@ -159,11 +159,6 @@ extension KMSecurityView {
 
 extension KMSecurityView {
     @IBAction func batchButtonAction(_ sender: Any) {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 0 - 5
PDF Office/PDF Master/Class/PDFTools/Compress/Controller/KMCompressWIndowControllerNew.swift

@@ -62,11 +62,6 @@ class KMCompressWIndowControllerNew: KMBaseWindowController {
         
         self.compressView.batchAction = { [unowned self] view in
             print("Batch 按钮点击")
-//            if !IAPProductsManager.default().isAvailableAllFunction(){
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMMemberInfo.shared.advancedFunctionUsage()
                 return

+ 5 - 28
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift

@@ -278,7 +278,7 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         // 桌机版
         wordItem.tag = convertSample.rawValue
         isShowAdvanced = true
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 convertSample = .AdvancedWord
                 wordItem.tag = convertSample.rawValue
@@ -294,7 +294,7 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         convertSample = .Word
         wordItem.tag = convertSample.rawValue
         isShowAdvanced = true
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 convertSample = .AdvancedWord
                 wordItem.tag = convertSample.rawValue
@@ -415,7 +415,7 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         excelStyleBox.isHidden = true
 #if VERSION_FREE
         // 座机版
-        if !IAPProductsManager.default().isAvailableAllFunction() {
+        if !KMMemberInfo.shared.isMemberAllFunction {
             moreLabelString = String(format: "%@ %@", KMLocalizedString("The first 10 pages for free"), KMLocalizedString("Unlimited Convert"))
         } else {
             if !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
@@ -711,11 +711,6 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
         }
     }
     @IBAction func buttonClicked_Batch(_ sender: NSButton) {
-//        if !IAPProductsManager.default().isAvailableAllFunction() {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -764,7 +759,7 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
 #if VERSION_FREE
 #if VERSION_DMG
         // 桌机版
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                 isLimitConvert = false
             } else {
@@ -1015,7 +1010,7 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
             FMTrackEventManager.defaultManager.trackEvent(event: "PUW", withProperties: ["PUW_Btn": "Btn_PUW_Converter_Premium_Upgrade"])
         }
 #if VERSION_DMG
-        if IAPProductsManager.default().isAvailableAllFunction() && !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
+        if KMMemberInfo.shared.isMemberAllFunction && !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
             let limitWC = KMPurchaseLimitWindowController.currentLimitWC()
             limitWC.continueBlock = { windowController in
                 
@@ -1044,24 +1039,6 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
             winC.showWindow(nil)
         }
 #else
-//        if IAPProductsManager.default().isAvailableAllFunction() {
-//            var vc: KMToolCompareWindowController? = nil
-//            if convertType == .Word || convertType == .AdvancedWord {
-//                vc = KMToolCompareWindowController.toolCompare(toolType: .Convert, selectNum: 1)
-//            } else if convertType == .Excel {
-//                vc = KMToolCompareWindowController.toolCompare(toolType: .Convert, selectNum: 2)
-//            } else if convertType == .PPT {
-//                vc = KMToolCompareWindowController.toolCompare(toolType: .Convert, selectNum: 3)
-//            } else if convertType.rawValue < 15 && convertType.rawValue > 7 {
-//                vc = KMToolCompareWindowController.toolCompare(toolType: .Convert, selectNum: 4)
-//            } else {
-//                vc = KMToolCompareWindowController.toolCompare(toolType: .Convert, selectNum: 0)
-//            }
-//            vc?.showWindow(nil)
-//        } else {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == true {
             var vc: KMToolCompareWindowController? = nil
             if convertType == .Word || convertType == .AdvancedWord {

+ 2 - 11
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMToolCompareWindowController.swift

@@ -63,13 +63,6 @@ var currentWindowController: KMToolCompareWindowController? = nil
                         KMProductCompareWC.shared.orientation = false
                         KMProductCompareWC.shared.showWindow(nil)
 #else
-//                        if IAPProductsManager.default().isAvailableAllFunction() {
-//                            let vc = KMToolCompareWindowController.toolCompare(toolType: self?.type ?? .Convert, selectNum: self?.selectIndex ?? 0)
-//                            vc.showWindow(nil)
-//                        } else {
-//                            KMProductCompareWC.shared.orientation = false
-//                            KMProductCompareWC.shared.showWindow(nil)
-//                        }
                         if KMMemberInfo.shared.isMemberAllFunction == false {
                             let vc = KMToolCompareWindowController.toolCompare(toolType: self?.type ?? .Convert, selectNum: self?.selectIndex ?? 0)
                             vc.showWindow(nil)
@@ -144,7 +137,7 @@ var currentWindowController: KMToolCompareWindowController? = nil
         if type == .Convert {
             self.window?.title = NSLocalizedString("PDF to Office", comment: "")
             
-            if IAPProductsManager.default().isAvailableAllFunction() {
+            if KMMemberInfo.shared.isMemberAllFunction {
                 self.setContentView(self.payConvertCompareViewController?.view ?? NSView())
             } else {
                 self.setContentView(self.convertCompareViewController?.view ?? NSView())
@@ -235,7 +228,7 @@ var currentWindowController: KMToolCompareWindowController? = nil
     }
     
     func reloadData() {
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             self.payConvertCompareViewController?.reloadData()
         } else {
             self.convertCompareViewController?.reloadData()
@@ -244,8 +237,6 @@ var currentWindowController: KMToolCompareWindowController? = nil
     
     func verificationBuy() {
 #if VERSION_DMG
-//        var url = URL(string: Store_Link + "?utm_source=MacAppDmg&utm_campaign=StoreLink&utm_medium=PdfStore")
-//        NSWorkspace.shared.open(url!)
         let embeddedWC = KMPurchaseEmbeddedWindowController.currentFirstTrialWC("com.brother.pdfreaderpro.mac.product_1")
         embeddedWC.showWindow(nil)
         embeddedWC.window?.center()

+ 0 - 30
PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/KMMergeWindowController.swift

@@ -98,17 +98,6 @@ extension KMMergeWindowController {
             size = size + file.fileSize
         }
         
-//        if !IAPProductsManager.default().isAvailableAllFunction() && (files.count >= 2 || size > 20 * 1024 * 1024) {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_Merge_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Merge_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false && (files.count >= 2 || size > 20 * 1024 * 1024) {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -156,11 +145,6 @@ extension KMMergeWindowController {
                                     let fileSize = attribe?[FileAttributeKey.size] as? CGFloat ?? 0
                                     size = fileSize + size
 
-//                                    if !IAPProductsManager.default().isAvailableAllFunction() && (files.count >= 2 || size > 20 * 1024 * 1024) {
-//                                        KMProductCompareWC.shared.orientation = false
-//                                        KMProductCompareWC.shared.showWindow(nil)
-//                                        return
-//                                    }
                                     if KMMemberInfo.shared.isMemberAllFunction == false && (files.count >= 2 || size > 20 * 1024 * 1024) {
                                         KMMemberInfo.shared.advancedFunctionUsage()
                                         return
@@ -183,11 +167,6 @@ extension KMMergeWindowController {
                 let fileSize = attribe?[FileAttributeKey.size] as? CGFloat ?? 0
                 size = fileSize + size
 
-//                if !IAPProductsManager.default().isAvailableAllFunction() && (files.count >= 2 || size > 20 * 1024 * 1024) {
-//                    KMProductCompareWC.shared.orientation = false
-//                    KMProductCompareWC.shared.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false && (files.count >= 2 || size > 20 * 1024 * 1024) {
                     KMMemberInfo.shared.advancedFunctionUsage()
                     return
@@ -221,11 +200,6 @@ extension KMMergeWindowController {
             size = size + file.fileSize
         }
         
-//        if !IAPProductsManager.default().isAvailableAllFunction() && (files.count >= 2 || size > 20 * 1024 * 1024) {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false && (files.count >= 2 || size > 20 * 1024 * 1024) {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -243,10 +217,6 @@ extension KMMergeWindowController {
             return
         }
         
-//        _isSuccessfully = NO;
-//        [self.nCancelVC setEnabled:NO];
-//        self.canMerge = NO;
-//
         var rootPDFOutlineArray: [PDFOutline] = []
         var allPage = true //只有是全部才支持大纲的合并
         for file in files {

+ 0 - 24
PDF Office/PDF Master/Class/PDFTools/Merge/MergeNew/View/KMMergeView.swift

@@ -245,30 +245,6 @@ extension KMMergeView: NSTableViewDelegate {
             let url = URL(string: filePath!)
             var array = [URL]()
             array.append(url!)
-//               for path in fileNames {
-//                   if !isExistAtFilePath(filePath: path) {
-//                       continue
-//                   }
-////                       if let attrib = try? FileManager.default.attributesOfItem(atPath: path),
-////                          let fileSize = attrib[.size] as? CGFloat {
-////
-////                           allFileSize += fileSize
-////
-////                           if !IAPProductsManager.defaultManager.isAvailableAllFunction {
-////                               // 免费版只支持2个文件做合并,小于20M的文件合并
-////                               if files.count >= 2 || allFileSize > (20 * 1024 * 1024) {
-////                                   let vc = KMToolCompareWindowController.toolCompare(with: .pageEdit, setSelectIndex: 1)
-////                                   vc.showWindow(nil)
-////
-////                                   allFileSize -= fileSize
-////                                   addFiles(array)
-////                                   result = true
-////                                   return false
-////                               }
-////                           }
-//                   array.append(URL(string: path)!)
-////                       }
-//               }
             var theFileUrls: [URL] = []
             for fileUrl in array {
                 if KMTools.isImageType(fileUrl.pathExtension) {

+ 0 - 38
PDF Office/PDF Master/Class/PDFTools/Merge/OCPart/KMPDFEditAppendWindow.m

@@ -446,17 +446,6 @@ static KMPDFEditAppendWindow *windowController = nil;
             CGFloat fileSize = [[attrib objectForKey:NSFileSize] floatValue];
             
             weakSelf.allFileSize =  weakSelf.allFileSize + fileSize;
-//            if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//                //免費版只支援2個檔案做合併小于20M的文件合并
-//                if (self->_files.count >= 2 || self.allFileSize > (20 * 1024 * 1024)) {
-//                    [[KMProductCompareWC shared] setOrientation:NO];
-//                    [[KMProductCompareWC shared] showWindow:nil];
-//                    self.allFileSize = self.allFileSize - fileSize;
-//
-//                    [self addFiles:array];
-//                    return;
-//                }
-//            }
             if (![KMMemberInfo shared].isMemberAllFunction) {
                 //免費版只支援2個檔案做合併小于20M的文件合并
                 if (self->_files.count >= 2 || self.allFileSize > (20 * 1024 * 1024)) {
@@ -1106,17 +1095,6 @@ static KMPDFEditAppendWindow *windowController = nil;
             CGFloat fileSize = [[attrib objectForKey:NSFileSize] floatValue];
             
             self.allFileSize = self.allFileSize + fileSize;
-//            if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//                //免費版只支援2個檔案做合併小于20M的文件合并
-//                if (_files.count >= 2 || self.allFileSize > (20 * 1024 * 1024)) {
-//                    [[KMProductCompareWC shared] setOrientation:NO];
-//                    [[KMProductCompareWC shared] showWindow:nil];
-//                    self.allFileSize = self.allFileSize - fileSize;
-//                    [self addFiles:array];
-//                    result = YES;
-//                    return NO;
-//                }
-//            }
             if (![KMMemberInfo shared].isMemberAllFunction) {
                 //免費版只支援2個檔案做合併小于20M的文件合并
                 if (_files.count >= 2 || self.allFileSize > (20 * 1024 * 1024)) {
@@ -1325,13 +1303,6 @@ static KMPDFEditAppendWindow *windowController = nil;
         
     }
     
-//    if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        if (allSize > (20 * 1024 * 1024) || _files.count > 2) {
-//            [[KMProductCompareWC shared] setOrientation:NO];
-//            [[KMProductCompareWC shared] showWindow:nil];
-//            return;
-//        }
-//    }
     if (![KMMemberInfo shared].isMemberAllFunction) {
         if (allSize > (20 * 1024 * 1024) || _files.count > 2) {
             [[KMMemberInfo shared] advancedFunctionUsage];
@@ -1620,15 +1591,6 @@ static KMPDFEditAppendWindow *windowController = nil;
 
 - (IBAction)buttonItemClicked_AddFile:(id)sender
 {
-//    if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        //免費版只支援2個檔案做合併小于20M的文件合并
-//        if (_files.count >= 2 || self.allFileSize > (20 * 1024 * 1024)) {
-//            [[KMProductCompareWC shared] setOrientation:NO];
-//            [[KMProductCompareWC shared] showWindow:nil];
-//            return;
-//        }
-//        
-//    }
     if (![KMMemberInfo shared].isMemberAllFunction) {
         //免費版只支援2個檔案做合併小于20M的文件合并
         if (_files.count >= 2 || self.allFileSize > (20 * 1024 * 1024)) {

+ 1 - 154
PDF Office/PDF Master/Class/PDFTools/PageEdit/Controller/KMPDFEditViewController.swift

@@ -510,11 +510,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func cutAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -535,17 +530,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func deleteAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Delete_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -592,11 +576,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func leftRotateAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -616,17 +595,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func rightRotateAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Rotate_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -667,11 +635,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func pasteAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -701,11 +664,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func pastePage(at index: Int) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -715,17 +673,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func extractAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Extract_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -752,17 +699,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func replaceAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Replace_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -805,17 +741,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func splitAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Split_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -845,11 +770,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     func splitMethod(windowC: KMPageEditSplitWindowController, model: KMPageEditSplitSettingModel, limit: Bool = false) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -864,17 +784,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     func splitMenuAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Split_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -960,13 +869,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     override func reverseAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_Reverse_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_Reverse_BuyNow"
@@ -1455,17 +1357,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     @objc func item_insertCustomPage(sender: NSMenuItem?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_InsertBlankPage_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -1527,17 +1418,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     @objc func item_insertFromImage(sender: NSMenuItem?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_InsertImage_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -1600,17 +1480,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     @objc func item_insertFromClipboard(sender: NSMenuItem?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_InsertClipboard_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -1635,17 +1504,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     @objc func item_insertFromScanner(sender: NSMenuItem?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_InsertSacnner_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -1722,17 +1580,6 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
     }
     
     func extractSelectPageItemAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Extract_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -1990,7 +1837,7 @@ extension KMPDFEditViewController {
 
 extension KMPDFEditViewController: KMThumbnailViewDelegate {
     func thumbnailView(thumbanView: KMThumbnailView, canDragItemsAt indexPaths: Set<IndexPath>, with event: NSEvent) -> Bool {
-        return IAPProductsManager.default().isAvailableAllFunction()
+        return KMMemberInfo.shared.isMemberAllFunction
     }
     func thumbnailView(thumbanView: KMThumbnailView, shouldAcceptDrop draggingInfo: NSDraggingInfo, indexPath: IndexPath, dropOperation: NSCollectionView.DropOperation) -> Bool {
         return true

+ 1 - 7
PDF Office/PDF Master/Class/PDFTools/PageEdit/Window/SplitWindowController.swift

@@ -85,7 +85,7 @@ class SplitWindowController: KMBaseWindowController {
         self._fileURL = document.documentURL
         self._PDFDocument = document
         self.fileAttribute?.pdfDocument = document
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             self._splitType = 3
         }
     }
@@ -157,12 +157,6 @@ class SplitWindowController: KMBaseWindowController {
     }
     
     @IBAction func buttonItemClicked_ByRange(_ sender: AnyObject) {
-//        if !IAPProductsManager.default().isAvailableAllFunction() {
-//            pageFromButton.state = .off
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return;
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             pageFromButton.state = .off
             KMMemberInfo.shared.advancedFunctionUsage()

+ 0 - 5
PDF Office/PDF Master/Class/PDFTools/Print/KMPrintWindowController.swift

@@ -186,11 +186,6 @@ extension KMPrintWindowController {
     
     static func showNewPrintWindowControll(inputDocument: CPDFDocument?, inputType: DataNavigationViewButtonActionType = .Print, inputPageRange: KMPrintPageRange, printType: KMPrintModelType = .size) {
         //订阅
-//        if !IAPProductsManager.default().isAvailableAllFunction() && printType != .size {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false && printType != .size {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 0 - 24
PDF Office/PDF Master/Class/PDFTools/Print/PrintHelper/PrintManage/KMPDFPrintManageWindowController.m

@@ -597,14 +597,6 @@ typedef NS_ENUM(NSUInteger, kPageSelectStyle) {
 //Poster
 - (IBAction)buttonItemClicked_Poster:(NSButton *)sender
 {
-//    if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        [self close];
-//        [[KMProductCompareWC shared] setOrientation:NO];
-//        NSWindowController *winC = [KMProductCompareWC shared];
-//        winC.kEventName = @"MenuBar_PrintPoster_BuyNow";
-//        [winC showWindow:nil];
-//        return;
-//    }
     if (![KMMemberInfo shared].isMemberAllFunction) {
         [self close];
         NSWindowController *winC = [KMProductCompareWC shared];
@@ -624,14 +616,6 @@ typedef NS_ENUM(NSUInteger, kPageSelectStyle) {
 //Multiple
 - (IBAction)buttonItemClicked_Multiple:(NSButton *)sender
 {
-//    if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        [self close];
-//        [[KMProductCompareWC shared] setOrientation:NO];
-//        NSWindowController *winC = [KMProductCompareWC shared];
-//        winC.kEventName = @"MenuBar_PrintMultiple_BuyNow";
-//        [winC showWindow:nil];
-//        return;
-//    }
     if (![KMMemberInfo shared].isMemberAllFunction) {
         [self close];
         NSWindowController *winC = [KMProductCompareWC shared];
@@ -651,14 +635,6 @@ typedef NS_ENUM(NSUInteger, kPageSelectStyle) {
 //Booklet
 - (IBAction)buttonItemClicked_Booklet:(NSButton *)sender
 {
-//    if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        [self close];
-//        [[KMProductCompareWC shared] setOrientation:NO];
-//        NSWindowController *winC = [KMProductCompareWC shared];
-//        winC.kEventName = @"MenuBar_PrintBooklet_BuyNow";
-//        [winC showWindow:nil];
-//        return;
-//    }
     if (![KMMemberInfo shared].isMemberAllFunction) {
         [self close];
         NSWindowController *winC = [KMProductCompareWC shared];

+ 0 - 7
PDF Office/PDF Master/Class/PDFTools/RemovePassword/New/View/KMRemovePasswordView.swift

@@ -65,13 +65,6 @@ extension KMRemovePasswordView {
     
     
     @IBAction func removeButtonAction(_ sender: Any) {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_RemoveSecurity_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_RemoveSecurity_BuyNow"

+ 0 - 7
PDF Office/PDF Master/Class/PDFTools/RemovePassword/VC/KMBatchOperateRemovePasswordViewController.swift

@@ -120,13 +120,6 @@ class KMBatchOperateRemovePasswordViewController: KMBatchOperateBaseViewControll
         if self.files?.count ?? 0 < 1 {
             return;
         }
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Onbrd_Security_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Onbrd_Security_BuyNow"

+ 0 - 5
PDF Office/PDF Master/Class/PDFWindowController/PDFListView/CPDFListView.m

@@ -1651,11 +1651,6 @@ NSNotificationName const CPDFListViewDisplayModeChangeNotification = @"CPDFListV
         
         NSString *filePath = filePaths.firstObject;
         if ([supportArray containsObject:[filePath.pathExtension lowercaseString]]) {
-//            if (![[IAPProductsManager defaultManager] isAvailableAllFunction]) {
-//                [[KMProductCompareWC shared] setOrientation:NO];
-//                [[KMProductCompareWC shared] showWindow:nil];
-//                return NO;
-//            }
             if (![KMMemberInfo shared].isMemberAllFunction) {
                 [[KMMemberInfo shared] advancedFunctionUsage];
                 return NO;

+ 0 - 45
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController+Thumbnail.swift

@@ -322,11 +322,6 @@ extension KMLeftSideViewController {
 
 extension KMLeftSideViewController {
     @objc func cutPage(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -343,11 +338,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func deletePage(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -356,11 +346,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func rotatePageMenuAction(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -369,11 +354,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func quickInsert(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -393,11 +373,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func insert(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -458,11 +433,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func insertPDF(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -566,11 +536,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func extractPage(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -583,11 +548,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func displayPageSize(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -602,11 +562,6 @@ extension KMLeftSideViewController {
     }
     
     @objc func sharePage(_ sender: AnyObject?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 0 - 20
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/KMLeftSideViewController.swift

@@ -899,11 +899,6 @@ extension KMLeftSideViewController: KMBotaTableViewDelegate {
     }
     
     func tableView(_ aTableView: NSTableView, pasteFromPasteboard pboard: NSPasteboard?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1493,11 +1488,6 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
             self.layoutDocumentView()
             self.resetThumbnails()
         } else if pasteboard.availableType(from: [.fileURL]) != nil && tableView.isEqual(to: self.thumbnailTableView) {
-//            if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//                return false
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMMemberInfo.shared.advancedFunctionUsage()
                 return false
@@ -1644,11 +1634,6 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
     }
     
     @objc dynamic func tableView(_ aTableView: NSTableView, deleteRowsWithIndexes rowIndexes: IndexSet) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1690,11 +1675,6 @@ extension KMLeftSideViewController: NSTableViewDelegate, NSTableViewDataSource {
     }
     
     func tableView(_ aTableView: NSTableView, copyRowsWithIndexes rowIndexes: IndexSet) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 0 - 54
PDF Office/PDF Master/Class/PDFWindowController/Side/LeftSide/Thumbnail/Base/KMPDFThumbViewBaseController.swift

@@ -152,17 +152,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     // 插入文件事件
     
     public func insertFileAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_InsertPDF_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -217,17 +206,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     // 插入空白页面事件
     
     public func insertBlankPageAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_InsertBlankPage_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -289,11 +267,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     }
     
     public func cutAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -305,17 +278,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     }
     
     public func copyAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            if self.kEventTag == 1 {
-//                winC.kEventName = "Onbrd_EditPage_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_Copy_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             if self.kEventTag == 1 {
@@ -355,11 +317,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     }
     
     public func pasteAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -377,7 +334,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     
     public func pastePage(at index: Int) {
         if KMThumbnailManager.manager.copyPages.isEmpty {
-//        if (!self.canPaste()) {
             KMPrint("no can paste.")
             NSSound.beep()
             return
@@ -401,11 +357,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     
     // 提取 指定的item
     public func extractActionIndexpaths(indexpaths: Set<IndexPath>) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -436,11 +387,6 @@ class KMPDFThumbViewBaseController: KMBaseViewController {
     
     // 替换 特定的item
     public func replaceAction() {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 0 - 17
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/KMAnnotationSelectLinkViewController.swift

@@ -130,23 +130,6 @@ enum KMAnnotationLinkType: UInt {
             box.downCallback = { [weak self] downEntered, mouseBox, event in
                 guard let self = self else { return }
                 if downEntered {
-//                    if !IAPProductsManager.default().isAvailableAllFunction() {
-//                        if mouseBox == self.linkUrlBox || mouseBox == self.linkEmailBox {
-//                            if mouseBox == self.linkUrlBox {
-//                                KMProductCompareWC.shared.orientation = false
-//                                let winC = KMProductCompareWC.shared
-//                                winC.kEventName = "Reading_WebsiteLink_BuyNow"
-//                            } else if mouseBox == self.linkEmailBox {
-//                                KMProductCompareWC.shared.orientation = false
-//                                let winC = KMProductCompareWC.shared
-//                                winC.kEventName = "Reading_EmailLink_BuyNow"
-//                            }
-//                            
-//                            KMProductCompareWC.shared.orientation = false
-//                            KMProductCompareWC.shared.showWindow(nil)
-//                            return
-//                        }
-//                    }
                     if KMMemberInfo.shared.isMemberAllFunction == false {
                         if mouseBox == self.linkUrlBox || mouseBox == self.linkEmailBox {
                             if mouseBox == self.linkUrlBox {

+ 0 - 5
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayCustomThemesCollectionViewItem.swift

@@ -86,11 +86,6 @@ class KMPageDisplayCustomThemesCollectionViewItem: NSCollectionViewItem {
         itemCount = item
         themesBox.mouseDownCallback = { [weak self] downEntered in
             if downEntered {
-//                if !IAPProductsManager.default().isAvailableAllFunction() {
-//                    KMProductCompareWC.shared.orientation = false
-//                    KMProductCompareWC.shared.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     KMMemberInfo.shared.advancedFunctionUsage()
                     return

+ 3 - 19
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift

@@ -560,13 +560,6 @@ class KMPageDisplayPropertiesButton: NSButton {
 //        [[FMTrackEventManager manager] trackEvent:@"SubTbr_PageDisplay" withProperties:@{@"SubTbr_Btn":@"Btn_SubTbr_PageDisplay_ViewSetting_SplitView"}];
         FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_PageDisplay", withProperties: ["SubTbr_Btn": "Btn_SubTbr_PageDisplay_ViewSetting_SplitView"])
         
-//        if sender.tag > 0 && IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_SplitView_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if sender.tag > 0 && KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_SplitView_BuyNow"
@@ -688,7 +681,7 @@ extension KMPageDisplayPropertiesViewController: NSCollectionViewDelegate, NSCol
                 UserDefaults.standard.synchronize()
             }
             
-            if IAPProductsManager.default().isAvailableAllFunction() == false {
+            if KMMemberInfo.shared.isMemberAllFunction == false {
                 item.vipImageView.isHidden = indexPath.item == 0 ? true : false
             } else {
                 item.vipImageView.isHidden = true
@@ -721,7 +714,7 @@ extension KMPageDisplayPropertiesViewController: NSCollectionViewDelegate, NSCol
                     UserDefaults.standard.synchronize()
                 }
                 
-                if IAPProductsManager.default().isAvailableAllFunction() == false {
+                if KMMemberInfo.shared.isMemberAllFunction == false {
                     item.vipImageView.isHidden = false
                 } else {
                     item.vipImageView.isHidden = true
@@ -750,7 +743,7 @@ extension KMPageDisplayPropertiesViewController: NSCollectionViewDelegate, NSCol
                     UserDefaults.standard.synchronize()
                 }
                 
-                if IAPProductsManager.default().isAvailableAllFunction() == false {
+                if KMMemberInfo.shared.isMemberAllFunction == false {
                     item.vipImageView.isHidden = indexPath.item == 0 ? true : false
                 } else {
                     item.vipImageView.isHidden = true
@@ -775,15 +768,6 @@ extension KMPageDisplayPropertiesViewController: NSCollectionViewDelegate, NSCol
         FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_PageDisplay", withProperties: ["SubTbr_Btn": "Btn_SubTbr_PageDisplay_ViewSetting_Themes"])
         
         for indexPath in indexPathArr {
-//            if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                if indexPath.item > 0 {
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    winC.kEventName = "Reading_Theme_BuyNow"
-//                    winC.showWindow(nil)
-//                    return
-//                }
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 if indexPath.item > 0 {
                     let winC = KMProductCompareWC.shared

+ 1 - 6
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayThemeCollectionViewItem.swift

@@ -40,11 +40,6 @@ class KMPageDisplayThemeCollectionViewItem: NSCollectionViewItem {
     }
     
     @IBAction func closeButtonAction(_ sender: Any) {
-//        if !IAPProductsManager.default().isAvailableAllFunction() {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -89,7 +84,7 @@ class KMPageDisplayThemeCollectionViewItem: NSCollectionViewItem {
 
             if mouseEntered {
                 if self.itemInteger.rawValue > 3 {
-                    if !IAPProductsManager.default().isAvailableAllFunction() {
+                    if !KMMemberInfo.shared.isMemberAllFunction {
                         self.closeButton.isHidden = true
                     } else {
                         self.closeButton.isHidden = false

+ 0 - 12
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/Signature/KMSignatureAnnotationViewController.m

@@ -146,18 +146,6 @@ KMSigntureViewItemDelegate>
 }
 
 - (IBAction)insertSignatureButton_Click:(id)sender {
-//    if (![[IAPProductsManager defaultManager] isAvailableAllFunction]) {
-//        [[KMProductCompareWC shared] setOrientation:NO];
-//        NSWindowController *winC = [KMProductCompareWC shared];
-//        if (self.kEventTag == 1) {
-//            winC.kEventName = @"Reading_FillSign_Signature_BuyNow";
-//        } else {
-//            winC.kEventName = @"Reading_Signature_BuyNow";
-//        }
-//        
-//        [winC showWindow:nil];
-//        return;
-//    }
     if (![KMMemberInfo shared].isMemberAllFunction) {
         NSWindowController *winC = [KMProductCompareWC shared];
         if (self.kEventTag == 1) {

+ 0 - 25
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/StampList/KMAnnotationStampViewController.swift

@@ -282,18 +282,9 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
         standardLabel.stringValue = NSLocalizedString("Standard", comment: "")
         standardLabel.textColor = KMAppearance.Layout.h1Color()
         
-//        dynamicBox.fillColor = KMAppearance.Layout.l1Color()
         self.dynamicBoxNew?.fillColor = KMAppearance.Layout.l1Color()
         self.dynamicBoxNew?.downCallback = { [weak self] downEntered, mouseBox, event in
-//        dynamicBox.downCallback = { [weak self] downEntered, mouseBox, event in
             guard let blockSelf = self else { return }
-//            if downEntered && !IAPProductsManager.default().isAvailableAllFunction() {
-//                KMProductCompareWC.shared.orientation = false
-//                let winC = KMProductCompareWC.shared
-//                winC.kEventName = "Reading_DynamicStamp_BuyNow"
-//                winC.showWindow(nil)
-//                return
-//            }
             if downEntered && KMMemberInfo.shared.isMemberAllFunction == false {
                 let winC = KMProductCompareWC.shared
                 winC.kEventName = "Reading_DynamicStamp_BuyNow"
@@ -306,23 +297,12 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
                 blockSelf.stampType = .dynamic
             }
         }
-//        dynamicLabel.stringValue = NSLocalizedString("Dynamic", comment: "")
-//        dynamicLabel.textColor = KMAppearance.Layout.h1Color()
         self.dynamicLabelNew?.stringValue = NSLocalizedString("Dynamic", comment: "")
         self.dynamicLabelNew?.textColor = KMAppearance.Layout.h1Color()
         
-//        customBox.fillColor = KMAppearance.Layout.l1Color()
         self.customBoxNew?.fillColor = KMAppearance.Layout.l1Color()
         self.customBoxNew?.downCallback = { [weak self] downEntered, mouseBox, event in
-//        customBox.downCallback = { [weak self] downEntered, mouseBox, event in
             guard let blockSelf = self else { return }
-//            if downEntered && !IAPProductsManager.default().isAvailableAllFunction() {
-//                KMProductCompareWC.shared.orientation = false
-//                let winC = KMProductCompareWC.shared
-//                winC.kEventName = "Reading_CustomStamp_BuyNow"
-//                winC.showWindow(nil)
-//                return
-//            }
             if downEntered && KMMemberInfo.shared.isMemberAllFunction == false {
                 let winC = KMProductCompareWC.shared
                 winC.kEventName = "Reading_CustomStamp_BuyNow"
@@ -1038,11 +1018,6 @@ let KMPDFDynamicStampNeedAuthorKey1 = "km_pdfview_dynamic_stamp_need_author"
     }
     
     @IBAction func addButtonAction(_ sender: NSButton) {
-//        if !IAPProductsManager.default().isAvailableAllFunction() {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

+ 1 - 9
PDF Office/PDF Master/Class/PDFWindowController/TabWindowController/KMTabbingHintWindowController.swift

@@ -86,14 +86,6 @@ class KMTabbingHintWindowController: NSWindowController{
         self.reloadData()
     }
     @IBAction func buttonClicked_NewTabInWindowButton(_ sender: NSButton) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            sender.state = NSControl.StateValue.off
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_MultiTab_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             sender.state = NSControl.StateValue.off
             let winC = KMProductCompareWC.shared
@@ -129,7 +121,7 @@ class KMTabbingHintWindowController: NSWindowController{
     
     func reloadData() {
         KMMainThreadExecute {
-            self.lockIv.isHidden = IAPProductsManager.default().isAvailableAllFunction()
+            self.lockIv.isHidden = KMMemberInfo.shared.isMemberAllFunction
         }
     }
     

+ 0 - 8
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarViewController.swift

@@ -235,14 +235,6 @@ class KMToolbarViewController: NSViewController, NSTextFieldDelegate {
     @IBAction func leftControllButtonAction(item: KMToolbarClickButton) {
         let tag = KMToolbarViewType(rawValue: item.tag) ?? .None
         if tag == .editPDF {
-//            if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                KMPreference.shared.openDocumentType = .newWindow
-//                KMProductCompareWC.shared.orientation = false
-//                let winC = KMProductCompareWC.shared
-//                winC.kEventName = "Reading_EditPDF_BuyNow"
-//                winC.showWindow(nil)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMPreference.shared.openDocumentType = .newWindow
                 let winC = KMProductCompareWC.shared

+ 2 - 124
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -1254,11 +1254,6 @@ extension KMMainViewController {
         Task { @MainActor in
             let idx = sender.tag
             if idx == 10 {
-//                if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                    KMProductCompareWC.shared.orientation = false
-//                    KMProductCompareWC.shared.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     KMMemberInfo.shared.advancedFunctionUsage()
                     return
@@ -3042,18 +3037,6 @@ extension KMMainViewController {
     
     //MARK: 转档 - OCR
     func showOCRWindow() {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            let type = self.toolbarController.toolbarType ?? .None
-//            if type == .Conversion {
-//                winC.kEventName = "Reading_Convert_OCR_BuyNow"
-//            } else {
-//                winC.kEventName = "Reading_OCR_BuyNow"
-//            }
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             let type = self.toolbarController.toolbarType ?? .None
@@ -3072,13 +3055,6 @@ extension KMMainViewController {
     
     //MARK: 导出图片
     func extractImageAction(num: Int) {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_ExtractImage_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_ExtractImage_BuyNow"
@@ -3241,11 +3217,6 @@ extension KMMainViewController {
         FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Tools", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Tools_Image"])
         
         changeAnnotationMode(sender)
-//        guard IAPProductsManager.default().isAvailableAllFunction() else {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         guard KMMemberInfo.shared.isMemberAllFunction else {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -3257,9 +3228,7 @@ extension KMMainViewController {
         openPanel.allowedFileTypes = KMImageAccessoryController.supportedImageTypes()
         openPanel.allowsMultipleSelection = false
         openPanel.accessoryView = accessoryCtr.view
-//        if #available(macOS 10.11, *) {
-            openPanel.canSelectHiddenExtension = true
-//        }
+        openPanel.canSelectHiddenExtension = true
         openPanel.beginSheetModal(for: NSApp.mainWindow!) { [self] (result) in
             if result == .OK {
                 guard let url = openPanel.url else {
@@ -3313,13 +3282,6 @@ extension KMMainViewController {
     @IBAction func tableAnnotation(_ sender: Any) {
         FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Tools", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Tools_Table"])
         changeAnnotationMode(sender)
-//        guard IAPProductsManager.default().isAvailableAllFunction() else {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_Table_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         guard KMMemberInfo.shared.isMemberAllFunction else {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_Table_BuyNow"
@@ -3819,13 +3781,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
     }
     
     func toolbarViewController(_ viewController: KMToolbarViewController, shareFlatten item: NSMenuItem) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_Flatten_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_Flatten_BuyNow"
@@ -3841,14 +3796,8 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
     
     func toolbarViewController(_ viewController: KMToolbarViewController, scanOCRModel selectedTag: Int) {
         if(0 == selectedTag) {
-//            self.documentAIViewController?.enteredIncreaseAllPage()
-//            self.documentAIViewController?.updateToolState(false)
         } else {
-//            self.documentAIViewController?.recognitionPageString("1", with: .english)
-//            self.documentAIViewController?.recognitionPartModel(with: .english)
-//            self.documentAIViewController?.updateToolState(true)
         }
-        // 0 : Scan  1:OCR Text
     }
     
     func mainToolDidClicked(_ toolController: KMToolbarController, _ beforeType: KMToolbarViewType, _ type: KMToolbarViewType, _ item: KMToolbarItemView , _ pages: [Int]) {
@@ -4004,26 +3953,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
             }
             
             if (type == .bates || type == .headerAndFooter) {
-                
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    if type == .headerAndFooter {
-//                        if index == 1 {
-//                            winC.kEventName = "Reading_AddHeaderFooter_BuyNow"
-//                        } else if index == 2 {
-//                            winC.kEventName = "Reading_RemoveHeaderFooter_BuyNow"
-//                        }
-//                    } else if type == .bates {
-//                        if index == 1 {
-//                            winC.kEventName = "Reading_AddBates_BuyNow"
-//                        } else if index == 2 {
-//                            winC.kEventName = "Reading_RemoveBates_BuyNow"
-//                        }
-//                    }
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     if type == .headerAndFooter {
@@ -4194,11 +4123,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     self.openRightPane()
                 }
             } else if (type == .redact) { /// 标记密文
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    KMProductCompareWC.shared.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     KMMemberInfo.shared.advancedFunctionUsage()
                     return
@@ -4410,13 +4334,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                 }
             } else if type == .comparison {
                 FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Editor", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Editor_Compare"])
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    winC.kEventName = "Reading_Compare_BuyNow"
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     winC.kEventName = "Reading_Compare_BuyNow"
@@ -4456,17 +4373,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
             
                 await NSWindow.currentWindow().beginSheet(controller.window!)
             } else if type == .watermark {
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    if index == 1 {
-//                        winC.kEventName = "Reading_AddWatermark_BuyNow"
-//                    } else if index == 2 {
-//                        winC.kEventName = "Reading_RemoveWatermark_BuyNow"
-//                    }
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     if index == 1 {
@@ -4577,17 +4483,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     return
                 }
             } else if type == .background {
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    if index == 1 {
-//                        winC.kEventName = "Reading_AddBackground_BuyNow"
-//                    } else if index == 2 {
-//                        winC.kEventName = "Reading_RemoveBackground_BuyNow"
-//                    }
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     if index == 1 {
@@ -4669,13 +4564,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                     return
                 }
             } else if type == .measure {
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    winC.kEventName = "Reading_Measure_BuyNow"
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     winC.kEventName = "Reading_Measure_BuyNow"
@@ -5002,11 +4890,9 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
     
     func openNewWindowAlertWindow() {
         var needShowChooseWindow = false
-//#if VERSION_FREE
-        if (!IAPProductsManager.default().isAvailableAllFunction()) {
+        if (!KMMemberInfo.shared.isMemberAllFunction) {
             needShowChooseWindow = true
         }
-//#endif
         if needShowChooseWindow {
             let preferenceNoteShow = UserDefaults.standard.bool(forKey: KMTabbingHintShowFlag)
             if preferenceNoteShow {
@@ -5147,13 +5033,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                 
                 winC.startModal(nil)
             } else if index == 12 {
-//                if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    winC.kEventName = "Reading_ReplaceText_BuyNow"
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     winC.kEventName = "Reading_ReplaceText_BuyNow"
@@ -5184,7 +5063,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
                 }
                 
                 let point = toolbarItem.convert(toolbarItem.frame.origin, to: nil)
-//                - (winC.window?.frame.size.width ?? 0)
                 let x = point.x + (toolbarItem.window?.frame.origin.x ?? 0) - 200
                 let y = point.y + (toolbarItem.window?.frame.origin.y ?? 0) - 388
                 let winFramePoint = NSPoint(x: x, y: y)

+ 0 - 41
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+MenuAction.swift

@@ -95,11 +95,6 @@ extension KMMainViewController: KMSystemFileMenuProtocol {
     
     @IBAction func menuItemClick_saveAsFlattenedPDF(_ sender: Any) {
         Task { @MainActor in
-//            if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMMemberInfo.shared.advancedFunctionUsage()
                 return
@@ -398,11 +393,6 @@ extension KMMainViewController {
             return
         }
 
-//        if item.tag < 2 && IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if item.tag < 2 && KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -417,11 +407,6 @@ extension KMMainViewController {
         }
         let mode = item.tag
         if mode > 0 {
-//            if !IAPProductsManager.default().isAvailableAllFunction() {
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMMemberInfo.shared.advancedFunctionUsage()
                 return
@@ -1233,14 +1218,6 @@ extension KMMainViewController: KMSystemToolMenuProtocol {
     }
     
     func rotateLeft(_ sender: Any?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_Rotate_BuyNow"
-//            winC.kEventTag = 1
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_Rotate_BuyNow"
@@ -1260,14 +1237,6 @@ extension KMMainViewController: KMSystemToolMenuProtocol {
     }
     
     func rotateRight(_ sender: Any?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_Rotate_BuyNow"
-//            winC.kEventTag = 1
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_Rotate_BuyNow"
@@ -1287,11 +1256,6 @@ extension KMMainViewController: KMSystemToolMenuProtocol {
     }
     
     func rotateAllLeft(_ sender: Any?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return
@@ -1312,11 +1276,6 @@ extension KMMainViewController: KMSystemToolMenuProtocol {
     }
     
     func rotateAllRight(_ sender: Any?) {
-//        if IAPProductsManager.default().isAvailableAllFunction() == false {
-//            KMProductCompareWC.shared.orientation = false
-//            KMProductCompareWC.shared.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             KMMemberInfo.shared.advancedFunctionUsage()
             return

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

@@ -306,27 +306,6 @@ extension KMMainViewController: KMToolbarControllerDelegate {
     
     func changeAnnotationModeAction(item: KMToolbarClickButton) {
         if self.listView.toolMode == .formToolMode {
-//            if !IAPProductsManager.default().isAvailableAllFunction(){
-//                KMProductCompareWC.shared.orientation = false
-//                let winC = KMProductCompareWC.shared
-//                if let type = CAnnotationType(rawValue: item.tag) {
-//                    if type == .textField {
-//                        winC.kEventName = "Reading_TextField_BuyNow"
-//                    } else if type == .checkBox {
-//                        winC.kEventName = "Reading_CheckBox_BuyNow"
-//                    } else if type == .radioButton {
-//                        winC.kEventName = "Reading_RadioButton_BuyNow"
-//                    } else if type == .listMenu {
-//                        winC.kEventName = "Reading_ListBox_BuyNow"
-//                    } else if type == .comboBox {
-//                        winC.kEventName = "Reading_ComboBox_BuyNow"
-//                    } else if type == .actionButton {
-//                        winC.kEventName = "Reading_Button_BuyNow"
-//                    }
-//                }
-//                winC.showWindow(nil)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 let winC = KMProductCompareWC.shared
                 if let type = CAnnotationType(rawValue: item.tag) {
@@ -350,13 +329,6 @@ extension KMMainViewController: KMToolbarControllerDelegate {
         } else {
             let type = CAnnotationType(rawValue: item.tag) ?? CAnnotationType.unkown
             if type == .signature {
-//                if !IAPProductsManager.default().isAvailableAllFunction(){
-//                    KMProductCompareWC.shared.orientation = false
-//                    let winC = KMProductCompareWC.shared
-//                    winC.kEventName = "Reading_ElectronicSign_BuyNow"
-//                    winC.showWindow(nil)
-//                    return
-//                }
                 if KMMemberInfo.shared.isMemberAllFunction == false {
                     let winC = KMProductCompareWC.shared
                     winC.kEventName = "Reading_ElectronicSign_BuyNow"

+ 4 - 52
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -539,7 +539,7 @@ import Cocoa
     
     func addAdsBannerView() {
 #if VERSION_FREE
-        if !IAPProductsManager.default().isAvailableAllFunction(){
+        if !KMMemberInfo.shared.isMemberAllFunction {
             guard let document = self.listView.document else {
                 return
             }
@@ -554,29 +554,6 @@ import Cocoa
         }
 
 #endif
-        //加载底部banner
-    //    - (void)loadingAdsManager {
-    //    #if VERSION_FREE
-    //            if(![self.pdfDocument isLocked]) {
-    //                if (![IAPProductsManager defaultManager].isAvailableAllFunction) {
-    //                    [[KMAdsManager defaultManager] beginSheetModalForView:self.pdfView
-    //                                                               directions:KMADViewDirectionsDown
-    //                                                                 animated:NO
-    //                                                        completionHandler:nil];
-    //                }
-    //                [[NSNotificationCenter defaultCenter] addObserverForName:KMIAPProductPurchasedNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note){
-    //                    if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
-    //                        [[KMAdsManager defaultManager] dismissSheetModalForView:self.pdfView];
-    //                    }
-    //                }];
-    //                [[NSNotificationCenter defaultCenter] addObserverForName:kDeviceActivateStatusChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *note){
-    //                    if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
-    //                        [[KMAdsManager defaultManager] dismissSheetModalForView:self.pdfView];
-    //                    }
-    //                }];
-    //            }
-    //    #endif
-    //    }
     }
     
     // MARK: Private Methods
@@ -705,13 +682,6 @@ import Cocoa
     // MARK: - 标记密文
     
     func enterRedact() {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_Redact_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_Redact_BuyNow"
@@ -1038,7 +1008,7 @@ import Cocoa
                 guideWC.digitalBoxRect = (self.view.window?.contentView?.convert(digitalPanelItem.frame, from: digitalPanelItem.superview)) ?? .zero
                 guideWC.purchaseHandle = { [weak self] windowVC in
 #if VERSION_DMG
-                    if IAPProductsManager.default().isAvailableAllFunction() {
+                    if KMMemberInfo.shared.isMemberAllFunction {
                         if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                             //Convert:
                             self?.showAllConvertWindow(convertT: .Word)
@@ -1055,17 +1025,6 @@ import Cocoa
                         KMProductCompareWC.shared.showWindow(nil)
                     }
 #else
-//                    if IAPProductsManager.default().isAvailableAllFunction() {
-//                        if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
-//                            //Convert:
-//                        } else {
-//                            var vc = KMToolCompareWindowController(toolType: .Convert, selectNum: 1)
-//                            vc.showWindow(nil)
-//                        }
-//                    } else {
-//                        KMProductCompareWC.shared.orientation = false
-//                        KMProductCompareWC.shared.showWindow(nil)
-//                    }
                     if KMMemberInfo.shared.isMemberAllFunction == true {
                         if KMMemberInfo.shared.isPermitConvert == true {
                             
@@ -1280,13 +1239,6 @@ import Cocoa
     }
     
     func showDigitalSignWindow(withFilePathURL fileURL: URL) {
-//        if !IAPProductsManager.default().isAvailableAllFunction(){
-//            KMProductCompareWC.shared.orientation = false
-//            let winC = KMProductCompareWC.shared
-//            winC.kEventName = "Reading_DigitalSign_BuyNow"
-//            winC.showWindow(nil)
-//            return
-//        }
         if KMMemberInfo.shared.isMemberAllFunction == false {
             let winC = KMProductCompareWC.shared
             winC.kEventName = "Reading_DigitalSign_BuyNow"
@@ -2482,7 +2434,7 @@ import Cocoa
     }
     
     @objc func purchaseStateUpdateNoti() {
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             KMAdsManager.defaultManager.dismissSheetModal(for: self.readContentView)
         }
     }
@@ -2569,7 +2521,7 @@ extension KMMainViewController {
     // MARK: - Recommond活动
     
     func loadRecommondPopWindow() {
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction {
             return
         }
         

+ 1 - 8
PDF Office/PDF Master/Class/Preference/Controller/KMGeneralPreferences.swift

@@ -129,7 +129,7 @@ class KMGeneralPreferences: NSViewController {
         KMShiftAndResizeView(self.view, dx: 0.0, dw: dw)
         
 #if VERSION_FREE
-    if IAPProductsManager.default().isAvailableAllFunction() == false {
+    if KMMemberInfo.shared.isMemberAllFunction == false {
         KMPreference.shared.openDocumentType = .newWindow
     }
 #endif
@@ -188,13 +188,6 @@ class KMGeneralPreferences: NSViewController {
         var tabbingMode = NSWindow.TabbingMode.automatic
         if (self.openTabButton.indexOfSelectedItem == 0) {
 #if VERSION_FREE
-//            if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                KMPreference.shared.openDocumentType = .newWindow
-//                KMProductCompareWC.shared.orientation = false
-//                KMProductCompareWC.shared.showWindow(nil)
-//                self.openTabButton.selectItem(at: 1)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMMemberInfo.shared.advancedFunctionUsage()
                 self.openTabButton.selectItem(at: 1)

+ 27 - 356
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -142,232 +142,10 @@ NSPopoverDelegate>
     BOOL isFree = NO;
     self.secondTrialBtn.hidden = YES;
     self.bgImg.hidden = YES;
-//#if VERSION_DMG
-//    
-//    if (self.trackingArea) {
-//        [self.button removeTrackingArea:self.trackingArea];
-//    }
-//    
-//    self.label.stringValue = @"";
-//    if (ActivityStatusNone == [VerificationManager manager].status || isFree) {
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//        self.label.stringValue = @"";
-//        self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Free Trial", nil)];
-//        if (isFree) {
-//            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade to Pro", nil)];
-//            self.button.title = [NSString stringWithFormat:@" %@            ",NSLocalizedString(@"Upgrade", nil)];
-//            [self.button setAlignment:NSTextAlignmentCenter];
-//            if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
-//                self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = YES;
-//            } else {
-//                self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//            }
-//        }
-//        self.button.layer.backgroundColor = [NSColor colorWithRed:0.0/255.0 green:207.0/255.0 blue:133.0/255.0 alpha:1].CGColor;
-//        [self.button setTitleColor:[NSColor whiteColor]];
-//    } else if (ActivityStatusTrial == [VerificationManager manager].status) {
-//        NSDate *date = [NSDate date];
-//        NSDate *expireDate = [VerificationManager manager].detailInfo.expireDate;
-//        NSTimeInterval time = [expireDate timeIntervalSinceDate:date];
-//        int leftDays = ((int)time)/(3600*24);
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//        NSString * needShowString = [NSString stringWithFormat:NSLocalizedString(@"%d days left", nil),leftDays];
-//        if (@available(macOS 10.14, *)) {
-//            self.label.attributedStringValue = [self numberConvertColor:[NSColor redColor] String:needShowString];
-//            self.label.textColor = [NSColor colorWithRed:255.0/255.0 green:94.0/255.0 blue:44.0/255.0 alpha:1];
-//        } else {
-//            self.label.stringValue = needShowString;
-//            self.label.textColor = [NSColor colorWithRed:255.0/255.0 green:94.0/255.0 blue:44.0/255.0 alpha:1];
-//        }
-//        
-//        
-//        self.label.wantsLayer = YES;
-//        self.label.layer.backgroundColor = [NSColor clearColor].CGColor;
-//        self.button.layer.backgroundColor = [NSColor colorWithRed:255.0/255.0 green:94.0/255.0 blue:44.0/255.0 alpha:1].CGColor;
-//        self.button.title = [NSString stringWithFormat:@" %@            ",NSLocalizedString(@"Upgrade", nil)];
-//        [self.button setTitleColor:[KMAppearance KMColor_Layout_W0]];
-//        [self.button setAlignment:NSTextAlignmentCenter];
-//        
-//        if (!self.trackingArea) {
-//            self.trackingArea = [[NSTrackingArea alloc] initWithRect:self.button.bounds options:NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingActiveAlways  owner:self userInfo:nil];
-//        }
-//        [self.button addTrackingArea:self.trackingArea];
-//    } else if (ActivityStatusTrialExpire == [VerificationManager manager].status) {
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//        
-//        self.label.wantsLayer = YES;
-//        self.label.layer.backgroundColor = [NSColor clearColor].CGColor;
-//        self.label.stringValue = NSLocalizedString(@"Trial expired", nil);
-//        if (@available(macOS 10.14, *)) {
-//            self.label.textColor = [NSColor whiteColor];
-//        } else {
-//            self.label.textColor = [NSColor redColor];
-//        }
-//        self.label.stringValue = @"";
-//        
-//        self.button.title = [NSString stringWithFormat:@" %@            ",NSLocalizedString(@"Upgrade", nil)];
-//        [self.button setAlignment:NSTextAlignmentCenter];
-//        self.bgImg.hidden = NO;
-//        self.button.layer.backgroundColor = [NSColor clearColor].CGColor;
-//        [self.button setTitleColor:[NSColor whiteColor]];
-//        
-//        if (!self.trackingArea) {
-//            self.trackingArea = [[NSTrackingArea alloc] initWithRect:self.button.bounds options:NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | NSTrackingActiveAlways  owner:self userInfo:nil];
-//        }
-//        [self.button addTrackingArea:self.trackingArea];
-//        
-//        if ([VerificationManager manager].secondTrialEnabled) {
-//            
-//            self.label.stringValue = NSLocalizedString(@"Trial expired", nil);
-//            self.label.hidden = YES;
-//            self.secondTrialBtn.hidden = NO;
-//            self.secondTrialBtn.layer.backgroundColor = [NSColor colorWithRed:0.0/255.0 green:207.0/255.0 blue:133.0/255.0 alpha:1].CGColor;
-//            [self.secondTrialBtn setTitleColor:[NSColor whiteColor]];
-//            [self.secondTrialBtn setAlignment:NSTextAlignmentCenter];
-//            
-//            self.button.title = [NSString stringWithFormat:@" %@            ",NSLocalizedString(@"Upgrade", nil)];
-//            [self.button setTitleColor:[NSColor whiteColor]];
-//            self.bgImg.hidden = NO;
-//            self.button.layer.backgroundColor = [NSColor clearColor].CGColor;
-//            [self.button setAlignment:NSTextAlignmentCenter];
-//        }
-//    } else if (ActivityStatusVerifExpire == [VerificationManager manager].status) {
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//        self.label.stringValue = @"";
-//        self.button.title = [NSString stringWithFormat:@" %@            ",NSLocalizedString(@"Upgrade", nil)];
-//        [self.button setTitleColor:[NSColor whiteColor]];
-//        self.bgImg.hidden = NO;
-//        self.button.layer.backgroundColor = [NSColor clearColor].CGColor;
-//        [self.button setAlignment:NSTextAlignmentCenter];
-//    } else if (ActivityStatusVerification == [VerificationManager manager].status) {
-//        if ([VerificationManager manager].needUpgradeLicense == NO) {
-//            self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = YES;
-//        } else {
-//            self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//            self.label.stringValue = @"";
-//            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"PDF to Office Pack", nil)];
-//            [self.button setTitleColor:[KMAppearance KMColor_Interactive_A0]];
-//            self.button.layer.backgroundColor = [NSColor colorWithRed:229/255. green:233/255. blue:248/255. alpha:1].CGColor;
-//            [self.button setAlignment:NSTextAlignmentCenter];
-//        }
-//    } else {
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = YES;
-//        if ([VerificationManager manager].needUpgradeLicense) {
-//            self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//            self.label.stringValue = @"";
-//            
-//            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"PDF to Office Pack", nil)];
-//            [self.button setTitleColor:[KMAppearance KMColor_Interactive_A0]];
-//            self.button.layer.backgroundColor = [NSColor colorWithRed:229/255. green:233/255. blue:248/255. alpha:1].CGColor;
-//            [self.button setAlignment:NSTextAlignmentCenter];
-//        }
-//    }
-//#else
-//    isFree = YES;
-//    if (isFree) {
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//        self.button.layer.backgroundColor = [NSColor clearColor].CGColor;
-//        self.label.stringValue = @"";
-//        self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Free Trial", nil)];
-//        if (isFree) {
-//            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Upgrade to Pro", nil)];
-//            [self.button setTitleColor:[NSColor whiteColor]];
-//            if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
-//                self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = YES;
-//            } else {
-//                self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//            }
-//            self.bgImg.hidden = self.button.hidden;
-//#if !VERSION_FREE
-//            self.bgImg.hidden = YES;
-//            self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = NO;
-//            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"PDF to Office Pack", nil)];
-//            if ([IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice) {
-//                self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = YES;
-//            }
-//            [self.button setTitleColor:[KMAppearance KMColor_Interactive_A0]];
-//            self.button.layer.backgroundColor = [NSColor colorWithRed:229/255. green:233/255. blue:248/255. alpha:1].CGColor;
-//#endif
-//        }
-//    } else {
-//        self.labelContentView.hidden = self.bgImg.hidden = self.button.hidden = YES;
-//    }
-//        
-//#endif
-//
-//    [self.button sizeToFit];
-//    [self.button setAlignment:NSTextAlignmentCenter];
-//    [self.secondTrialBtn sizeToFit];
-//    [self.secondTrialBtn setAlignment:NSTextAlignmentCenter];
-//    
-//    [self.label sizeToFit];
-//    if (self.label.stringValue.length == 0) {
-//        self.labelContentView.frame = CGRectZero;
-//    } else {
-//        self.labelContentView.frame = CGRectMake(0, kbottomGap, self.label.frame.size.width + self.view.frame.size.height , self.view.frame.size.height -2 *kbottomGap);
-//        
-//        if ([VerificationManager manager].secondTrialEnabled) {
-//            self.labelContentView.frame = CGRectMake(0, kbottomGap, self.button.frame.size.width + self.secondTrialBtn.frame.size.width - 16, self.view.frame.size.height -2 *kbottomGap);
-//        }
-//        self.labelContentView.wantsLayer = YES;
-//        self.labelContentView.layer.cornerRadius = 4.;
-//        [self.labelContentView.layer masksToBounds];
-//        
-//        self.labelContentView.layer.backgroundColor = [NSColor colorWithRed:255.0/255.0 green:94.0/255.0 blue:44.0/255.0 alpha:0.15].CGColor;
-//        if ([VerificationManager manager].secondTrialEnabled) {
-//            self.labelContentView.layer.backgroundColor = [NSColor clearColor].CGColor;
-//        }
-//        self.label.frame = CGRectMake(self.labelContentView.frame.size.height/2, (self.labelContentView.frame.size.height - self.label.frame.size.height)/2, self.label.frame.size.width, self.label.frame.size.height);
-//    }
-//    
-//    CGFloat totalWidth = CGRectGetMaxX(self.labelContentView.frame) + 8;
-//    
-////    self.aiLabel.stringValue = NSLocalizedString(@"My AI Credit", nil);
-////    [self.aiLabel sizeToFit];
-////    CGFloat aiWidth = self.aiLabel.frame.size.width;
-////    aiWidth += 4;
-////    aiWidth += 16;
-////    aiWidth += 16;
-////    self.aiContendView.frame = CGRectMake(totalWidth, 0, aiWidth, self.view.frame.size.height);
-////    self.aiIconImg.frame = CGRectMake(8, CGRectGetHeight(self.view.frame)/2.-8, 16, 16);
-////    CGRect ailabelRect = self.aiLabel.frame;
-////    ailabelRect.origin.x = CGRectGetMaxX(self.aiIconImg.frame) + 4;
-////    self.aiLabel.frame = ailabelRect;
-////    
-////    totalWidth += aiWidth;
-////    totalWidth += 8;
-//    self.aiContendView.hidden = YES;
-//    
-//    if (self.button.hidden == NO) {
-//        CGFloat buttonWidth = CGRectGetMaxX(self.button.frame);
-//        NSRect btnRect = [self.button.attributedTitle boundingRectWithSize:CGSizeMake(MAXFLOAT, CGRectGetHeight(self.button.frame)) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading];
-//        if (fabs(buttonWidth-btnRect.size.width)>50) {
-//            buttonWidth = btnRect.size.width + 10;
-//        }
-//        self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);
-//        totalWidth += buttonWidth;
-//        totalWidth += 8;
-//    }
-//    
-//    if (!self.secondTrialBtn.hidden) {
-//        self.secondTrialBtn.frame = CGRectMake(MAX(CGRectGetMaxX(self.labelContentView.frame) - self.button.frame.size.width, 0), kbottomGap, self.button.frame.size.width, self.view.frame.size.height -2 *kbottomGap);
-//    }
-////    if (self.view.superview) {
-////        self.view.frame = CGRectMake(MAX(0, CGRectGetWidth(self.view.superview.frame)-totalWidth - 8), (CGRectGetHeight(self.view.superview.frame)-CGRectGetHeight(self.view.frame))/2., totalWidth, self.view.frame.size.height);
-////    } else {
-////        if (self.button.hidden) {
-////            self.view.frame = CGRectMake(0,0, CGRectGetMaxX(self.aiLabel.frame) + 20 ,self.view.frame.size.height);
-////        } else {
-////            self.view.frame = CGRectMake(0,0, CGRectGetMaxX(self.button.frame) ,self.view.frame.size.height);
-//        }
-//    }
     
     if (self.frameUpdateHandle) {
         self.frameUpdateHandle(self.view.frame);
     }
-
-//    CGRect rect = self.button.frame;
-//    self.bgImg.frame = rect;
     
     CGFloat totalWidth = 8;
     self.button.hidden = YES;
@@ -422,9 +200,11 @@ NSPopoverDelegate>
         buttonWidth = btnRect.size.width + 10;
     }
     if ([[KMMemberInfo shared].isHaveAIDiscount isEqualToString:@"1"]) {
-        self.aiContendView.hidden = NO;
-        totalWidth+=aiWidth;
-        totalWidth+=4;
+        if(IAPProductsManager.defaultManager.aiAllAccessPack12month_pro.isTrialPeriod == false) {
+            self.aiContendView.hidden = NO;
+            totalWidth+=aiWidth;
+            totalWidth+=4;
+        }
     }
     if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type1 ||
         [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ||
@@ -455,7 +235,7 @@ NSPopoverDelegate>
             }
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type11) {
-            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"开通会员", nil)];
+            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type5 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type9 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypePro_type1 ||
@@ -479,11 +259,31 @@ NSPopoverDelegate>
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type7
 //                   [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type8 ||
                    /*[KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type13*/) {
-            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"立即续费", nil)];
+            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
         }
         [self.button setTitleColor:[NSColor whiteColor]];
         self.bgImg.hidden = NO;
         self.button.hidden = NO;
+        
+        KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
+        // 单平台高级版永久 未登录时 也不显示升级(因为点了也得先登录),但是登录后的卡片里是有升级按钮的,可以升级成全平台高级版年订阅
+        //原来是订阅的,不需要升级,因为目前不支持订阅升级订阅这种场景
+        if(type == KMUserScenarioTypeLite_type9 ||
+           type == KMUserScenarioTypeLite_type10 ||
+           type == KMUserScenarioTypeLite_type11 ||
+           type == KMUserScenarioTypeLite_type12 ||
+           type == KMUserScenarioTypeLite_type13 ||
+           type == KMUserScenarioTypePro_type1 ||
+           type == KMUserScenarioTypePro_type2 ||
+           type == KMUserScenarioTypePro_type3 ||
+           type == KMUserScenarioTypePro_type4 ||
+           type == KMUserScenarioTypePro_type5) {
+            if ([KMMemberInfo shared].isLogin == NO || ([KMMemberInfo shared].isMemberAllFunction == NO && [KMMemberInfo shared].isLogin == YES)) {
+                self.button.hidden = YES;
+                self.bgImg.hidden = YES;
+            }
+
+        }
         self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);
         CGRect rect = self.button.frame;
         self.bgImg.frame = rect;
@@ -540,135 +340,6 @@ NSPopoverDelegate>
 }
 
 - (IBAction)buttonAction:(id)sender {
-//    BOOL isFree = NO;
-//
-//#if VERSION_DMG
-//    if (ActivityStatusNone == [VerificationManager manager].status) {
-//        //弹出 试用弹窗UI优化-新用户试用路径 新UI 情况一 右上角按钮
-//        KMPurchaseFirstTrialWindowController *firstTrialWC = [KMPurchaseFirstTrialWindowController currentFirstTrialWC];
-//        firstTrialWC.buttonActionBlock = ^(KMPurchaseFirstTrialWindowController * _Nonnull ftWC, KMButton * _Nonnull btn, NSString * _Nonnull email, NSString * _Nonnull name) {
-//            if (btn.tag == 10001) {
-//                if (ActivityStatusNone == [VerificationManager manager].status ||
-//                    ActivityStatusTrialExpire == [VerificationManager manager].status) {
-//
-//                    [[FMTrackEventManager defaultManager] trackEventWithEvent:@"Tbr" withProperties:@{@"Tbr_Btn":@"Btn_Tbr_SecondTrial"}];
-//                    [[VerificationManager manager] trialForDays:7
-//                                                          email:email?:[VerificationManager manager].email
-//                                                           name:name?:[VerificationManager manager].accountName
-//                                                    complention:^(ActivityStatus status, NSDictionary *info, NSError *error) {
-//                        if (error ||
-//                            status != ActivityStatusTrial) {
-//                            NSAlert *alert = [NSAlert alertWithMessageText:NSLocalizedString(@"Activation Error", nil)
-//                                                             defaultButton:NSLocalizedString(@"Try Again", nil)
-//                                                           alternateButton:nil
-//                                                               otherButton:nil
-//                                                 informativeTextWithFormat:NSLocalizedString(@"Failed to sign up for the free trial. Please make sure your internet connection is available and try again later.", nil), nil];
-//                            [alert runModal];
-//                        } else {
-//                            KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeRepeatTrialSuccess];
-//                            [vc showWindow:nil];
-//                        }
-//                    }];
-//                    [ftWC close];
-//                } else {
-//                    [ftWC close];
-//                    KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
-//                    vc.callback = ^{
-//                        [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
-//                    };
-//                    [vc showWindow:nil];
-//                }
-//            } else if (btn.tag == 10002) {
-//                NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=app_dmg&utm_medium=dmg_puw_free_trial", Swift_oc_Tool.Store_Link_OC]];
-//                [[NSWorkspace sharedWorkspace] openURL:url];
-//                [[FMTrackEventManager defaultManager] trackEventWithEvent:@"PUW" withProperties:@{@"PUW_Btn":@"PUW_Btn_UpgradeBuyNow"}];
-//            } else if (btn.tag == 10003) {
-//                KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];//KMVerificationTypeActivate
-//                [vc showWindow:nil];
-//                [ftWC close];
-//            }
-//        };
-//        [firstTrialWC.window center];
-//        [firstTrialWC showWindow:nil];
-//    } else if (ActivityStatusTrialExpire == [VerificationManager manager].status ||
-//               ActivityStatusTrial == [VerificationManager manager].status) {
-//            [[NSNotificationCenter defaultCenter] postNotificationName:@"KMVerificationMessagePopShowNoti" object:nil];
-//            
-//        if (!self.testVC) {
-//            self.testVC = [[KMUnlockAlertViewController alloc] init];
-//        }
-//        [self.testVC addtrackingAreaInfo];
-//        self.testVC.callback = ^(NSInteger index) {
-//                if (index == 1) {
-//                    KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
-//                    [vc showWindow:nil];
-//                } else if (index == 2) {
-//                    KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_3"];
-//                    [embeddedWC showWindow:nil];
-//                    [[embeddedWC window] center];
-//                }
-//            };
-//        self.testVC.mouseEventCall = ^(BOOL mouseEnter) {
-//            if (mouseEnter) {
-//                self.stopPopOverHide = YES;
-//                if (ActivityStatusTrialExpire == [VerificationManager manager].status ||
-//                    ActivityStatusTrial == [VerificationManager manager].status) {
-//                    if (!self.popover.isShown) {
-//                        [self buttonAction:self.button];
-//                    }
-//                }
-//            } else {
-//                self.stopPopOverHide = NO;
-//                if (self.popover) {
-//                    [self.popover close];
-//                }
-//                [self.testVC removeTrackingAreaInfo];
-//            }
-//        };
-//            NSPopover *popover = [[NSPopover alloc] init];
-//            popover.delegate = self;
-//            popover.contentViewController = self.testVC;
-//            popover.animates = YES;
-//            popover.behavior = NSPopoverBehaviorTransient;
-//            [popover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMinYEdge];
-//            self.popover = popover;
-//    } else if (ActivityStatusVerifExpire == [VerificationManager manager].status) {
-//        KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivateExpired];
-//        [vc showWindow:nil];
-//    } else if (ActivityStatusVerification == [VerificationManager manager].status) {
-//        if ([VerificationManager manager].needUpgradeLicense) {
-//            KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
-//            [embeddedWC showWindow:nil];
-//            [[embeddedWC window] center];
-//        }
-//    } else {
-//        if ([VerificationManager manager].needUpgradeLicense) {
-//            KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
-//            [embeddedWC showWindow:nil];
-//            [[embeddedWC window] center];
-//        } else {
-//            KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeNormal];
-//            [vc showWindow:nil];
-//        }
-//    }
-//#else
-//    isFree = YES;
-//#if VERSION_FREE
-//    if ([IAPProductsManager defaultManager].isAvailableAllFunction) {
-//        isFree = NO;
-//    }
-//    if (isFree) {
-//        [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
-//    }
-//#else
-//    if (![IAPProductsManager defaultManager].isAvailableAdvancedPDFToOffice) {
-//        KMToolCompareWindowController *vc = [KMToolCompareWindowController toolCompareWithToolType:KMCompareWithToolTypeConvert selectNum:0];
-//        [vc.window center];
-//        [vc showWindow:nil];
-//    }
-//#endif
-//    
-//#endif
     if ([KMMemberInfo shared].isLogin) {
         [[KMProductCompareWC shared] setOrientation:YES];
         if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type1) {

+ 2 - 2
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23504" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23504"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>

+ 0 - 10
PDF Office/PDF Master/Class/Tools/Search/Window/KMSearchReplaceWindowController.swift

@@ -410,16 +410,6 @@ class KMSearchReplaceWindowController: NSWindowController {
     
     func switchType(_ type: KMSearchReplaceType, animate: Bool = false) {
         if type == .replace {
-//            if IAPProductsManager.default().isAvailableAllFunction() == false {
-//                KMProductCompareWC.shared.orientation = false
-//                let winC = KMProductCompareWC.shared
-//                winC.showWindow(nil)
-//                guard let win = winC.window else {
-//                    return
-//                }
-//                self.window?.addChildWindow(win, ordered: .above)
-//                return
-//            }
             if KMMemberInfo.shared.isMemberAllFunction == false {
                 KMMemberInfo.shared.advancedFunctionUsage()
                 return

+ 11 - 11
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.xib

@@ -706,23 +706,23 @@
                             <rect key="frame" x="0.0" y="42" width="77" height="36"/>
                             <subviews>
                                 <box boxType="custom" borderWidth="0.0" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="bdt-qZ-ixY">
-                                    <rect key="frame" x="21" y="9" width="35" height="19"/>
+                                    <rect key="frame" x="20" y="4" width="37" height="28"/>
                                     <view key="contentView" id="0am-hY-Afp">
-                                        <rect key="frame" x="0.0" y="0.0" width="35" height="19"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="37" height="28"/>
                                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                                         <subviews>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TDh-Xw-OR7">
-                                                <rect key="frame" x="-2" y="0.0" width="14" height="19"/>
-                                                <textFieldCell key="cell" lineBreakMode="clipping" title="2" id="HNY-qj-sOt">
-                                                    <font key="font" metaFont="systemBold" size="16"/>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cjO-qk-Gbb">
+                                                <rect key="frame" x="15" y="2" width="24" height="14"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="dev" id="0a3-kx-4jm">
+                                                    <font key="font" metaFont="system" size="11"/>
                                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                 </textFieldCell>
                                             </textField>
-                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="cjO-qk-Gbb">
-                                                <rect key="frame" x="10" y="1" width="27" height="16"/>
-                                                <textFieldCell key="cell" lineBreakMode="clipping" title="dev" id="0a3-kx-4jm">
-                                                    <font key="font" metaFont="system"/>
+                                            <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="TDh-Xw-OR7">
+                                                <rect key="frame" x="-2" y="0.0" width="19" height="28"/>
+                                                <textFieldCell key="cell" lineBreakMode="clipping" title="2" id="HNY-qj-sOt">
+                                                    <font key="font" metaFont="systemBold" size="24"/>
                                                     <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
                                                     <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                                 </textFieldCell>
@@ -733,7 +733,7 @@
                                             <constraint firstAttribute="trailing" secondItem="cjO-qk-Gbb" secondAttribute="trailing" id="ESM-T6-ELI"/>
                                             <constraint firstItem="TDh-Xw-OR7" firstAttribute="leading" secondItem="0am-hY-Afp" secondAttribute="leading" id="f43-Fi-1AY"/>
                                             <constraint firstAttribute="bottom" secondItem="TDh-Xw-OR7" secondAttribute="bottom" id="fY6-qk-rMI"/>
-                                            <constraint firstItem="cjO-qk-Gbb" firstAttribute="centerY" secondItem="0am-hY-Afp" secondAttribute="centerY" id="m8c-R9-afb"/>
+                                            <constraint firstItem="cjO-qk-Gbb" firstAttribute="bottom" secondItem="TDh-Xw-OR7" secondAttribute="bottom" constant="-2" id="qnz-Br-9qW"/>
                                             <constraint firstItem="cjO-qk-Gbb" firstAttribute="leading" secondItem="TDh-Xw-OR7" secondAttribute="trailing" constant="2" id="sPU-PE-WBb"/>
                                         </constraints>
                                     </view>

+ 67 - 2
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -67,8 +67,19 @@ class KMProductModel: ObservableObject {
      */
     var dmgProductDatas: KMMemberProductResult?
     
+    /**
+     DMG 版本 已经登录用户 最后一次价格价格获取
+     */
+    var dmgLastGetProductPriceInfos: KMMemberProductResult?
+    
+    /**
+     DMG 版本 已经登录用户 最后一次价格价格获取
+     */
+    var dmgLastGetBatchProductPriceInfos: KMMemberProductResult?
+    
     // MARK: DMG Public Method
-    func getDMGProductDatas() -> Void {
+    
+    func checkConnectionAvailable() -> Void {
         if KMMemberCenterManager.manager.isConnectionAvailable() == false {
             let alert = NSAlert()
             alert.alertStyle = .critical
@@ -78,12 +89,66 @@ class KMProductModel: ObservableObject {
             alert.runModal()
             return
         }
-
+    }
+    
+    /**
+     @abstract 获取服务器架上所有商品 (得到的价格是原始价格)
+     @param
+     */
+    func getDMGProductDatas() -> Void {
+        checkConnectionAvailable()
         KMMemberCenterManager.manager.getListingProducts(isEducation: 0) { [weak self] success, result in
             guard let productsArrays : KMMemberProductResult = result else { return }
             self?.dmgProductDatas = productsArrays
         }
         
+        if KMMemberInfo.shared.isLogin {
+            getDMGProductPriceInfosForMember(productId: "SP2024102100002", isEducation: 0) { [weak self] success, result in
+                
+            }
+        }
+        
+    }
+    
+    /**
+     @abstract 获取登录用户价格(建立订单时需要用到)
+     @param
+     */
+    func getDMGProductPriceInfosForMember(productId: String, isEducation: Int, _ complete: @escaping KMMemberProductComplete) {
+        checkConnectionAvailable()
+        //暂时无教育优惠,先固定传 0
+        KMMemberCenterManager.manager.getProductPriceForBuy(productId: productId, isEducation: 0, userId:KMMemberInfo.shared.userID) { [weak self] success, result in
+            if success {
+                guard let productsArrays : KMMemberProductResult = result else {
+                    complete(false, result)
+                    return
+                }
+                self?.dmgLastGetProductPriceInfos = productsArrays
+                complete(true, productsArrays)
+            } else {
+                complete(false, result)
+            }
+        }
+    }
+    
+    /**
+     @abstract 获取批量阶段购买价格(建立订单时需要用到)
+     @param
+     */
+    func getDMGBatchProductPriceInfosForMember(productId: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
+        checkConnectionAvailable()
+        KMMemberCenterManager.manager.getBatchProductPrice(productId: productId, num: num) { [weak self] success, result in
+            if success {
+                guard let productsArrays : KMMemberProductResult = result else {
+                    complete(false, result)
+                    return
+                }
+                self?.dmgLastGetBatchProductPriceInfos = productsArrays
+                complete(true, productsArrays)
+            } else {
+                complete(false, result)
+            }
+        }
     }
     
     // MARK: Public Method

+ 1 - 1
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -619,7 +619,7 @@ class KMProductCompareWC: NSWindowController {
             saleBox.isHidden = true
         }
         
-        if IAPProductsManager.default().isAvailableAllFunction() {
+        if KMMemberInfo.shared.isMemberAllFunction == true {
             value1PurchaseButton.isEnabled = false
             permanentPurchaseButton.isEnabled = false
             permanentPurchaseLbl.textColor = NSColor(red: 85/255.0, green: 40/255.0, blue: 255/255.0, alpha: 0.5)