|
@@ -308,12 +308,18 @@ class KMProductCompareWC: NSWindowController {
|
|
|
|
|
|
@objc override func showWindow(_ sender: Any?) {
|
|
@objc override func showWindow(_ sender: Any?) {
|
|
super.showWindow(sender)
|
|
super.showWindow(sender)
|
|
|
|
+ if orientation {
|
|
|
|
+ model.state = orientationType
|
|
|
|
+ } else {
|
|
|
|
+ model.getCurrentComparisonTableType()
|
|
|
|
+ }
|
|
languageLocalized()
|
|
languageLocalized()
|
|
initializeUI()
|
|
initializeUI()
|
|
reloadData()
|
|
reloadData()
|
|
if model.isShowSale {
|
|
if model.isShowSale {
|
|
showDiscountToSaveWindow()
|
|
showDiscountToSaveWindow()
|
|
}
|
|
}
|
|
|
|
+ reloadDataContent()
|
|
}
|
|
}
|
|
|
|
|
|
// MARK: - Private Methods
|
|
// MARK: - Private Methods
|
|
@@ -355,12 +361,15 @@ class KMProductCompareWC: NSWindowController {
|
|
#if VERSION_DMG
|
|
#if VERSION_DMG
|
|
// DMG
|
|
// DMG
|
|
if model.state == .dmg_Base {
|
|
if model.state == .dmg_Base {
|
|
-
|
|
|
|
|
|
+ standardPlanPurchaseLabel.stringValue = model.getProductPrice(.pdfReaderProStandard_dmg)
|
|
|
|
+ advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.pdfReaderProAdvanced_dmg)
|
|
|
|
+ permanentPurchaseLabel.stringValue = model.getProductPrice(.pdfReaderProPermanent_dmg)
|
|
} else if model.state == .dmg_Upgrades1 {
|
|
} else if model.state == .dmg_Upgrades1 {
|
|
-
|
|
|
|
|
|
+ advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.add2Device_dmg)
|
|
} else if model.state == .dmg_Upgrades2 {
|
|
} else if model.state == .dmg_Upgrades2 {
|
|
-
|
|
|
|
|
|
+ advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.add3Device_dmg)
|
|
} else {
|
|
} else {
|
|
|
|
+ advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.pdfReaderProAdvanced_dmg)
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
// AppStore 免费版本
|
|
// AppStore 免费版本
|
|
@@ -1183,7 +1192,8 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
|
|
cellView.selectBoxLeft.constant = 352.0
|
|
cellView.selectBoxLeft.constant = 352.0
|
|
cellView.selectBoxWidth.constant = 320.0
|
|
cellView.selectBoxWidth.constant = 320.0
|
|
} else if model.state == .dmg_Upgrades2 {
|
|
} else if model.state == .dmg_Upgrades2 {
|
|
-
|
|
|
|
|
|
+ cellView.selectBoxLeft.constant = 352.0
|
|
|
|
+ cellView.selectBoxWidth.constant = 320.0
|
|
} else if model.state == .lite_Base {
|
|
} else if model.state == .lite_Base {
|
|
cellView.selectBoxLeft.constant = 352.0 + 179.0
|
|
cellView.selectBoxLeft.constant = 352.0 + 179.0
|
|
cellView.selectBoxWidth.constant = 240.0
|
|
cellView.selectBoxWidth.constant = 240.0
|
|
@@ -1269,8 +1279,8 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
|
|
configureCellView(cellView, value: value4, label: cellView.value4Label, imageView: cellView.value4ImageView, platformsBox: cellView.platformsBox4)
|
|
configureCellView(cellView, value: value4, label: cellView.value4Label, imageView: cellView.value4ImageView, platformsBox: cellView.platformsBox4)
|
|
} else if model.state == .dmg_Upgrades1 {
|
|
} else if model.state == .dmg_Upgrades1 {
|
|
configureCellView(cellView, value: value3, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
|
|
configureCellView(cellView, value: value3, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
|
|
- } else if model.state == .dmg_Upgrades1 {
|
|
|
|
-
|
|
|
|
|
|
+ } else if model.state == .dmg_Upgrades2 {
|
|
|
|
+ configureCellView(cellView, value: value3, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
|
|
} else if model.state == .lite_Base {
|
|
} else if model.state == .lite_Base {
|
|
configureCellView(cellView, value: value1, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
|
|
configureCellView(cellView, value: value1, label: cellView.value1Label, imageView: cellView.value1ImageView, platformsBox: cellView.platformsBox1)
|
|
configureCellView(cellView, value: value3, label: cellView.value2Label, imageView: cellView.value2ImageView, platformsBox: cellView.platformsBox2)
|
|
configureCellView(cellView, value: value3, label: cellView.value2Label, imageView: cellView.value2ImageView, platformsBox: cellView.platformsBox2)
|
|
@@ -1326,38 +1336,56 @@ extension KMProductCompareWC: NSTableViewDelegate, NSTableViewDataSource {
|
|
}
|
|
}
|
|
|
|
|
|
private func checkOrNot(_ cellView: KMProductCompareTableCell) {
|
|
private func checkOrNot(_ cellView: KMProductCompareTableCell) {
|
|
|
|
+ cellView.selectBox1.isHidden = true
|
|
|
|
+ cellView.selectBox2.isHidden = true
|
|
|
|
+ cellView.selectBox3.isHidden = true
|
|
|
|
+ cellView.selectBox4.isHidden = true
|
|
|
|
+ cellView.cellView1.isHidden = true
|
|
|
|
+ cellView.cellView2.isHidden = true
|
|
|
|
+ cellView.cellView3.isHidden = true
|
|
|
|
+ cellView.cellView4.isHidden = true
|
|
if model.state == .dmg_Base {
|
|
if model.state == .dmg_Base {
|
|
cellView.selectBox3.isHidden = false
|
|
cellView.selectBox3.isHidden = false
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
|
|
+ cellView.cellView2.isHidden = false
|
|
|
|
+ cellView.cellView3.isHidden = false
|
|
|
|
+ cellView.cellView4.isHidden = false
|
|
cellView.viewWidth1.constant = 149.5
|
|
cellView.viewWidth1.constant = 149.5
|
|
cellView.viewWidth2.constant = 149.5
|
|
cellView.viewWidth2.constant = 149.5
|
|
cellView.viewWidth3.constant = 149.5
|
|
cellView.viewWidth3.constant = 149.5
|
|
cellView.viewWidth4.constant = 149.5
|
|
cellView.viewWidth4.constant = 149.5
|
|
} else if model.state == .dmg_Upgrades1 {
|
|
} else if model.state == .dmg_Upgrades1 {
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
cellView.viewWidth1.constant = 320.0
|
|
cellView.viewWidth1.constant = 320.0
|
|
- } else if model.state == .dmg_Upgrades1 {
|
|
|
|
|
|
+ } else if model.state == .dmg_Upgrades2 {
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
cellView.viewWidth1.constant = 320.0
|
|
cellView.viewWidth1.constant = 320.0
|
|
} else if model.state == .lite_Base {
|
|
} else if model.state == .lite_Base {
|
|
- cellView.cellView4.isHidden = true
|
|
|
|
cellView.selectBox2.isHidden = false
|
|
cellView.selectBox2.isHidden = false
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
|
|
+ cellView.cellView2.isHidden = false
|
|
|
|
+ cellView.cellView3.isHidden = false
|
|
cellView.viewWidth1.constant = 179.0
|
|
cellView.viewWidth1.constant = 179.0
|
|
cellView.viewWidth2.constant = 240.0
|
|
cellView.viewWidth2.constant = 240.0
|
|
cellView.viewWidth3.constant = 240.0
|
|
cellView.viewWidth3.constant = 240.0
|
|
} else if model.state == .lite_MacWindows {
|
|
} else if model.state == .lite_MacWindows {
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.viewWidth1.constant = 320.0
|
|
cellView.viewWidth1.constant = 320.0
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
} else if model.state == .pro_Base {
|
|
} else if model.state == .pro_Base {
|
|
- cellView.cellView3.isHidden = true
|
|
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.viewWidth1.constant = 299.0
|
|
cellView.viewWidth1.constant = 299.0
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
} else if model.state == .pro_Advanced {
|
|
} else if model.state == .pro_Advanced {
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.selectBox1.isHidden = false
|
|
cellView.viewWidth1.constant = 320.0
|
|
cellView.viewWidth1.constant = 320.0
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
} else {
|
|
} else {
|
|
// model.state == .trial
|
|
// model.state == .trial
|
|
- cellView.cellView3.isHidden = true
|
|
|
|
- cellView.cellView4.isHidden = true
|
|
|
|
|
|
+ cellView.cellView1.isHidden = false
|
|
|
|
+ cellView.cellView2.isHidden = false
|
|
cellView.selectBox2.isHidden = false
|
|
cellView.selectBox2.isHidden = false
|
|
cellView.viewWidth1.constant = 179.0
|
|
cellView.viewWidth1.constant = 179.0
|
|
cellView.viewWidth2.constant = 240.0
|
|
cellView.viewWidth2.constant = 240.0
|