12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313 |
- //
- // KMPurchaseCompareDMGWindowController.m
- // PDF Reader Pro Edition
- //
- // Created by 王帅 on 2018/5/8.
- //
- #import "KMPurchaseCompareDMGWindowController.h"
- #import <PDF_Reader_Pro-Swift.h>
- //#import "HyperLinkButton.h"
- #import "KMVerificationWindowController.h"
- //#import "KMPurchaseCompareWindowController.h"
- #import "VerificationManager.h"
- //#import "GAIManager.h"
- //#import "NSImage_SKExtensions.h"
- //#import "KMButton.h"
- //#import "KMBox.h"
- //#import "SKInspectPublicTool.h"
- //#import "NSFont+Custom.h"
- //#import "KMToolbarItemPopViewController.h"
- //#import "KMRecommondManager.h"
- static NSString *const KMPurchaseCompareDMGHeaderCellIdentifier = @"KMPurchaseCompareDMGHeaderCell";
- static NSString *const KMPurchaseCompareDMGCellIdentifier = @"KMPurchaseCompareDMGCell";
- #pragma mark - KMPurchaseCompareDMGHeaderCell
- @interface KMPurchaseCompareDMGHeaderCell : NSTableCellView
- @property (nonatomic,assign) IBOutlet NSView *contentView;
- @end
- @implementation KMPurchaseCompareDMGHeaderCell
- - (void)dealloc {
- [NSDistributedNotificationCenter.defaultCenter removeObserver:self];
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
-
- self.contentView.wantsLayer = YES;
- [self updateViewColor];
- [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(themeChanged:) name:@"AppleInterfaceThemeChangedNotification" object: nil];
- }
- - (void)themeChanged:(NSNotification *)notification {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- [self updateViewColor];
- });
- }
- - (void)updateViewColor {
- NSColor *textColor = [NSColor colorWithDeviceRed:51.0/255.0 green:51.0/255.0 blue:51.0/255.0 alpha:1.0];
- NSColor *viewColor = [NSColor colorWithDeviceRed:55.0/255.0 green:57.0/255.0 blue:59.0/255.0 alpha:0.06];
-
- if (@available(macOS 10.14, *)) {
- NSAppearanceName appearanceName = [[NSApp effectiveAppearance] bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
- if ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]) {
- textColor = [NSColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.87];
- viewColor = [NSColor colorWithRed:52.0/255.0 green:53.0/255.0 blue:56.0/255.0 alpha:1.0];
- }
- }
-
- self.contentView.layer.backgroundColor = viewColor.CGColor;
- self.textField.textColor = textColor;
- self.textField.font = [NSFont boldSystemFontOfSize:14.0];
- }
- @end
- #pragma mark - KMPurchaseCompareDMGCell
- @interface KMPurchaseCompareDMGCell : NSTableCellView
- @property (nonatomic,assign) IBOutlet NSTextField *value1Label;
- @property (nonatomic,assign) IBOutlet NSTextField *value2Label;
- @property (nonatomic,assign) IBOutlet NSImageView *value1ImageView;
- @property (nonatomic,assign) IBOutlet NSImageView *value2ImageView;
- @property (nonatomic,assign) IBOutlet NSBox *lineBox;
- @end
- @implementation KMPurchaseCompareDMGCell
- - (void)dealloc {
- [NSDistributedNotificationCenter.defaultCenter removeObserver:self];
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- [self updateViewColor];
- [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(themeChanged:) name:@"AppleInterfaceThemeChangedNotification" object: nil];
- }
- - (void)themeChanged:(NSNotification *)notification {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- [self updateViewColor];
- });
- }
- - (void)updateViewColor {
- NSColor *textColor = [NSColor colorWithRed:102.0/255.0 green:102.0/255.0 blue:102.0/255.0 alpha:0.85];
- NSColor *lineColor = [NSColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:204.0/255.0 alpha:0.4];
-
- if (@available(macOS 10.14, *)) {
- NSAppearanceName appearanceName = [[NSApp effectiveAppearance] bestMatchFromAppearancesWithNames:@[NSAppearanceNameAqua, NSAppearanceNameDarkAqua]];
- if ([appearanceName isEqualToString:NSAppearanceNameDarkAqua]) {
- textColor = [NSColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.6];
- lineColor = [NSColor colorWithRed:0.0/255.0 green:0.0/255.0 blue:0.0/255.0 alpha:0.4];
- }
- }
- self.value1Label.textColor = self.value2Label.textColor = textColor;
- self.lineBox.fillColor = lineColor;
- self.textField.textColor = textColor;
- }
- @end
- #pragma mark - KMPurchaseCompareDMGWindowController
- @interface KMPurchaseCompareDMGWindowController ()
- @property (nonatomic, assign) IBOutlet NSTextField *titleLabel;
- @property (assign) IBOutlet HyperLinkButton *enterLicenseButton;
- @property (assign) IBOutlet NSView *freeContendView;
- @property (assign) IBOutlet NSView *freeVersionBGView;
- @property (assign) IBOutlet NSTextField *freeVersionLbl;
- @property (assign) IBOutlet NSView *freeVersionLineView;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl1;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl2;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl3;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl4;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl5;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl6;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl7;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl8;
- @property (assign) IBOutlet NSTextField *freeVersionInfoLbl9;
- @property (weak) IBOutlet NSTextField *freeVersionInfoLbl10;
- @property (assign) IBOutlet NSView *parmanentVerBGView;
- @property (assign) IBOutlet NSTextField *parmanentVerLbl;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl1;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl2;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl3;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl4;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl5;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl6;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl7;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl8;
- @property (assign) IBOutlet NSTextField *parmanentVerInfoLbl9;
- @property (weak) IBOutlet NSImageView *parmanentVerInfoImage1;
- @property (weak) IBOutlet NSTextField *parmanentVerInfoLbl10;
- @property (assign) IBOutlet KMButton *parmanentVerInfoBtn2;
- @property (assign) IBOutlet NSImageView *parmanentVerinfoimg2;
- @property (assign) IBOutlet NSView *parmanentInfoView;
- @property (assign) IBOutlet NSImageView *discountTipImage;
- @property (assign) IBOutlet NSTextField *oneTimeTipLbl;
- @property (assign) IBOutlet NSBox *freeTrialBox;
- @property (assign) IBOutlet KMButton *freeTrialButton;
- @property (assign) IBOutlet NSBox *buyNowBox;
- @property (assign) IBOutlet KMButton *buyNowButton;
- @property (assign) IBOutlet NSView *aiContendView;
- @property (assign) IBOutlet NSView *aiSepLineView;
- @property (assign) IBOutlet NSTextField *aiTitleLabel;
- @property (assign) IBOutlet NSTextField *aiInfoLbl1;
- @property (assign) IBOutlet NSTextField *aiInfoLbl2;
- @property (assign) IBOutlet NSTextField *aiInfoLbl3;
- @property (assign) IBOutlet NSTextField *aiInfoLbl4;
- @property (assign) IBOutlet NSTextField *aiPurchaseLabel;
- @property (assign) IBOutlet KMButton *aiPurchaseButton;
- @property (weak) IBOutlet NSTextField *premiumLabel;
- @property (weak) IBOutlet NSTextField *permanentLabel;
- @property (weak) IBOutlet NSSwitch *buySwitch;
- @property (weak) IBOutlet NSTextField *discountPriceLabel;
- @property (weak) IBOutlet NSTextField *originalPriceLabel;
- @property (weak) IBOutlet NSTextField *discountPriceLabel2;
- @property (nonatomic, assign) NSModalSession modalSession;
- @property (nonatomic, retain) NSArray *dataSource;
- @property (nonatomic, retain) NSPopover *popOver;
- - (NSString *)_buyNowEventToPaidEventName;
- - (NSDictionary *)_getPaidEventParamsWith:(NSString *)eventN;
- @end
- @implementation KMPurchaseCompareDMGWindowController
- #pragma mark Init Methods
- - (id)init {
- if (self = [super initWithWindowNibName:@"KMPurchaseCompareDMGWindowController"]) {
- }
- return self;
- }
- - (void)dealloc {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
- [NSDistributedNotificationCenter.defaultCenter removeObserver:self];
-
- }
- - (void)windowDidLoad {
- [super windowDidLoad];
-
- self.window.movableByWindowBackground = YES;
- self.window.backgroundColor = [NSColor whiteColor];
-
- __block typeof(self) blockSelf = self;
-
- [self.freeVersionInfoLbl2 setEnabled:YES];
-
- self.freeVersionLineView.wantsLayer = YES;
-
- self.premiumLabel.stringValue = NSLocalizedString(@"Premium", nil);
- self.premiumLabel.textColor = [NSColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:0.7];
- self.premiumLabel.font = [NSFont SFProTextRegularFont:14.0];
- self.permanentLabel.stringValue = NSLocalizedString(@"Permanent", nil);
- self.permanentLabel.textColor = [NSColor colorWithRed:255.0/255.0 green:94.0/255.0 blue:44.0/255.0 alpha:1.0];
- self.permanentLabel.font = [NSFont SFProTextRegularFont:14.0];
- self.discountPriceLabel.textColor = [NSColor colorWithRed:255.0/255.0 green:231.0/255.0 blue:106.0/255.0 alpha:1.0];
- self.discountPriceLabel.font = [NSFont fontWithName:@"Ubuntu" size:36.0];
- self.originalPriceLabel.textColor = [NSColor whiteColor];
- self.originalPriceLabel.font = [NSFont fontWithName:@"Ubuntu" size:14.0];
- self.discountPriceLabel2.textColor = [NSColor colorWithRed:255.0/255.0 green:231.0/255.0 blue:106.0/255.0 alpha:1.0];
- self.discountPriceLabel2.font = [NSFont fontWithName:@"Ubuntu" size:36.0];
- [self.discountPriceLabel2 setHidden:YES];
- self.discountPriceLabel.hidden = true;
- self.originalPriceLabel.hidden = true;
- self.discountPriceLabel2.hidden = true;
- self.freeVersionLbl.stringValue = NSLocalizedString(@"Free Version", nil);
- self.parmanentVerLbl.stringValue = NSLocalizedString(@"Permanent License", nil);
-
- self.freeVersionInfoLbl1.stringValue = self.parmanentVerInfoLbl1.stringValue = NSLocalizedString(@"View PDFs", nil);
- self.freeVersionInfoLbl2.stringValue = NSLocalizedString(@"Annotate PDFs (basic)", nil);
- self.parmanentVerInfoLbl2.stringValue = NSLocalizedString(@"Annotate PDFs (advanced)", nil);
- self.freeVersionInfoLbl3.stringValue = self.parmanentVerInfoLbl3.stringValue = NSLocalizedString(@"Unlimited file conversion", nil);
- self.freeVersionInfoLbl4.stringValue = self.parmanentVerInfoLbl4.stringValue = NSLocalizedString(@"Edit PDF text and images", nil);
- self.freeVersionInfoLbl5.stringValue = self.parmanentVerInfoLbl5.stringValue = NSLocalizedString(@"Digital signature", nil);
- self.freeVersionInfoLbl6.stringValue = self.parmanentVerInfoLbl6.stringValue = NSLocalizedString(@"Organize pages", nil);
- self.freeVersionInfoLbl7.stringValue = self.parmanentVerInfoLbl7.stringValue = NSLocalizedString(@"Batch process", nil);
- self.freeVersionInfoLbl8.stringValue = self.parmanentVerInfoLbl8.stringValue = NSLocalizedString(@"OCR PDFs", nil);
- self.freeVersionInfoLbl9.stringValue = self.parmanentVerInfoLbl9.stringValue = NSLocalizedString(@"Measuring Tools", nil);
- self.freeVersionInfoLbl10.stringValue = self.parmanentVerInfoLbl10.stringValue = NSLocalizedString(@"Ad-free", nil);
- [self refreshParmanentVerInfo];
- // self.parmanentVerinfoimg2.toolTip = NSLocalizedString(@"Support insert links and custom stamps", nil);
- self.parmanentVerInfoBtn2.mouseMoveCallback = ^(BOOL mouseEntered) {
- if (mouseEntered) {
- KMToolbarItemPopViewController *popViewController = [[KMToolbarItemPopViewController alloc] init];
- self.popOver = [[NSPopover alloc] init];
- self.popOver.contentViewController = popViewController;
- self.popOver.animates = NO;
- self.popOver.behavior = NSPopoverBehaviorSemitransient;
-
- self.popOver.contentSize = popViewController.view.frame.size;
- [popViewController updateWithHelpTipWithHelpTip:NSLocalizedString(@"Support insert links and custom stamps", nil)];
- [self.popOver showRelativeToRect:self.parmanentVerInfoBtn2.frame ofView:self.parmanentInfoView preferredEdge:NSRectEdgeMaxY];
- // self.parmanentVerinfoimg2.image = [NSImage imageNamed:@"ic_Tooltip_hover"];
- } else {
- [self.popOver close];
- // self.parmanentVerinfoimg2.image = [NSImage imageNamed:@"ic_Tooltip"];
- }
- };
-
-
-
- self.oneTimeTipLbl.stringValue = NSLocalizedString(@"one-time purchase", nil);
- self.enterLicenseButton.title = NSLocalizedString(@"Enter License", nil);
- [self.enterLicenseButton setTitleColor:[KMAppearance KMColor_Layout_W0]];
- self.enterLicenseButton.mouseMoveCallback = ^(BOOL mouseEntered) {
- if (mouseEntered) {
- [blockSelf.enterLicenseButton setTitleColor:[KMAppearance KMColor_Layout_W70]];
- } else {
- [blockSelf.enterLicenseButton setTitleColor:[KMAppearance KMColor_Layout_W0]];
- }
- };
-
- self.titleLabel.font = [NSFont SFMediumFontWithSize:20];
- self.freeVersionLbl.font = [NSFont UbuntuBoldFontWithSize:24];
- self.parmanentVerLbl.font = [NSFont UbuntuBoldFontWithSize:24];
- self.freeVersionInfoLbl1.font = self.parmanentVerInfoLbl1.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl2.font = [NSFont SFProTextRegularFont:14.];
- self.parmanentVerInfoLbl2.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl3.font = self.parmanentVerInfoLbl3.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl4.font = self.parmanentVerInfoLbl4.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl5.font = self.parmanentVerInfoLbl5.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl6.font = self.parmanentVerInfoLbl6.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl7.font = self.parmanentVerInfoLbl7.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl8.font = self.parmanentVerInfoLbl8.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl9.font = self.parmanentVerInfoLbl9.font = [NSFont SFProTextRegularFont:14.];
- self.freeVersionInfoLbl10.font = self.parmanentVerInfoLbl10.font = [NSFont SFProTextRegularFont:14.];
- self.buyNowButton.font = [NSFont UbuntuMediumFontWithSize:16];
- self.freeTrialButton.font = [NSFont UbuntuMediumFontWithSize:16];
-
-
- self.freeContendView.wantsLayer = YES;
- self.freeContendView.layer.cornerRadius = 12;
- self.freeContendView.layer.masksToBounds = YES;
-
- self.parmanentVerBGView.wantsLayer = YES;
- self.parmanentVerBGView.layer.cornerRadius = 12;
- self.parmanentVerBGView.layer.masksToBounds = YES;
-
- self.buyNowBox.wantsLayer = YES;
- self.buyNowBox.fillColor = [NSColor colorWithRed:255/255. green:94/255. blue:44/255. alpha:1.];
- self.buyNowBox.cornerRadius = CGRectGetHeight(self.buyNowBox.frame)/2.;
- self.buyNowBox.layer.masksToBounds = YES;
-
- self.buyNowButton.wantsLayer = YES;
- self.buyNowButton.layer.cornerRadius = 1.0;
- self.buyNowButton.title = NSLocalizedString(@"Buy Now", nil);
- self.buyNowButton.mouseMoveCallback = ^(BOOL mouseEntered) {
- if (mouseEntered) {
- blockSelf.buyNowButton.layer.backgroundColor = [[NSColor blackColor] colorWithAlphaComponent:0.15].CGColor;
- } else {
- blockSelf.buyNowButton.layer.backgroundColor = [NSColor clearColor].CGColor;
- }
- };
-
- self.freeTrialBox.cornerRadius = CGRectGetHeight(self.freeTrialBox.frame)/2.;
- self.freeTrialBox.borderWidth = 1.;
-
- self.freeTrialButton.target = self;
- self.freeTrialButton.action = @selector(buttonItemClicked_License:);
- self.freeTrialButton.mouseMoveCallback = ^(BOOL mouseEntered) {
- if ([KMAppearance isDarkMode]) {
- if (mouseEntered) {
- blockSelf.freeTrialBox.fillColor = [NSColor colorWithRed:179/255. green:159/255. blue:1 alpha:0.2];
- } else {
- blockSelf.freeTrialBox.fillColor = [NSColor colorWithRed:179/255. green:159/255. blue:1 alpha:0.07];
- }
- } else {
- if (mouseEntered) {
- blockSelf.freeTrialBox.fillColor = [NSColor colorWithRed:85/255. green:40/255. blue:1 alpha:0.15];
- } else {
- blockSelf.freeTrialBox.fillColor = [NSColor colorWithRed:85/255. green:40/255. blue:1 alpha:0.07];
- }
- }
- };
- self.discountTipImage.hidden = YES;
- // [self updatePriceLabel];
-
- self.aiSepLineView.wantsLayer = YES;
- self.aiInfoLbl1.font = self.aiInfoLbl2.font = self.aiInfoLbl3.font = self.aiInfoLbl4.font = [NSFont SFProTextRegularFont:14];
- self.aiPurchaseLabel.font = [NSFont UbuntuMediumFontWithSize:16];
-
- self.aiTitleLabel.stringValue = NSLocalizedString(@"AI Tools Title", nil);
- self.aiInfoLbl1.stringValue = NSLocalizedString(@"AI Summarize", nil);
- self.aiInfoLbl2.stringValue = NSLocalizedString(@"AI Rewrite", nil);
- self.aiInfoLbl3.stringValue = NSLocalizedString(@"AI Proofread", nil);
- self.aiInfoLbl4.stringValue = NSLocalizedString(@"AI Translate", nil);
- self.aiPurchaseLabel.stringValue = NSLocalizedString(@"Buy Now", nil);
- self.aiPurchaseButton.wantsLayer = YES;
- self.aiPurchaseButton.layer.cornerRadius = CGRectGetHeight(self.aiPurchaseButton.frame)/2.;
- self.aiPurchaseButton.layer.masksToBounds = YES;
- self.aiPurchaseButton.mouseMoveCallback = ^(BOOL mouseEntered) {
- if (mouseEntered) {
- self.aiPurchaseButton.layer.backgroundColor = [[NSColor whiteColor] colorWithAlphaComponent:0.2].CGColor;
- } else {
- self.aiPurchaseButton.layer.backgroundColor = [NSColor clearColor].CGColor;
- }
- };
-
- [self updateViewColor];
-
- [self updatePurchaseInformation];
-
- [NSDistributedNotificationCenter.defaultCenter addObserver:self selector:@selector(themeChanged:) name:@"AppleInterfaceThemeChangedNotification" object: nil];
-
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(recommondInfoUpdateNoti:) name:@"KMRecommondInfoUpdateNoti" object:nil];
- }
- #pragma mark - Private Methods
- - (void)updateViewColor {
-
- if ([KMAppearance isDarkMode]) {
- self.freeContendView.layer.backgroundColor = [[NSColor blackColor] colorWithAlphaComponent:0.3].CGColor;
- self.freeVersionLineView.layer.backgroundColor = [[NSColor whiteColor] colorWithAlphaComponent:0.1].CGColor;
- self.aiSepLineView.layer.backgroundColor = [[NSColor whiteColor] colorWithAlphaComponent:0.1].CGColor;
- self.freeVersionLbl.textColor = [[NSColor whiteColor] colorWithAlphaComponent:0.5];
- self.freeTrialBox.fillColor = [NSColor colorWithRed:179/255. green:159/255. blue:1 alpha:0.07];
- self.freeTrialBox.borderColor = [NSColor colorWithRed:207/255. green:146/255. blue:1 alpha:1];
-
- self.freeVersionInfoLbl1.textColor =
- self.freeVersionInfoLbl2.textColor =
- self.freeVersionInfoLbl3.textColor =
- self.freeVersionInfoLbl4.textColor =
- self.freeVersionInfoLbl5.textColor =
- self.freeVersionInfoLbl6.textColor =
- self.freeVersionInfoLbl7.textColor =
- self.freeVersionInfoLbl8.textColor =
- self.freeVersionInfoLbl9.textColor =
- self.freeVersionInfoLbl10.textColor = [NSColor whiteColor];
-
- self.parmanentVerInfoLbl1.textColor =
- self.parmanentVerInfoLbl2.textColor =
- self.parmanentVerInfoLbl3.textColor =
- self.parmanentVerInfoLbl4.textColor =
- self.parmanentVerInfoLbl5.textColor =
- self.parmanentVerInfoLbl6.textColor =
- self.parmanentVerInfoLbl7.textColor =
- self.parmanentVerInfoLbl8.textColor =
- self.parmanentVerInfoLbl9.textColor =
- self.parmanentVerInfoLbl10.textColor = [NSColor whiteColor];
-
- self.aiInfoLbl1.textColor = self.aiInfoLbl2.textColor = self.aiInfoLbl3.textColor = self.aiInfoLbl4.textColor = [NSColor whiteColor];
- self.aiPurchaseLabel.textColor = [NSColor whiteColor];
-
- self.aiTitleLabel.textColor = [NSColor colorWithRed:239/255. green:235/255. blue:255/255. alpha:1];
- } else {
- self.freeContendView.layer.backgroundColor = [[NSColor whiteColor] colorWithAlphaComponent:0.7].CGColor;
- self.freeVersionLineView.layer.backgroundColor = [NSColor colorWithRed:0 green:33/255. blue:67/255. alpha:0.1].CGColor;
- self.aiSepLineView.layer.backgroundColor = [NSColor colorWithRed:0 green:33/255. blue:67/255. alpha:0.1].CGColor;
- self.freeVersionLbl.textColor = [NSColor colorWithRed:129/255. green:125/255. blue:178/255. alpha:1.];
- self.freeTrialBox.fillColor = [NSColor colorWithRed:85/255. green:40/255. blue:1 alpha:0.07];
- self.freeTrialBox.borderColor = [NSColor colorWithRed:160/255. green:40/255. blue:1 alpha:1];
-
- self.freeVersionInfoLbl1.textColor =
- self.freeVersionInfoLbl2.textColor =
- self.freeVersionInfoLbl3.textColor =
- self.freeVersionInfoLbl4.textColor =
- self.freeVersionInfoLbl5.textColor =
- self.freeVersionInfoLbl6.textColor =
- self.freeVersionInfoLbl7.textColor =
- self.freeVersionInfoLbl8.textColor =
- self.freeVersionInfoLbl9.textColor =
- self.freeVersionInfoLbl10.textColor = [NSColor colorWithRed:20/255.0 green:0/255.0 blue:102/255.0 alpha:1];
-
- self.parmanentVerInfoLbl1.textColor =
- self.parmanentVerInfoLbl2.textColor =
- self.parmanentVerInfoLbl3.textColor =
- self.parmanentVerInfoLbl4.textColor =
- self.parmanentVerInfoLbl5.textColor =
- self.parmanentVerInfoLbl6.textColor =
- self.parmanentVerInfoLbl7.textColor =
- self.parmanentVerInfoLbl8.textColor =
- self.parmanentVerInfoLbl9.textColor =
- self.parmanentVerInfoLbl10.textColor = [NSColor whiteColor];
-
- self.aiInfoLbl1.textColor = self.aiInfoLbl2.textColor = self.aiInfoLbl3.textColor = self.aiInfoLbl4.textColor = [NSColor colorWithRed:20/255. green:0 blue:102/255. alpha:1];
- self.aiPurchaseLabel.textColor = [NSColor whiteColor];
- self.aiTitleLabel.textColor = [NSColor colorWithRed:20/255. green:0 blue:102/255. alpha:1];
- }
-
- self.parmanentVerLbl.textColor = [NSColor colorWithRed:252/255. green:253/255. blue:255/255. alpha:1.];
- self.oneTimeTipLbl.textColor = [NSColor colorWithRed:255/255. green:231/255. blue:106/255. alpha:1.];
-
- if ([KMAppearance isDarkMode]) {
- [self.freeTrialButton setTitleColor:[NSColor colorWithRed:178/255. green:165/255. blue:1 alpha:1]];
- } else {
- [self.freeTrialButton setTitleColor:[NSColor colorWithRed:160/255. green:40/255. blue:1 alpha:1]];
- }
- }
- - (void)updatePurchaseInformation {
- self.freeTrialBox.hidden = NO;
- self.titleLabel.stringValue = NSLocalizedString(@"Upgrade to Pro Version", nil);
- self.titleLabel.textColor = [NSColor whiteColor];
-
- [self.freeTrialButton setTitle:NSLocalizedString(@"7-day Free Trial", nil)];
- if (ActivityStatusVerification == [VerificationManager manager].status) {
- self.freeTrialBox.hidden = YES;
- } else if (ActivityStatusNone == [VerificationManager manager].status) {
-
- } else if (ActivityStatusTrialExpire == [VerificationManager manager].status) {
- self.freeTrialBox.hidden = YES;
- if ([VerificationManager manager].secondTrialEnabled) {
- self.freeTrialBox.hidden = NO;
- }
- } else {
- self.freeTrialBox.hidden = YES;
- }
- if ([KMAppearance isDarkMode]) {
- [self.freeTrialButton setTitleColor:[NSColor colorWithRed:178/255. green:165/255. blue:1 alpha:1]];
- } else {
- [self.freeTrialButton setTitleColor:[NSColor colorWithRed:160/255. green:40/255. blue:1 alpha:1]];
- }
- [self.buyNowButton setTitleColor:[NSColor whiteColor]];
-
- // [self updatePriceLabel];
- }
- //- (void)updatePriceLabel {
- // NSString *originalText = @"";
- // NSString *discountText = @"";
- //#if VERSION_DMG
- // NSString *abbreviation = @"$";
- // if ([@"CNY" isEqualToString:NSLocalizedString(@"USD", nil)]) {
- // abbreviation = @"¥";
- // }
- // if ([self.buySwitch state]) {
- // originalText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
- // discountText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
- // } else {
- // originalText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
- // discountText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
- // }
- //#endif
- // NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:originalText];
- // [attributedText addAttribute:NSStrikethroughStyleAttributeName
- // value:@(NSUnderlineStyleSingle)
- // range:NSMakeRange(0, originalText.length)];
- // self.originalPriceLabel.attributedStringValue = attributedText;
- // self.discountPriceLabel.stringValue = discountText;
- // self.discountPriceLabel2.stringValue = discountText;
- //
- // if (KMAdvertisementManager.manager.info.discountContent.content.count > 0) {
- // KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.discountContent.content.firstObject;
- // if ([KMAdvertisementManager checkAdvertisementValid:info]) {
- // self.discountTipImage.hidden = NO;
- //
- // NSURL *url = [NSURL URLWithString:[KMAdvertisementModelTransition transitionImagePathWithImage:info.image highlight:NO]];
- // self.discountTipImage.image = [KMAdvertisementImage imageWithURLWithUrl:url completion:^(NSImage * _Nonnull image) {
- // self.discountTipImage.image = image;
- // }];
- // if ([originalText isEqualToString:discountText]) {
- // [self.originalPriceLabel setHidden:YES];
- // [self.discountPriceLabel setHidden:YES];
- // [self.discountPriceLabel2 setHidden:NO];
- // [self.discountTipImage setHidden:YES];
- // } else {
- // [self.originalPriceLabel setHidden:NO];
- // [self.discountPriceLabel setHidden:NO];
- // [self.discountPriceLabel2 setHidden:YES];
- // [self.discountTipImage setHidden:NO];
- // }
- // } else {
- // self.discountTipImage.hidden = YES;
- // if ([originalText isEqualToString:discountText]) {
- // [self.originalPriceLabel setHidden:YES];
- // [self.discountPriceLabel setHidden:YES];
- // [self.discountPriceLabel2 setHidden:NO];
- // } else {
- // [self.originalPriceLabel setHidden:NO];
- // [self.discountPriceLabel setHidden:NO];
- // [self.discountPriceLabel2 setHidden:YES];
- // }
- // }
- // }
- //}
- //- (void)updatePriceLabel {
- // NSString *originalText = @"";
- // NSString *discountText = @"";
- // if ([@"USD" isEqualToString:NSLocalizedString(@"USD", nil)]) {
- //#if VERSION_DMG
- // if ([self.buySwitch state]) {
- // originalText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
- // discountText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
- // } else {
- // originalText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
- // discountText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
- // }
- //#endif
- // } else {
- //#if VERSION_DMG
- // if ([self.buySwitch state]) {
- // originalText = [NSString stringWithFormat:@"¥%@", [[KMDMGProductsManager shareInstance] getPriceCNY:@"com.brother.pdfreaderpro.mac.product_3"]];
- // discountText = [NSString stringWithFormat:@"¥%@", [[KMDMGProductsManager shareInstance] getActivityPriceCNY:@"com.brother.pdfreaderpro.mac.product_3"]];
- // } else {
- // originalText = [NSString stringWithFormat:@"¥%@", [[KMDMGProductsManager shareInstance] getPriceCNY:@"com.brother.pdfreaderpro.mac.product_1"]];
- // discountText = [NSString stringWithFormat:@"¥%@", [[KMDMGProductsManager shareInstance] getActivityPriceCNY:@"com.brother.pdfreaderpro.mac.product_1"]];
- // }
- //#endif
- // }
- // NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:originalText];
- // [attributedText addAttribute:NSStrikethroughStyleAttributeName
- // value:@(NSUnderlineStyleSingle)
- // range:NSMakeRange(0, originalText.length)];
- // self.originalPriceLabel.attributedStringValue = attributedText;
- // self.discountPriceLabel.stringValue = discountText;
- //
- // if ([originalText isEqualToString:discountText]) {
- // [self.originalPriceLabel setHidden:YES];
- // } else {
- // [self.originalPriceLabel setHidden:NO];
- // }
- //}
- - (void)refreshParmanentVerInfo {
- if ([self.buySwitch state] == NSControlStateValueOn) {
- self.parmanentVerInfoLbl1.stringValue = NSLocalizedString(@"View PDFs", nil);
- self.parmanentVerInfoLbl2.stringValue = NSLocalizedString(@"Annotate PDFs (advanced)", nil);
- self.parmanentVerInfoLbl3.stringValue = NSLocalizedString(@"Unlimited file conversion", nil);
- self.parmanentVerInfoLbl4.stringValue = NSLocalizedString(@"Edit PDF text and images", nil);
- self.parmanentVerInfoLbl5.stringValue = NSLocalizedString(@"Digital signature", nil);
- self.parmanentVerInfoLbl6.stringValue = NSLocalizedString(@"Organize pages", nil);
- self.parmanentVerInfoLbl7.stringValue = NSLocalizedString(@"Batch process", nil);
- self.parmanentVerInfoLbl8.stringValue = NSLocalizedString(@"OCR PDFs", nil);
- self.parmanentVerInfoLbl9.stringValue = NSLocalizedString(@"Measuring Tools", nil);
- self.parmanentVerInfoLbl10.stringValue = NSLocalizedString(@"Ad-free", nil);
- self.parmanentVerInfoImage1.image = [NSImage imageNamed:@"function_vip"];
- } else {
- self.parmanentVerInfoLbl1.stringValue = NSLocalizedString(@"Unlimited file conversion", nil);
- self.parmanentVerInfoLbl2.stringValue = NSLocalizedString(@"Annotate PDFs (advanced)", nil);
- self.parmanentVerInfoLbl3.stringValue = NSLocalizedString(@"View PDFs", nil);
- self.parmanentVerInfoLbl4.stringValue = NSLocalizedString(@"Edit PDF text and images", nil);
- self.parmanentVerInfoLbl5.stringValue = NSLocalizedString(@"Digital signature", nil);
- self.parmanentVerInfoLbl6.stringValue = NSLocalizedString(@"Organize pages", nil);
- self.parmanentVerInfoLbl7.stringValue = NSLocalizedString(@"Batch process", nil);
- self.parmanentVerInfoLbl8.stringValue = NSLocalizedString(@"OCR PDFs", nil);
- self.parmanentVerInfoLbl9.stringValue = NSLocalizedString(@"Measuring Tools", nil);
- self.parmanentVerInfoLbl10.stringValue = NSLocalizedString(@"Ad-free", nil);
- self.parmanentVerInfoImage1.image = [NSImage imageNamed:@"compare_nosupport"];
- }
- }
- #pragma mark - Window Method
- - (void)showWindow:(id)sender {
- [super showWindow:nil];
-
- [self.window center];
- [self.window orderFront:nil];
-
- [self.buySwitch setState:NSControlStateValueOn];
- // [self updatePriceLabel];
- [self updatePurchaseInformation];
- }
- - (BOOL)windowShouldClose:(id)sender {
- [self endModal:sender];
- return YES;
- }
- - (void)close {
- [super close];
-
- // 清空埋点的数据
- self.kEventName = nil;
- self.kEventTag = 0;
-
- [self endModal:nil];
- }
- - (void)updateTitle:(NSString *)title andColor:(NSColor *)titleColor {
- self.titleLabel.stringValue = title ?:@"";
- self.titleLabel.textColor = titleColor ?:[NSColor labelColor];
-
- }
- #pragma mark - IBAction
- - (IBAction)startModal:(id)sender {
-
- [NSApp stopModal];
-
- NSInteger modalCode;
- self.modalSession = [NSApp beginModalSessionForWindow:self.window];
- do {
- modalCode = [NSApp runModalSession:self.modalSession];
- } while (modalCode == NSRunContinuesResponse);
- }
- - (IBAction)endModal:(id)sender {
- if (self.modalSession) {
- [NSApp stopModal];
- [NSApp endModalSession:self.modalSession];
- [self.window orderOut:self];
-
- self.modalSession = nil;
- }
- }
- - (void)showWindowRestore:(id)sender {
- [self showWindow:sender];
- }
- - (IBAction)enterLicenseAction:(id)sender {
- // if (ActivityStatusNone == [VerificationManager manager].status) {
- // [self close];
- // KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
- // vc.callback = ^{
- // [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
- // };
- // [vc showWindow:nil];
- // } else if (ActivityStatusTrialExpire == [VerificationManager manager].status) {
- // if ([VerificationManager manager].secondTrialEnabled) {
- // [[VerificationManager manager] trialForDays:7
- // email:[VerificationManager manager].email
- // 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];
- // }
- // }];
- // [self close];
- // } else {
- // [self close];
- // KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
- // vc.callback = ^{
- // [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
- // };
- // [vc showWindow:nil];
- // }
- // } else {
- [self close];
- KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
- vc.callback = ^{
- [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
- };
- [vc showWindow:nil];
- // }
- }
- - (IBAction)buttonItemClicked_Buy:(id)sender {
- #if VERSION_DMG
- NSURL *url = [NSURL URLWithString:@"https://www.pdfreaderpro.com/store/pdftecheditor?utm_source=app_dmg&utm_medium=dmg_puw_comparison"];
- [[NSWorkspace sharedWorkspace] openURL:url];
- #endif
-
- #if VERSION_DMG
- [self trackEvent_buyNow];
- NSString *paidEventName = [self _buyNowEventToPaidEventName];
- NSDictionary *paidEventParams = [self _getPaidEventParamsWith:paidEventName];
-
- NSString *thePaidEventName = paidEventParams.allKeys.firstObject;
- NSDictionary *thePaidEventParams = nil;
- if (paidEventName != nil && paidEventParams.allValues.firstObject != nil) {
- thePaidEventParams = @{paidEventParams.allValues.firstObject : paidEventName};
- }
-
- [self close];
-
- NSString *productID = @"";
- if ([self.buySwitch state]) {
- productID = @"com.brother.pdfreaderpro.mac.product_3";
- } else {
- productID = @"com.brother.pdfreaderpro.mac.product_1";
- }
- // KMPurchaseEmbeddedWindowController *embeddedWC = [[KMPurchaseEmbeddedWindowController alloc] initWithWindowNibName:@"KMPurchaseEmbeddedWindowController"];
- // KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:productID];
- // [embeddedWC beginSheetModalFor:NSApp.mainWindow completionHandler:^(NSInteger result) {
- //
- // }];
- // embeddedWC.kEventName = thePaidEventName;
- // embeddedWC.kEventParams = thePaidEventParams;
- // [embeddedWC showWindow:nil];
- // [[embeddedWC window] center];
- #endif
- }
- - (IBAction)buttonItemClicked_CloseWindow:(id)sender {
- [self close];
- }
- - (void)buttonItemClicked_License:(id)sender {
- // if (ActivityStatusNone == [VerificationManager manager].status) {
- // [self close];
- //
- // KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeTrial];
- // [vc showWindow:nil];
- // } else if (ActivityStatusTrialExpire == [VerificationManager manager].status) {
- if ([VerificationManager manager].secondTrialEnabled) {
- [[VerificationManager manager] trialForDays:7
- email:[VerificationManager manager].email
- 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];
- }
- }];
- [self close];
- } else {
- [self close];
- KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeTrial];
- vc.callback = ^{
- [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
- };
- [vc showWindow:nil];
- }
- // } else {
- // [self close];
- // KMVerificationWindowController *vc = [KMVerificationWindowController verificationWithType:KMVerificationTypeActivate];
- // vc.callback = ^{
- // [[KMPurchaseCompareWindowController sharedInstance] showWindow:nil];
- // };
- // [vc showWindow:nil];
- // }
- }
- - (IBAction)aiPurchaseButtonClick:(NSButton *)sender {
- // NSURL *url = [NSURL URLWithString:Swift_oc_Tool.AIProduct_Link_OC];
- // [[NSWorkspace sharedWorkspace] openURL:url];
- //
- // [[FMTrackEventManager defaultManager] trackEventWithEvent:@"PUW" withProperties:@{@"PUW_Btn":@"PUW_Btn_BuyAITools"}];
- [self trackEvent_buyNow];
- NSString *paidEventName = [self _buyNowEventToPaidEventName];
- NSDictionary *paidEventParams = [self _getPaidEventParamsWith:paidEventName];
- NSString *thePaidEventName = paidEventParams.allKeys.firstObject;
- NSDictionary *thePaidEventParams = nil;
- if (paidEventName != nil && paidEventParams.allValues.firstObject != nil) {
- thePaidEventParams = @{paidEventParams.allValues.firstObject : paidEventName};
- }
-
- [self close];
- #if VERSION_DMG
- // KMPurchaseEmbeddedWindowController *embeddedWC = [KMPurchaseEmbeddedWindowController currentFirstTrialWC:@"com.brother.pdfreaderpro.ai.product_1"];
- // embeddedWC.kEventName = thePaidEventName;
- // embeddedWC.kEventParams = thePaidEventParams;
- // [embeddedWC showWindow:nil];
- // [[embeddedWC window] center];
- #endif
- }
- - (IBAction)buySwitchAction:(NSSwitch *)sender {
- [self refreshParmanentVerInfo];
- // [self updatePriceLabel];
- }
- #pragma mark - Noti
- - (void)themeChanged:(NSNotification *)notification {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- [self updateViewColor];
- });
- }
- - (void)recommondInfoUpdateNoti:(NSNotification *)noti {
- // dispatch_async(dispatch_get_main_queue(), ^{
- // [self updatePriceLabel];
- // });
- }
- @end
- @implementation KMPurchaseCompareDMGWindowController (KMAnalytic)
- - (void)trackEvent_buyNow {
- NSDictionary *params = [self _getBuyNowEventParams];
- NSString *theEventName = params.allKeys.firstObject;
- NSDictionary *theParams = nil;
- if (self.kEventName != nil && params.allValues.firstObject != nil) {
- theParams = @{params.allValues.firstObject : self.kEventName};
- }
-
- // [self trackEvent_dmgWithEventName:theEventName params:theParams platform:KMAnalyticsPlatformAppCenter];
- }
- - (NSDictionary *)_getBuyNowEventParams {
- NSString *eveN = self.kEventName;
- if (eveN == nil || eveN.length == 0) {
- return nil;
- }
-
- if ([eveN isEqual:@"Reading_WebsiteLink_BuyNow"] ||
- [eveN isEqual:@"Reading_EmailLink_BuyNow"] ||
- [eveN isEqual:@"Reading_DynamicStamp_BuyNow"] ||
- [eveN isEqual:@"Reading_CustomStamp_BuyNow"] ||
- [eveN isEqual:@"Reading_Signature_BuyNow"] ||
- [eveN isEqual:@"Reading_Table_BuyNow"]) {
- return @{@"Purchase_Tools" : @"SubTbr_Tools"};
- } else if ([eveN isEqual:@"Reading_InsertBlankPage_BuyNow"] ||
- [eveN isEqual:@"Reading_InsertPDF_BuyNow"] ||
- [eveN isEqual:@"Reading_InsertSacnner_BuyNow"] ||
- [eveN isEqual:@"Reading_InsertImage_BuyNow"] ||
- [eveN isEqual:@"Reading_InsertClipboard_BuyNow"] ||
- [eveN isEqual:@"Reading_Replace_BuyNow"] ||
- [eveN isEqual:@"Reading_Extract_BuyNow"] ||
- [eveN isEqual:@"Reading_Split_BuyNow"] ||
- ([eveN isEqual:@"Reading_Rotate_BuyNow"] && self.kEventTag == 0) ||
- [eveN isEqual:@"Reading_Reverse_BuyNow"] ||
- [eveN isEqual:@"Reading_Copy_BuyNow"] ||
- [eveN isEqual:@"Reading_Delete_BuyNow"] ||
- [eveN isEqual:@"Reading_Merge_BuyNow"]) {
- return @{@"Purchase_PageEdit" : @"SubTbr_PageEdit"};
- } else if ([eveN isEqual:@"Onbrd_EditPage_BuyNow"] ||
- [eveN isEqual:@"Onbrd_Merge_BuyNow"]) {
- return @{@"Purchase_PageEdit" : @"Home_PageEdit"};
- } else if ([eveN isEqual:@"Reading_RemoveSecurity_BuyNow"] ||
- [eveN isEqual:@"Reading_Compare_BuyNow"] ||
- [eveN isEqual:@"Reading_AddWatermark_BuyNow"] ||
- [eveN isEqual:@"Reading_RemoveWatermark_BuyNow"] ||
- [eveN isEqual:@"Reading_AddBackground_BuyNow"] ||
- [eveN isEqual:@"Reading_RemoveBackground_BuyNow"] ||
- [eveN isEqual:@"Reading_AddHeaderFooter_BuyNow"] ||
- [eveN isEqual:@"Reading_RemoveHeaderFooter_BuyNow"] ||
- [eveN isEqual:@"Reading_AddBates_BuyNow"] ||
- [eveN isEqual:@"Reading_RemoveBates_BuyNow"] ||
- [eveN isEqual:@"Reading_Measure_BuyNow"]) {
- return @{@"Purchase_Editor" : @"SubTbr_Editor"};
- } else if ([eveN isEqual:@"Onbrd_Compare_BuyNow"] ||
- [eveN isEqual:@"Onbrd_Background_BuyNow"] ||
- [eveN isEqual:@"Onbrd_Watermard_BuyNow"] ||
- [eveN isEqual:@"Onbrd_HeaderFooter_BuyNow"] ||
- [eveN isEqual:@"Onbrd_Bates_BuyNow"] ||
- [eveN isEqual:@"Onbrd_Security_BuyNow"]) {
- return @{@"Purchase_Editor" : @"Home_Editor"};
- } else if ([eveN isEqual:@"Reading_PDFtoWord_BuyNow"] ||
- [eveN isEqual:@"Reading_PDFtoExcel_BuyNow"] ||
- [eveN isEqual:@"Reading_PDFtoPPT_BuyNow"] ||
- [eveN isEqual:@"Reading_PDFtoRTF_BuyNow"] ||
- [eveN isEqual:@"Reading_PDFtoCSV_BuyNow"] ||
- [eveN isEqual:@"Reading_PDFtoText_BuyNow"] ||
- [eveN isEqual:@"Reading_PDFtoImage_BuyNow"] ||
- [eveN isEqual:@"Reading_ExtractImage_BuyNow"]) {
- return @{@"Purchase_Converter" : @"SubTbr_Converter"};
- } else if ([eveN isEqual:@"Onbrd_ConvertPDF_BuyNow"] ||
- [eveN isEqual:@"Onbrd_PDFtoWord_BuyNow"] ||
- [eveN isEqual:@"Onbrd_PDFtoExcel_BuyNow"] ||
- [eveN isEqual:@"Onbrd_PDFtoPPT_BuyNow"] ||
- [eveN isEqual:@"Onbrd_ImagetoPDF_BuyNow"]) {
- return @{@"Purchase_Converter" : @"Home_Converter"};
- } else if ([eveN isEqual:@"Reading_TextField_BuyNow"] ||
- [eveN isEqual:@"Reading_CheckBox_BuyNow"] ||
- [eveN isEqual:@"Reading_RadioButton_BuyNow"] ||
- [eveN isEqual:@"Reading_ListBox_BuyNow"] ||
- [eveN isEqual:@"Reading_ComboBox_BuyNow"] ||
- [eveN isEqual:@"Reading_Button_BuyNow"]) {
- return @{@"Purchase_Form" : @"SubTbr_Forms"};
- } else if ([eveN isEqual:@"Reading_FillSign_Signature_BuyNow"] ||
- [eveN isEqual:@"Reading_DigitalSign_BuyNow"] ||
- [eveN isEqual:@"Reading_ElectronicSign_BuyNow"]) {
- return @{@"Purchase_Sign" : @"SunTbr_Signature"};
- } else if ([eveN isEqual:@"Reading_EditPDF_BuyNow"] ||
- [eveN isEqual:@"Reading_ReplaceText_BuyNow"]) {
- return @{@"Purchase_EditPDF" : @"Tbr_Edit PDF"};
- } else if ([eveN isEqual:@"Reading_Redact_BuyNow"]) {
- return @{@"Purchase_Redact" : @"Tbr_Redact"};
- } else if ([eveN isEqual:@"Reading_OCR_BuyNow"] ||
- [eveN isEqual:@"Reading_Convert_OCR_BuyNow"] ||
- [eveN isEqual:@"Onbrd_OCR_BuyNow"]) {
- return @{@"Purchase_OCR" : @"SubTbr_OCR"};
- } else if ([eveN isEqual:@"Reading_SplitView_BuyNow"] ||
- [eveN isEqual:@"Reading_Rotate_BuyNow"] ||
- [eveN isEqual:@"Reading_Theme_BuyNow"] ||
- [eveN isEqual:@"Reading_MultiTab_BuyNow"]) {
- return @{@"Purchase_PageDisplay" : @"SubTbr_PageDisplay"};
- } else if ([eveN isEqual:@"Onbrd_PrintPoster_BuyNow"] ||
- [eveN isEqual:@"Onbrd_PrintMultiple_BuyNow"] ||
- [eveN isEqual:@"Onbrd_PrintBooklet_BuyNow"]) {
- return @{@"Purchase_Others" : @"Home_Others"};
- } else if ([eveN isEqual:@"Reading_Flatten_BuyNow"]) {
- return @{@"Purchase_Others" : @"SubTbr_Others"};
- } else if ([eveN isEqual:@"MenuBar_PrintPoster_BuyNow"] ||
- [eveN isEqual:@"MenuBar_PrintMultiple_BuyNow"] ||
- [eveN isEqual:@"MenuBar_PrintBooklet_BuyNow"]) {
- return @{@"Purchase_Others" : @"MenuBar_Others"};
- }
- return nil;
- }
- - (NSString *)_buyNowEventToPaidEventName {
- NSString *eveN = self.kEventName;
- if (eveN == nil || eveN.length == 0) {
- return nil;
- }
- // Paid_Tools
- if ([eveN isEqual:@"Reading_WebsiteLink_BuyNow"]) {
- return @"Reading_WebsiteLink_Paid";
- } else if ([eveN isEqual:@"Reading_EmailLink_BuyNow"]) {
- return @"Reading_EmailLink_Paid";
- } else if ([eveN isEqual:@"Reading_DynamicStamp_BuyNow"]) {
- return @"Reading_DynamicStamp_Paid";
- } else if ([eveN isEqual:@"Reading_CustomStamp_BuyNow"]) {
- return @"Reading_CustomStamp_Paid";
- } else if ([eveN isEqual:@"Reading_Signature_BuyNow"]) {
- return @"Reading_Signature_Paid";
- } else if ([eveN isEqual:@"Reading_Table_BuyNow"]) {
- return @"Reading_Table_Paid";
- }
- // Paid_PageEdit SubTbr_PageEdit
- else if ([eveN isEqual:@"Reading_InsertBlankPage_BuyNow"]) {
- return @"Reading_InsertBlankPage_Paid";
- } else if ([eveN isEqual:@"Reading_InsertPDF_BuyNow"]) {
- return @"Reading_InsertPDF_Paid";
- } else if ([eveN isEqual:@"Reading_InsertSacnner_BuyNow"]) {
- return @"Reading_InsertSacnner_Paid";
- } else if ([eveN isEqual:@"Reading_InsertImage_BuyNow"]) {
- return @"Reading_InsertImage_Paid";
- } else if ([eveN isEqual:@"Reading_InsertClipboard_BuyNow"]) {
- return @"Reading_InsertClipboard_Paid";
- } else if ([eveN isEqual:@"Reading_Replace_BuyNow"]) {
- return @"Reading_Replace_Paid";
- } else if ([eveN isEqual:@"Reading_Extract_BuyNow"]) {
- return @"Reading_Extract_Paid";
- } else if ([eveN isEqual:@"Reading_Split_BuyNow"]) {
- return @"Reading_Split_Paid";
- } else if ([eveN isEqual:@"Reading_Rotate_BuyNow"]) {
- return @"Reading_Rotate_Paid";
- } else if ([eveN isEqual:@"Reading_Reverse_BuyNow"]) {
- return @"Reading_Reverse_Paid";
- } else if ([eveN isEqual:@"Reading_Copy_BuyNow"]) {
- return @"Reading_Copy_Paid";
- } else if ([eveN isEqual:@"Reading_Delete_BuyNow"]) {
- return @"Reading_Delete_Paid";
- } else if ([eveN isEqual:@"Reading_Merge_BuyNow"]) {
- return @"Reading_Merge_Paid";
- }
- // Paid_PageEdit Home_PageEdit
- else if ([eveN isEqual:@"Onbrd_EditPage_BuyNow"]) {
- return @"Onbrd_EditPage_Paid";
- } else if ([eveN isEqual:@"Onbrd_Merge_BuyNow"]) {
- return @"Onbrd_Merge_Paid";
- }
- // Paid_Editor SubTbr_Editor
- else if ([eveN isEqual:@"Reading_RemoveSecurity_BuyNow"]) {
- return @"Reading_RemoveSecurity_Paid";
- } else if ([eveN isEqual:@"Reading_Compare_BuyNow"]) {
- return @"Reading_Compare_Paid";
- } else if ([eveN isEqual:@"Reading_AddWatermark_BuyNow"]) {
- return @"Reading_AddWatermark_Paid";
- } else if ([eveN isEqual:@"Reading_RemoveWatermark_BuyNow"]) {
- return @"Reading_RemoveWatermark_Paid";
- } else if ([eveN isEqual:@"Reading_AddBackground_BuyNow"]) {
- return @"Reading_AddBackground_Paid";
- } else if ([eveN isEqual:@"Reading_RemoveBackground_BuyNow"]) {
- return @"Reading_RemoveBackground_Paid";
- } else if ([eveN isEqual:@"Reading_AddHeaderFooter_BuyNow"]) {
- return @"Reading_AddHeaderFooter_Paid";
- } else if ([eveN isEqual:@"Reading_RemoveHeaderFooter_BuyNow"]) {
- return @"Reading_RemoveHeaderFooter_Paid";
- } else if ([eveN isEqual:@"Reading_AddBates_BuyNow"]) {
- return @"Reading_AddBates_Paid";
- } else if ([eveN isEqual:@"Reading_RemoveBates_BuyNow"]) {
- return @"Reading_RemoveBates_Paid";
- } else if ([eveN isEqual:@"Reading_Measure_BuyNow"]) {
- return @"Reading_Measure_Paid";
- }
- // Paid_Editor Home_Editor
- else if ([eveN isEqual:@"Onbrd_Compare_BuyNow"]) {
- return @"Onbrd_Compare_Paid";
- } else if ([eveN isEqual:@"Onbrd_Background_BuyNow"]) {
- return @"Onbrd_Background_Paid";
- } else if ([eveN isEqual:@"Onbrd_Watermard_BuyNow"]) {
- return @"Onbrd_Watermard_Paid";
- } else if ([eveN isEqual:@"Onbrd_HeaderFooter_BuyNow"]) {
- return @"Onbrd_HeaderFooter_Paid";
- } else if ([eveN isEqual:@"Onbrd_Bates_BuyNow"]) {
- return @"Onbrd_Bates_Paid";
- } else if ([eveN isEqual:@"Onbrd_Security_BuyNow"]) {
- return @"Onbrd_Security_Paid";
- }
- // Paid_Converter SubTbr_Converte
- else if ([eveN isEqual:@"Reading_PDFtoWord_BuyNow"]) {
- return @"Reading_PDFtoWord_Paid";
- } else if ([eveN isEqual:@"Reading_PDFtoExcel_BuyNow"]) {
- return @"Reading_PDFtoExcel_Paid";
- } else if ([eveN isEqual:@"Reading_PDFtoPPT_BuyNow"]) {
- return @"Reading_PDFtoPPT_Paid";
- } else if ([eveN isEqual:@"Reading_PDFtoRTF_BuyNow"]) {
- return @"Reading_PDFtoRTF_Paid";
- } else if ([eveN isEqual:@"Reading_PDFtoCSV_BuyNow"]) {
- return @"Reading_PDFtoCSV_Paid";
- } else if ([eveN isEqual:@"Reading_PDFtoText_BuyNow"]) {
- return @"Reading_PDFtoText_Paid";
- } else if ([eveN isEqual:@"Reading_PDFtoImage_BuyNow"]) {
- return @"Reading_PDFtoImage_Paid";
- } else if ([eveN isEqual:@"Reading_ExtractImage_BuyNow"]) {
- return @"Reading_ExtractImage_Paid";
- }
- // Paid_Converter Home_Converter
- else if ([eveN isEqual:@"Onbrd_ConvertPDF_BuyNow"]) {
- return @"Onbrd_ConvertPDF_Paid";
- } else if ([eveN isEqual:@"Onbrd_PDFtoWord_BuyNow"]) {
- return @"Onbrd_PDFtoWord_Paid";
- } else if ([eveN isEqual:@"Onbrd_PDFtoExcel_BuyNow"]) {
- return @"Onbrd_PDFtoExcel_Paid";
- } else if ([eveN isEqual:@"Onbrd_PDFtoPPT_BuyNow"]) {
- return @"Onbrd_PDFtoPPT_Paid";
- } else if ([eveN isEqual:@"Onbrd_ImagetoPDF_BuyNow"]) {
- return @"Onbrd_ImagetoPDF_Paid";
- }
- // Paid_Form SubTbr_Forms
- else if ([eveN isEqual:@"Reading_TextField_BuyNow"]) {
- return @"Reading_TextField_Paid";
- } else if ([eveN isEqual:@"Reading_CheckBox_BuyNow"]) {
- return @"Reading_CheckBox_Paid";
- } else if ([eveN isEqual:@"Reading_RadioButton_BuyNow"]) {
- return @"Reading_RadioButton_Paid";
- } else if ([eveN isEqual:@"Reading_ListBox_BuyNow"]) {
- return @"Reading_ListBox_Paid";
- } else if ([eveN isEqual:@"Reading_ComboBox_BuyNow"]) {
- return @"Reading_ComboBox_Paid";
- } else if ([eveN isEqual:@"Reading_Button_BuyNow"]) {
- return @"Reading_Button_Paid";
- }
- // Paid_Sign SunTbr_Signature
- else if ([eveN isEqual:@"Reading_FillSign_Signature_BuyNow"]) {
- return @"Reading_FillSign_Signature_Paid";
- } else if ([eveN isEqual:@"Reading_DigitalSign_BuyNow"]) {
- return @"Reading_DigitalSign_Paid";
- } else if ([eveN isEqual:@"Reading_ElectronicSign_BuyNow"]) {
- return @"Reading_ElectronicSign_Paid";
- }
- // Paid_EditPDF Tbr_Edit PDF
- else if ([eveN isEqual:@"Reading_EditPDF_BuyNow"]) {
- return @"Reading_EditPDF_Paid";
- } else if ([eveN isEqual:@"Reading_ReplaceText_BuyNow"]) {
- return @"Reading_ReplaceText_Paid";
- }
- // Paid_Redact Tbr_Redact
- else if ([eveN isEqual:@"Reading_Redact_BuyNow"]) {
- return @"Reading_Redact_Paid";
- }
- // Paid_OCR SubTbr_OCR
- else if ([eveN isEqual:@"Reading_OCR_BuyNow"]) {
- return @"Reading_OCR_Paid";
- } else if ([eveN isEqual:@"Reading_Convert_OCR_BuyNow"]) {
- return @"Reading_Convert_OCR_Paid";
- } else if ([eveN isEqual:@"Onbrd_OCR_BuyNow"]) {
- return @"Onbrd_OCR_Paid";
- }
- // Paid_PageDisplay SubTbr_Page Display
- else if ([eveN isEqual:@"Reading_SplitView_BuyNow"]) {
- return @"Reading_SplitView_Paid";
- } else if ([eveN isEqual:@"Reading_Rotate_BuyNow"]) {
- return @"Reading_Rotate_Paid";
- } else if ([eveN isEqual:@"Reading_Theme_BuyNow"]) {
- return @"Reading_Theme_Paid";
- } else if ([eveN isEqual:@"Reading_MultiTab_BuyNow"]) {
- return @"Reading_MultiTab_Paid";
- }
- // Home_Others
- else if ([eveN isEqual:@"Onbrd_PrintPoster_BuyNow"]) {
- return @"Onbrd_PrintPoster_Paid";
- } else if ([eveN isEqual:@"Onbrd_PrintMultiple_BuyNow"]) {
- return @"Onbrd_PrintMultiple_Paid";
- } else if ([eveN isEqual:@"Onbrd_PrintBooklet_BuyNow"]) {
- return @"Onbrd_PrintBooklet_Paid";
- }
- // Paid_Others SubTbr_Others
- else if ([eveN isEqual:@"Reading_Flatten_BuyNow"]) {
- return @"Reading_Flatten_Paid";
- }
- // Paid_Others MenuBar_Others
- else if ([eveN isEqual:@"MenuBar_PrintPoster_BuyNow"]) {
- return @"MenuBar_PrintPoster_Paid";
- } else if ([eveN isEqual:@"MenuBar_PrintMultiple_BuyNow"]) {
- return @"MenuBar_PrintMultiple_Paid";
- } else if ([eveN isEqual:@"MenuBar_PrintBooklet_BuyNow"]) {
- return @"MenuBar_PrintBooklet_Paid";
- }
- return nil;
- }
- - (NSDictionary *)_getPaidEventParamsWith:(NSString *)eventN {
- NSString *eveN = eventN;
- if (eveN == nil || eveN.length == 0) {
- return nil;
- }
-
- // Paid_Tools SubTbr_Tools
- if ([eveN isEqual:@"Reading_WebsiteLink_Paid"] ||
- [eveN isEqual:@"Reading_EmailLink_Paid"] ||
- [eveN isEqual:@"Reading_DynamicStamp_Paid"] ||
- [eveN isEqual:@"Reading_CustomStamp_Paid"] ||
- [eveN isEqual:@"Reading_Signature_Paid"] ||
- [eveN isEqual:@"Reading_Table_Paid"]) {
- return @{@"Paid_Tools" : @"SubTbr_Tools"};
- }
- // Paid_PageEdit SubTbr_PageEdit
- else if ([eveN isEqual:@"Reading_InsertBlankPage_Paid"] ||
- [eveN isEqual:@"Reading_InsertPDF_Paid"] ||
- [eveN isEqual:@"Reading_InsertSacnner_Paid"] ||
- [eveN isEqual:@"Reading_InsertImage_Paid"] ||
- [eveN isEqual:@"Reading_InsertClipboard_Paid"] ||
- [eveN isEqual:@"Reading_Replace_Paid"] ||
- [eveN isEqual:@"Reading_Extract_Paid"] ||
- [eveN isEqual:@"Reading_Split_Paid"] ||
- [eveN isEqual:@"Reading_Rotate_Paid"] ||
- [eveN isEqual:@"Reading_Reverse_Paid"] ||
- [eveN isEqual:@"Reading_Copy_Paid"] ||
- [eveN isEqual:@"Reading_Delete_Paid"] ||
- [eveN isEqual:@"Reading_Merge_Paid"]) {
- return @{@"Paid_PageEdit" : @"SubTbr_PageEdit"};
- }
- // Paid_PageEdit Home_PageEdit
- else if ([eveN isEqual:@"Onbrd_EditPage_Paid"] ||
- [eveN isEqual:@"Onbrd_Merge_Paid"]) {
- return @{@"Paid_PageEdit" : @"Home_PageEdit"};
- }
- // Paid_Editor SubTbr_Editor
- else if ([eveN isEqual:@"Reading_RemoveSecurity_Paid"] ||
- [eveN isEqual:@"Reading_Compare_Paid"] ||
- [eveN isEqual:@"Reading_AddWatermark_Paid"] ||
- [eveN isEqual:@"Reading_RemoveWatermark_Paid"] ||
- [eveN isEqual:@"Reading_AddBackground_Paid"] ||
- [eveN isEqual:@"Reading_RemoveBackground_Paid"] ||
- [eveN isEqual:@"Reading_AddHeaderFooter_Paid"] ||
- [eveN isEqual:@"Reading_RemoveHeaderFooter_Paid"] ||
- [eveN isEqual:@"Reading_AddBates_Paid"] ||
- [eveN isEqual:@"Reading_RemoveBates_Paid"] ||
- [eveN isEqual:@"Reading_Measure_Paid"]) {
- return @{@"" : @""};
- }
- // Paid_Editor Home_Editor
- else if ([eveN isEqual:@"Onbrd_Compare_Paid"] ||
- [eveN isEqual:@"Onbrd_Background_Paid"] ||
- [eveN isEqual:@"Onbrd_Watermard_Paid"] ||
- [eveN isEqual:@"Onbrd_HeaderFooter_Paid"] ||
- [eveN isEqual:@"Onbrd_Bates_Paid"] ||
- [eveN isEqual:@"Onbrd_Security_Paid"]) {
- return @{@"Paid_Editor" : @"Home_Editor"};
- }
- // Paid_Converter SubTbr_Converter
- else if ([eveN isEqual:@"Reading_PDFtoWord_Paid"] ||
- [eveN isEqual:@"Reading_PDFtoExcel_Paid"] ||
- [eveN isEqual:@"Reading_PDFtoPPT_Paid"] ||
- [eveN isEqual:@"Reading_PDFtoRTF_Paid"] ||
- [eveN isEqual:@"Reading_PDFtoCSV_Paid"] ||
- [eveN isEqual:@"Reading_PDFtoText_Paid"] ||
- [eveN isEqual:@"Reading_PDFtoImage_Paid"] ||
- [eveN isEqual:@"Reading_ExtractImage_Paid"]) {
- return @{@"Paid_Converter" : @"SubTbr_Converter"};
- }
- // Paid_Converter Home_Converter
- else if ([eveN isEqual:@"Onbrd_ConvertPDF_Paid"] ||
- [eveN isEqual:@"Onbrd_PDFtoWord_Paid"] ||
- [eveN isEqual:@"Onbrd_PDFtoExcel_Paid"] ||
- [eveN isEqual:@"Onbrd_PDFtoPPT_Paid"] ||
- [eveN isEqual:@"Onbrd_ImagetoPDF_Paid"]) {
- return @{@"Paid_Converter" : @"Home_Converter"};
- }
- // Paid_Form SubTbr_Forms
- else if ([eveN isEqual:@"Reading_TextField_Paid"] ||
- [eveN isEqual:@"Reading_CheckBox_Paid"] ||
- [eveN isEqual:@"Reading_RadioButton_Paid"] ||
- [eveN isEqual:@"Reading_ListBox_Paid"] ||
- [eveN isEqual:@"Reading_ComboBox_Paid"] ||
- [eveN isEqual:@"Reading_Button_Paid"]) {
- return @{@"Paid_Form" : @"SubTbr_Forms"};
- }
- // Paid_Sign SunTbr_Signature
- else if ([eveN isEqual:@"Reading_FillSign_Signature_Paid"] ||
- [eveN isEqual:@"Reading_DigitalSign_Paid"] ||
- [eveN isEqual:@"Reading_ElectronicSign_Paid"]) {
- return @{@"Paid_Sign" : @"SunTbr_Signature"};
- }
- // Paid_EditPDF Tbr_Edit PDF
- else if ([eveN isEqual:@"Reading_EditPDF_Paid"] ||
- [eveN isEqual:@"Reading_ReplaceText_Paid"]) {
- return @{@"Paid_EditPDF" : @"Tbr_Edit PDF"};
- }
- // Paid_Redact Tbr_Redact
- else if ([eveN isEqual:@"Reading_Redact_Paid"]) {
- return @{@"Paid_Redact" : @"Tbr_Redact"};
- }
- // Paid_OCR SubTbr_OCR
- else if ([eveN isEqual:@"Reading_OCR_Paid"] ||
- [eveN isEqual:@"Reading_Convert_OCR_Paid"] ||
- [eveN isEqual:@"Onbrd_OCR_Paid"]) {
- return @{@"Paid_OCR" : @"SubTbr_OCR"};
- }
- // Paid_PageDisplay SubTbr_Page Display
- else if ([eveN isEqual:@"Reading_SplitView_Paid"] ||
- [eveN isEqual:@"Reading_Rotate_Paid"] ||
- [eveN isEqual:@"Reading_Theme_Paid"] ||
- [eveN isEqual:@"Reading_MultiTab_Paid"]) {
- return @{@"Paid_PageDisplay" : @"SubTbr_Page Display"};
- }
- // Home_Others
- else if ([eveN isEqual:@"Onbrd_PrintPoster_Paid"] ||
- [eveN isEqual:@"Onbrd_PrintMultiple_Paid"] ||
- [eveN isEqual:@"Onbrd_PrintBooklet_Paid"]) {
- return @{@"Paid_Others" : @"Home_Others"};
- }
- // Paid_Others SubTbr_Others
- else if ([eveN isEqual:@"Reading_Flatten_Paid"]) {
- return @{@"Paid_Others" : @"SubTbr_Others"};
- }
- // Paid_Others MenuBar_Others
- else if ([eveN isEqual:@"MenuBar_PrintPoster_Paid"] ||
- [eveN isEqual:@"MenuBar_PrintMultiple_Paid"] ||
- [eveN isEqual:@"MenuBar_PrintBooklet_Paid"]) {
- return @{@"Paid_Others" : @"MenuBar_Others"};
- }
- return nil;
- }
- @end
|