|
@@ -293,6 +293,10 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func cutAction() {
|
|
override func cutAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (self.thumbnailView.selectionIndexPaths.count == (self.listView?.document.pageCount)!) {
|
|
if (self.thumbnailView.selectionIndexPaths.count == (self.listView?.document.pageCount)!) {
|
|
let _ = CustomAlertView.alertView(message: NSLocalizedString("Unable to delete all pages", comment: ""), fromView: self.thumbnailView, withStyle: .blue)
|
|
let _ = CustomAlertView.alertView(message: NSLocalizedString("Unable to delete all pages", comment: ""), fromView: self.thumbnailView, withStyle: .blue)
|
|
return
|
|
return
|
|
@@ -307,6 +311,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func deleteAction() {
|
|
override func deleteAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
self.trackEvent(type: .delete)
|
|
self.trackEvent(type: .delete)
|
|
|
|
|
|
super.deleteAction()
|
|
super.deleteAction()
|
|
@@ -330,6 +339,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func leftRotateAction() {
|
|
override func leftRotateAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
self.trackEvent(type: .leftRotate)
|
|
self.trackEvent(type: .leftRotate)
|
|
|
|
|
|
super.leftRotateAction()
|
|
super.leftRotateAction()
|
|
@@ -346,6 +360,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func rightRotateAction() {
|
|
override func rightRotateAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
self.trackEvent(type: .rightRotate)
|
|
self.trackEvent(type: .rightRotate)
|
|
|
|
|
|
super.rightRotateAction()
|
|
super.rightRotateAction()
|
|
@@ -372,6 +391,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func pasteAction() {
|
|
override func pasteAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
if (self.canPaste()) {
|
|
if (self.canPaste()) {
|
|
super.pasteAction()
|
|
super.pasteAction()
|
|
|
|
|
|
@@ -380,6 +404,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func extractAction() {
|
|
override func extractAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
self.trackEvent(type: .extract)
|
|
self.trackEvent(type: .extract)
|
|
|
|
|
|
super.extractAction()
|
|
super.extractAction()
|
|
@@ -390,6 +419,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func replaceAction() {
|
|
override func replaceAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
self.trackEvent(type: .replace)
|
|
self.trackEvent(type: .replace)
|
|
|
|
|
|
super.replaceAction()
|
|
super.replaceAction()
|
|
@@ -444,6 +478,10 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
// self._splitMethod(windowC: splitWindowC, model: model)
|
|
// self._splitMethod(windowC: splitWindowC, model: model)
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
|
|
let windowC = SplitWindowController(document: self.pdfDocument!)
|
|
let windowC = SplitWindowController(document: self.pdfDocument!)
|
|
self.km_beginSheet(windowC: windowC)
|
|
self.km_beginSheet(windowC: windowC)
|
|
@@ -463,7 +501,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
// #endif
|
|
// #endif
|
|
// return;
|
|
// return;
|
|
// }
|
|
// }
|
|
-
|
|
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
let pdf = self.thumbnailView.document
|
|
let pdf = self.thumbnailView.document
|
|
let pages = self.thumbnailView.selectionIndexPaths
|
|
let pages = self.thumbnailView.selectionIndexPaths
|
|
if (pages.isEmpty == false) {
|
|
if (pages.isEmpty == false) {
|
|
@@ -534,6 +576,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
override func reverseAction() {
|
|
override func reverseAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
self.trackEvent(type: .reverse)
|
|
self.trackEvent(type: .reverse)
|
|
|
|
|
|
// Task { @MainActor in
|
|
// Task { @MainActor in
|
|
@@ -808,6 +855,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
// MARK: menu 菜单事件
|
|
// MARK: menu 菜单事件
|
|
|
|
|
|
@objc func item_insertCustomPage(sender: NSMenuItem?) {
|
|
@objc func item_insertCustomPage(sender: NSMenuItem?) {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
let windowC = KMPDFEditInsertBlankPageWindow(document: self.pdfDocument!)
|
|
let windowC = KMPDFEditInsertBlankPageWindow(document: self.pdfDocument!)
|
|
windowC.callback = { [weak self] pdfDoc, _, pages, insertI in
|
|
windowC.callback = { [weak self] pdfDoc, _, pages, insertI in
|
|
if let _pages = pages {
|
|
if let _pages = pages {
|
|
@@ -917,6 +969,11 @@ class KMPDFEditViewController: KMPDFThumbViewBaseController {
|
|
}
|
|
}
|
|
|
|
|
|
func extractSelectPageItemAction() {
|
|
func extractSelectPageItemAction() {
|
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
+ KMPurchaseCompareWindowController.sharedInstance().showWindow(nil)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
let indexs = self.thumbnailView.selectionIndexPaths
|
|
let indexs = self.thumbnailView.selectionIndexPaths
|
|
if indexs.isEmpty {
|
|
if indexs.isEmpty {
|
|
CustomAlertView.alertView(message: KMLocalizedString("No pages selected. Please select one or more pages first to organize.",nil), fromView: self.thumbnailView, withStyle: .blue)
|
|
CustomAlertView.alertView(message: KMLocalizedString("No pages selected. Please select one or more pages first to organize.",nil), fromView: self.thumbnailView, withStyle: .blue)
|