Quellcode durchsuchen

【综合】打开文档引导逻辑完善

niehaoyu vor 1 Jahr
Ursprung
Commit
7087674a01

+ 21 - 21
PDF Office/PDF Master/Class/GuideInfo/KMGuideInfoWindowController.swift

@@ -34,27 +34,27 @@ class KMGuideInfoWindowController: NSWindowController {
 
     //MARK: Static Method
     @objc static func availableShow(_ type: KMGuideInfoType) -> Bool {
-//        if type == .openFileNormal {
-//            if (UserDefaults.standard.object(forKey: kKMGuideInfoOpenFileNormalKey) == nil) {
-//                return true
-//            }
-//        } else if type == .digitalSignGuide {
-//            if (UserDefaults.standard.object(forKey: kKMGuideInfoDigitalSignKey) == nil) {
-//                return true
-//            }
-//        } else if type == .pdfCompareGuide {
-//            if (UserDefaults.standard.object(forKey: kKMGuideInfoPDFCompareKey) == nil) {
-//                return true
-//            }
-//        } else if type == .convertGuide {
-//            if (UserDefaults.standard.object(forKey: kKMGuideInfoFileConvertKey) == nil) {
-//                return true
-//            }
-//        } else if type == .customColor {
-//            if (UserDefaults.standard.object(forKey: kKMGuideInfoCustomColorKey) == nil) {
-//                return true
-//            }
-//        }
+        if type == .openFileNormal {
+            if (UserDefaults.standard.object(forKey: kKMGuideInfoOpenFileNormalKey) == nil) {
+                return true
+            }
+        } else if type == .digitalSignGuide {
+            if (UserDefaults.standard.object(forKey: kKMGuideInfoDigitalSignKey) == nil) {
+                return true
+            }
+        } else if type == .pdfCompareGuide {
+            if (UserDefaults.standard.object(forKey: kKMGuideInfoPDFCompareKey) == nil) {
+                return true
+            }
+        } else if type == .convertGuide {
+            if (UserDefaults.standard.object(forKey: kKMGuideInfoFileConvertKey) == nil) {
+                return true
+            }
+        } else if type == .customColor {
+            if (UserDefaults.standard.object(forKey: kKMGuideInfoCustomColorKey) == nil) {
+                return true
+            }
+        }
         return false
     }
     

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

@@ -718,7 +718,7 @@ import Cocoa
                 }
             }
             guideWC.openFileToggleHandle = { [weak self] windowVC, type in
-                
+                self?.checkFirstTrialController()
             }
             var rect = self.view.window!.frame
             rect.size.height -= 20
@@ -734,7 +734,7 @@ import Cocoa
             guideWC.digitalBoxRect = (self.view.window?.contentView?.convert(digitalPanelItem.frame, from: digitalPanelItem.superview))!
             guideWC.window?.collectionBehavior = [.canJoinAllSpaces]
             guideWC.finishHandle = { [weak self] windowVC, type in
-                
+                self?.checkFirstTrialController()
             }
             var rect = self.view.window!.frame
             rect.size.height -= 20
@@ -775,8 +775,9 @@ import Cocoa
                     if IAPProductsManager.default().isAvailableAllFunction() {
                         if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
                             //Convert:
+                            self?.showAllConvertWindow(convertT: .Word)
                         } else {
-                            var limitWC = KMPurchaseLimitWindowController.currentLimitWC()
+                            let limitWC = KMPurchaseLimitWindowController.currentLimitWC()
                             limitWC.continueBlock = { [weak self] windowController in
                                 
                             }