Просмотр исходного кода

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

tangchao 5 дней назад
Родитель
Сommit
8b2eb43543

+ 1 - 1
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateConvertViewController.xib

@@ -121,7 +121,7 @@
                                                 </textField>
                                                 </textField>
                                                 <button translatesAutoresizingMaskIntoConstraints="NO" id="gJ6-Oq-0D6">
                                                 <button translatesAutoresizingMaskIntoConstraints="NO" id="gJ6-Oq-0D6">
                                                     <rect key="frame" x="0.0" y="0.0" width="300" height="34"/>
                                                     <rect key="frame" x="0.0" y="0.0" width="300" height="34"/>
-                                                    <buttonCell key="cell" type="bevel" title="Button" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="VTO-RV-7fb">
+                                                    <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="VTO-RV-7fb">
                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                                                         <font key="font" metaFont="system"/>
                                                         <font key="font" metaFont="system"/>
                                                     </buttonCell>
                                                     </buttonCell>

+ 1 - 1
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -1484,7 +1484,7 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
                     if(status.uppercased() == "COMPLETED") {
                     if(status.uppercased() == "COMPLETED") {
                         KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
                         KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
                             DispatchQueue.main.async {
                             DispatchQueue.main.async {
-                                NotificationCenter.default.post(name: NSNotification.Name.KMIAPSubscriptionLoaded, object: nil)
+                                NotificationCenter.default.post(name: NSNotification.Name.KMMemberInfoChange, object: self)
                             }
                             }
                         }
                         }
                         
                         

+ 16 - 0
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -143,6 +143,8 @@ NSPopoverDelegate>
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expandPersonalCenterNotification:) name:@"ExpandPersonalCenter" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(expandPersonalCenterNotification:) name:@"ExpandPersonalCenter" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(closeMenu:) name:@"CloseMenuNotification" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(closeMenu:) name:@"CloseMenuNotification" object:nil];
     
     
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memberInfoChangeNotification:) name:KMMemberInfoChangeNotification object:nil];
+
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(subscriptionLoadedNotification:) name:KMIAPSubscriptionLoadedNotification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(subscriptionLoadedNotification:) name:KMIAPSubscriptionLoadedNotification object:nil];
 }
 }
 
 
@@ -621,11 +623,19 @@ NSPopoverDelegate>
 }
 }
 
 
 - (IBAction)officeButtonAction:(id)sender {
 - (IBAction)officeButtonAction:(id)sender {
+#if VERSION_FREE
 #if VERSION_DMG
 #if VERSION_DMG
     DMGEmbeddedOldWC *embeddedWC = [DMGEmbeddedOldWC currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
     DMGEmbeddedOldWC *embeddedWC = [DMGEmbeddedOldWC currentFirstTrialWC:@"com.brother.pdfreaderpro.mac.product_2"];
     [embeddedWC showWindow:nil];
     [embeddedWC showWindow:nil];
     [embeddedWC.window center];
     [embeddedWC.window center];
 #endif
 #endif
+#else
+    [[KMProductCompareWC shared] setOrientation:YES];
+    [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypePro_Base];
+    [[KMProductCompareWC shared] showWindow:nil];
+
+#endif
+
 }
 }
 
 
 - (NSAttributedString *)numberConvertColor:(NSColor*)color String:(NSString *)string {
 - (NSAttributedString *)numberConvertColor:(NSColor*)color String:(NSString *)string {
@@ -786,6 +796,12 @@ NSPopoverDelegate>
         [self reloadData];
         [self reloadData];
     });
     });
 }
 }
