Переглянути джерело

【会员系统】旧版序列码替换为新序列码

wanjun 3 тижнів тому
батько
коміт
93b605b95f

+ 6 - 6
PDF Office/PDF Master/Class/GuideInfo/KMFunctionGuideWindowController.swift

@@ -99,9 +99,9 @@ class KMFunctionGuideWindowController: NSWindowController {
                         if KMMemberInfo.shared.isPermitAI {
                             self?.closeAction()
                         } else {
-                            let singleTon = KMPurchaseCompareDMGWindowController.init()
-                            singleTon.showWindow(nil)
-                            singleTon.window?.center()
+                            KMProductCompareWC.shared.orientation = false
+                            KMProductCompareWC.shared.showWindow(nil)
+                            KMProductCompareWC.shared.window?.center()
                         }
                     } else if controller.currentNameKEY == controller.MeasureInfoKey {
 //                        var url = URL(string: Store_Link)!
@@ -109,9 +109,9 @@ class KMFunctionGuideWindowController: NSWindowController {
                         if VerificationManager.default().status == ActivityStatusVerification {
                             self?.closeAction()
                         } else {
-                            let singleTon = KMPurchaseCompareDMGWindowController.init()
-                            singleTon.showWindow(nil)
-                            singleTon.window?.center()
+                            KMProductCompareWC.shared.orientation = false
+                            KMProductCompareWC.shared.showWindow(nil)
+                            KMProductCompareWC.shared.window?.center()
                         }
                     } else {
                         KMPrint("请配置Key...")

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

@@ -1007,11 +1007,13 @@ extension KMHomeViewController {
             return
         }
         didTrialExpiredLoad = true
-        let singleTon = KMPurchaseCompareDMGWindowController.init()
-        singleTon.showWindow(nil)
-        if singleTon.className == KMPurchaseCompareDMGWindowController.className() {
-            singleTon.updateTitle(NSLocalizedString("Trial Expired, Upgrade to Pro Version", comment: ""), andColor: NSColor(red: 1, green: 59/255, blue: 47/255, alpha: 1))
-        }
+//        let singleTon = KMPurchaseCompareDMGWindowController.init()
+//        singleTon.showWindow(nil)
+//        if singleTon.className == KMPurchaseCompareDMGWindowController.className() {
+//            singleTon.updateTitle(NSLocalizedString("Trial Expired, Upgrade to Pro Version", comment: ""), andColor: NSColor(red: 1, green: 59/255, blue: 47/255, alpha: 1))
+//        }
+        KMProductCompareWC.shared.orientation = false
+        KMProductCompareWC.shared.showWindow(nil)
     }
     
     func checkRepeatTrialAlertController() -> Void {

+ 0 - 1
PDF Office/PDF Master/Class/Purchase/Appstore/KMPurchaseCompareWindowController.m

@@ -9,7 +9,6 @@
 #import "KMPurchaseCompareWindowController.h"
 #import <PDF_Reader_Pro-Swift.h>
 
-#import "KMPurchaseCompareDMGWindowController.h"
 //#import "WaitingView.h"
 //#import "NSButton+TitleColor.h"
 //#import "HyperLinkButton.h"

+ 3 - 3
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseFirstTrialWindowController.swift

@@ -418,9 +418,9 @@ import Cocoa
 //        callBack(self,sender,self.emailTextField.stringValue,self.nameTextField.stringValue)
 //        FMTrackEventManager.defaultManager.trackOnceEvent(event: "PUW", withProperties: ["PUW_Btn":"Btn_PUW_BuyNow"])
 #if VERSION_DMG
-        let singleTon = KMPurchaseCompareDMGWindowController.init()
-        singleTon.showWindow(nil)
-        singleTon.window?.center()
+        KMProductCompareWC.shared.orientation = false
+        KMProductCompareWC.shared.showWindow(nil)
+        KMProductCompareWC.shared.window?.center()
 #endif
     }
     

+ 4 - 4
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationWindowController.m

@@ -302,8 +302,8 @@ static KMVerificationWindowController *_currentWindowController = nil;
 //                NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=app_dmg&utm_medium=dmg_puw_sec_free_trial", Swift_oc_Tool.Store_Link_OC]];
 //                [[NSWorkspace sharedWorkspace] openURL:url];
 //                [blockSelf close];
-                KMPurchaseCompareDMGWindowController *singleTon = [[KMPurchaseCompareDMGWindowController alloc] init];
-                [singleTon showWindow:nil];
+                [[KMProductCompareWC shared] setOrientation:NO];
+                [[KMProductCompareWC shared] showWindow:nil];
             } else if (clickIndex == 2) {
                 //输入序列码
                 KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
@@ -759,8 +759,8 @@ static KMVerificationWindowController *_currentWindowController = nil;
 #if VERSION_DMG
 //    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?utm_source=MacAppDmg&utm_campaign=StoreLink&utm_medium=PdfStore", Swift_oc_Tool.Store_Link_OC]];
 //    [[NSWorkspace sharedWorkspace] openURL:url];
-    KMPurchaseCompareDMGWindowController *singleTon = [[KMPurchaseCompareDMGWindowController alloc] init];
-    [singleTon showWindow:nil];
+    [[KMProductCompareWC shared] setOrientation:NO];
+    [[KMProductCompareWC shared] showWindow:nil];
 #endif
     
 }