|
@@ -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) {
|