+- (void)memberInfoChangeNotification:(NSNotification *)noti {
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [self reloadData];
+    });
+}
+
 
 
 - (void)popOverCloseAction {
 - (void)popOverCloseAction {
     if (self.stopPopOverHide == NO) {
     if (self.stopPopOverHide == NO) {

+ 1 - 0
PDF Office/PDF Master/Class/Purchase/IAPProductsManager.h

@@ -14,6 +14,7 @@ extern NSString * const KMIAPProductPurchasedNotification;
 extern NSString * const KMIAPProductRestoreFailedNotification;
 extern NSString * const KMIAPProductRestoreFailedNotification;
 extern NSString * const KMIAPProductRestoreFinishedNotification;
 extern NSString * const KMIAPProductRestoreFinishedNotification;
 extern NSString * const KMIAPSubscriptionLoadedNotification;
 extern NSString * const KMIAPSubscriptionLoadedNotification;
+extern NSString * const KMMemberInfoChangeNotification;
 
 
 extern NSString * const KMStandardAnnualSubscriptionCodeKey_DMG; // "productName": "PDF Reader Pro Standard - Annual Plan"
 extern NSString * const KMStandardAnnualSubscriptionCodeKey_DMG; // "productName": "PDF Reader Pro Standard - Annual Plan"
 extern NSString * const KMAdvancedAnnualSubscriptionCodeKey_DMG; //"productName": "PDF Reader Pro Advanced - Annual Plan"
 extern NSString * const KMAdvancedAnnualSubscriptionCodeKey_DMG; //"productName": "PDF Reader Pro Advanced - Annual Plan"

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

@@ -71,6 +71,7 @@ NSString * const KMIAPProductPurchasedNotification = @"KMIAPProductPurchasedNoti
 NSString * const KMIAPProductRestoreFailedNotification = @"KMIAPProductRestoreFailedNotification";
 NSString * const KMIAPProductRestoreFailedNotification = @"KMIAPProductRestoreFailedNotification";
 NSString * const KMIAPProductRestoreFinishedNotification = @"KMIAPProductRestoreFinishedNotification";
 NSString * const KMIAPProductRestoreFinishedNotification = @"KMIAPProductRestoreFinishedNotification";
 NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoadedNotification";
 NSString * const KMIAPSubscriptionLoadedNotification = @"KMIAPSubscriptionLoadedNotification";
+NSString * const KMMemberInfoChangeNotification = @"KMMemberInfoChangeNotification";
 
 
 @interface IAPProduct ()
 @interface IAPProduct ()
 
 

+ 3 - 0
PDF Office/PDF Master/MemberCenter/WindowsController/KMMemberPromptWC.swift

@@ -17,6 +17,7 @@ import Cocoa
 
 
 }
 }
 
 
+@objcMembers
 class KMMemberPromptWC: NSWindowController {
 class KMMemberPromptWC: NSWindowController {
     
     
     @IBOutlet weak var titleLabel: NSTextField!
     @IBOutlet weak var titleLabel: NSTextField!
@@ -136,6 +137,8 @@ class KMMemberPromptWC: NSWindowController {
         } else if tipType == .unsubscribe {
         } else if tipType == .unsubscribe {
         } else if tipType == .signout {
         } else if tipType == .signout {
             self.window?.close()
             self.window?.close()
+        } else if tipType == .signouting {
+            self.window?.close()
         }
         }
     }
     }
     
     

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

@@ -1209,10 +1209,14 @@ class KMProductCompareWC: NSWindowController {
             guard let self = self else { return }
             guard let self = self else { return }
             if KMMemberInfo.shared.isLogin {
             if KMMemberInfo.shared.isLogin {
                 self.model.appStoreEquityVerification(notification) { success, msg in
                 self.model.appStoreEquityVerification(notification) { success, msg in
-                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 1.5) {//购买成功后,会员信息没有及时刷新
+                    DispatchQueue.main.async {
                         if success {
                         if success {
 //                            self.showAlert(message: NSLocalizedString("Binding Interest Success!", comment: ""))
 //                            self.showAlert(message: NSLocalizedString("Binding Interest Success!", comment: ""))
+                            
                             KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
                             KMUserInfoVCModel().refreshUserInfo { success, msg,dic  in
+                                if(success) {
+                                    NotificationCenter.default.post(name: NSNotification.Name.KMMemberInfoChange, object: self)
+                                }
                             }
                             }
                             self.window?.close()
                             self.window?.close()
                         } else {
                         } else {