|
@@ -159,41 +159,56 @@ class KMBatchOperateConvertViewController: KMBatchOperateBaseViewController,NSCo
|
|
|
self.tableMenu.isHidden = true
|
|
|
self.allContentMenu.isHidden = true
|
|
|
#if VERSION_FREE
|
|
|
- if .WordStandard == self.convertType {
|
|
|
- moreLabelString = NSLocalizedString("Export PDF to Word and other Microsoft Office formats", comment: "")
|
|
|
- } else if .WordAdvance == self.convertType ||
|
|
|
- .Excel == self.convertType ||
|
|
|
- .PowerPoint == self.convertType ||
|
|
|
- .CSV == self.convertType ||
|
|
|
- .RTF == self.convertType ||
|
|
|
- .GIF == self.convertType ||
|
|
|
- .TIFF == self.convertType ||
|
|
|
- .JPEG2000 == self.convertType ||
|
|
|
- .BMP == self.convertType ||
|
|
|
- .TGA == self.convertType {
|
|
|
- moreLabelString = NSLocalizedString("The first 10 pages for free. More precise one.", comment: "")
|
|
|
+ if !IAPProductsManager.default().isAvailableAllFunction() {
|
|
|
+ moreLabelString = String(format: "%@ %@", KMLocalizedString("The first 10 pages for free"), KMLocalizedString("Unlimited Convert"))
|
|
|
+ }else {
|
|
|
+ if !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
+ if .WordAdvance == self.convertType ||
|
|
|
+ .WordStandard == self.convertType ||
|
|
|
+ .Excel == self.convertType ||
|
|
|
+ .PowerPoint == self.convertType ||
|
|
|
+ .CSV == self.convertType ||
|
|
|
+ .RTF == self.convertType ||
|
|
|
+ .GIF == self.convertType ||
|
|
|
+ .TIFF == self.convertType ||
|
|
|
+ .JPEG2000 == self.convertType ||
|
|
|
+ .BMP == self.convertType ||
|
|
|
+ .TGA == self.convertType {
|
|
|
+ moreLabelString = String(format: "%@ %@", KMLocalizedString("The first 10 pages for free"), KMLocalizedString("Unlimited Convert"))
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
#else
|
|
|
// 付费版
|
|
|
- if .WordStandard == self.convertType {
|
|
|
- moreLabelString = NSLocalizedString("Export PDF to Word and other Microsoft Office formats", comment: "")
|
|
|
- } else if .WordAdvance == self.convertType ||
|
|
|
- .Excel == self.convertType ||
|
|
|
- .PowerPoint == self.convertType ||
|
|
|
- .CSV == self.convertType ||
|
|
|
- .RTF == self.convertType ||
|
|
|
- .GIF == self.convertType ||
|
|
|
- .TIFF == self.convertType ||
|
|
|
- .JPEG2000 == self.convertType ||
|
|
|
- .BMP == self.convertType ||
|
|
|
- .TGA == self.convertType {
|
|
|
- moreLabelString = NSLocalizedString("The first 10 pages for free. More precise one.", comment: "")
|
|
|
+ if !IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
+ if .WordAdvance == self.convertType ||
|
|
|
+ .WordStandard == self.convertType ||
|
|
|
+ .Excel == self.convertType ||
|
|
|
+ .PowerPoint == self.convertType ||
|
|
|
+ .CSV == self.convertType ||
|
|
|
+ .RTF == self.convertType ||
|
|
|
+ .GIF == self.convertType ||
|
|
|
+ .TIFF == self.convertType ||
|
|
|
+ .JPEG2000 == self.convertType ||
|
|
|
+ .BMP == self.convertType ||
|
|
|
+ .TGA == self.convertType {
|
|
|
+ moreLabelString = String(format: "%@ %@", KMLocalizedString("The first 10 pages for free"), KMLocalizedString("Unlimited Convert"))
|
|
|
+ }
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
var hasInfo = false
|
|
|
var isExcel = false
|
|
|
self.detailInfoLabel.stringValue = moreLabelString
|
|
|
+ if let range = moreLabelString.range(of: NSLocalizedString("Unlimited Convert", comment: "")) {
|
|
|
+ let newR: NSRange = moreLabelString.nsRange(from: range)!
|
|
|
+ let attributedStr = NSMutableAttributedString(string: moreLabelString)
|
|
|
+ attributedStr.addAttribute(.foregroundColor, value: NSColor.labelColor, range: NSRange(location: 0, length: newR.location - 1))
|
|
|
+ attributedStr.addAttribute(.foregroundColor, value: NSColor(red: 8/255, green: 124/255, blue: 1, alpha: 1), range: newR)
|
|
|
+ attributedStr.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: newR)
|
|
|
+ detailInfoLabel.attributedStringValue = attributedStr
|
|
|
+ }
|
|
|
+
|
|
|
if moreLabelString.count > 0 {
|
|
|
self.detailInfoView.isHidden = false
|
|
|
self.containerViewTopConstraint.constant = 16
|