|
@@ -1254,11 +1254,6 @@ extension KMMainViewController {
|
|
Task { @MainActor in
|
|
Task { @MainActor in
|
|
let idx = sender.tag
|
|
let idx = sender.tag
|
|
if idx == 10 {
|
|
if idx == 10 {
|
|
-// if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// KMProductCompareWC.shared.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
KMMemberInfo.shared.advancedFunctionUsage()
|
|
KMMemberInfo.shared.advancedFunctionUsage()
|
|
return
|
|
return
|
|
@@ -3042,18 +3037,6 @@ extension KMMainViewController {
|
|
|
|
|
|
//MARK: 转档 - OCR
|
|
//MARK: 转档 - OCR
|
|
func showOCRWindow() {
|
|
func showOCRWindow() {
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// let type = self.toolbarController.toolbarType ?? .None
|
|
|
|
-// if type == .Conversion {
|
|
|
|
-// winC.kEventName = "Reading_Convert_OCR_BuyNow"
|
|
|
|
-// } else {
|
|
|
|
-// winC.kEventName = "Reading_OCR_BuyNow"
|
|
|
|
-// }
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
let type = self.toolbarController.toolbarType ?? .None
|
|
let type = self.toolbarController.toolbarType ?? .None
|
|
@@ -3072,13 +3055,6 @@ extension KMMainViewController {
|
|
|
|
|
|
//MARK: 导出图片
|
|
//MARK: 导出图片
|
|
func extractImageAction(num: Int) {
|
|
func extractImageAction(num: Int) {
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// winC.kEventName = "Reading_ExtractImage_BuyNow"
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
winC.kEventName = "Reading_ExtractImage_BuyNow"
|
|
winC.kEventName = "Reading_ExtractImage_BuyNow"
|
|
@@ -3241,11 +3217,6 @@ extension KMMainViewController {
|
|
FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Tools", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Tools_Image"])
|
|
FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Tools", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Tools_Image"])
|
|
|
|
|
|
changeAnnotationMode(sender)
|
|
changeAnnotationMode(sender)
|
|
-// guard IAPProductsManager.default().isAvailableAllFunction() else {
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// KMProductCompareWC.shared.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
guard KMMemberInfo.shared.isMemberAllFunction else {
|
|
guard KMMemberInfo.shared.isMemberAllFunction else {
|
|
KMMemberInfo.shared.advancedFunctionUsage()
|
|
KMMemberInfo.shared.advancedFunctionUsage()
|
|
return
|
|
return
|
|
@@ -3257,9 +3228,7 @@ extension KMMainViewController {
|
|
openPanel.allowedFileTypes = KMImageAccessoryController.supportedImageTypes()
|
|
openPanel.allowedFileTypes = KMImageAccessoryController.supportedImageTypes()
|
|
openPanel.allowsMultipleSelection = false
|
|
openPanel.allowsMultipleSelection = false
|
|
openPanel.accessoryView = accessoryCtr.view
|
|
openPanel.accessoryView = accessoryCtr.view
|
|
-// if #available(macOS 10.11, *) {
|
|
|
|
- openPanel.canSelectHiddenExtension = true
|
|
|
|
-// }
|
|
|
|
|
|
+ openPanel.canSelectHiddenExtension = true
|
|
openPanel.beginSheetModal(for: NSApp.mainWindow!) { [self] (result) in
|
|
openPanel.beginSheetModal(for: NSApp.mainWindow!) { [self] (result) in
|
|
if result == .OK {
|
|
if result == .OK {
|
|
guard let url = openPanel.url else {
|
|
guard let url = openPanel.url else {
|
|
@@ -3313,13 +3282,6 @@ extension KMMainViewController {
|
|
@IBAction func tableAnnotation(_ sender: Any) {
|
|
@IBAction func tableAnnotation(_ sender: Any) {
|
|
FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Tools", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Tools_Table"])
|
|
FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Tools", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Tools_Table"])
|
|
changeAnnotationMode(sender)
|
|
changeAnnotationMode(sender)
|
|
-// guard IAPProductsManager.default().isAvailableAllFunction() else {
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// winC.kEventName = "Reading_Table_BuyNow"
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
guard KMMemberInfo.shared.isMemberAllFunction else {
|
|
guard KMMemberInfo.shared.isMemberAllFunction else {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
winC.kEventName = "Reading_Table_BuyNow"
|
|
winC.kEventName = "Reading_Table_BuyNow"
|
|
@@ -3819,13 +3781,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
}
|
|
}
|
|
|
|
|
|
func toolbarViewController(_ viewController: KMToolbarViewController, shareFlatten item: NSMenuItem) {
|
|
func toolbarViewController(_ viewController: KMToolbarViewController, shareFlatten item: NSMenuItem) {
|
|
-// if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// winC.kEventName = "Reading_Flatten_BuyNow"
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
winC.kEventName = "Reading_Flatten_BuyNow"
|
|
winC.kEventName = "Reading_Flatten_BuyNow"
|
|
@@ -3841,14 +3796,8 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
|
|
|
|
func toolbarViewController(_ viewController: KMToolbarViewController, scanOCRModel selectedTag: Int) {
|
|
func toolbarViewController(_ viewController: KMToolbarViewController, scanOCRModel selectedTag: Int) {
|
|
if(0 == selectedTag) {
|
|
if(0 == selectedTag) {
|
|
-// self.documentAIViewController?.enteredIncreaseAllPage()
|
|
|
|
-// self.documentAIViewController?.updateToolState(false)
|
|
|
|
} else {
|
|
} else {
|
|
-// self.documentAIViewController?.recognitionPageString("1", with: .english)
|
|
|
|
-// self.documentAIViewController?.recognitionPartModel(with: .english)
|
|
|
|
-// self.documentAIViewController?.updateToolState(true)
|
|
|
|
}
|
|
}
|
|
- // 0 : Scan 1:OCR Text
|
|
|
|
}
|
|
}
|
|
|
|
|
|
func mainToolDidClicked(_ toolController: KMToolbarController, _ beforeType: KMToolbarViewType, _ type: KMToolbarViewType, _ item: KMToolbarItemView , _ pages: [Int]) {
|
|
func mainToolDidClicked(_ toolController: KMToolbarController, _ beforeType: KMToolbarViewType, _ type: KMToolbarViewType, _ item: KMToolbarItemView , _ pages: [Int]) {
|
|
@@ -4004,26 +3953,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
}
|
|
}
|
|
|
|
|
|
if (type == .bates || type == .headerAndFooter) {
|
|
if (type == .bates || type == .headerAndFooter) {
|
|
-
|
|
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// if type == .headerAndFooter {
|
|
|
|
-// if index == 1 {
|
|
|
|
-// winC.kEventName = "Reading_AddHeaderFooter_BuyNow"
|
|
|
|
-// } else if index == 2 {
|
|
|
|
-// winC.kEventName = "Reading_RemoveHeaderFooter_BuyNow"
|
|
|
|
-// }
|
|
|
|
-// } else if type == .bates {
|
|
|
|
-// if index == 1 {
|
|
|
|
-// winC.kEventName = "Reading_AddBates_BuyNow"
|
|
|
|
-// } else if index == 2 {
|
|
|
|
-// winC.kEventName = "Reading_RemoveBates_BuyNow"
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
if type == .headerAndFooter {
|
|
if type == .headerAndFooter {
|
|
@@ -4194,11 +4123,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
self.openRightPane()
|
|
self.openRightPane()
|
|
}
|
|
}
|
|
} else if (type == .redact) { /// 标记密文
|
|
} else if (type == .redact) { /// 标记密文
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// KMProductCompareWC.shared.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
KMMemberInfo.shared.advancedFunctionUsage()
|
|
KMMemberInfo.shared.advancedFunctionUsage()
|
|
return
|
|
return
|
|
@@ -4410,13 +4334,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
}
|
|
}
|
|
} else if type == .comparison {
|
|
} else if type == .comparison {
|
|
FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Editor", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Editor_Compare"])
|
|
FMTrackEventManager.defaultManager.trackEvent(event: "SubTbr_Editor", withProperties: ["SubTbr_Btn": "Btn_SubTbr_Editor_Compare"])
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// winC.kEventName = "Reading_Compare_BuyNow"
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
winC.kEventName = "Reading_Compare_BuyNow"
|
|
winC.kEventName = "Reading_Compare_BuyNow"
|
|
@@ -4456,17 +4373,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
|
|
|
|
await NSWindow.currentWindow().beginSheet(controller.window!)
|
|
await NSWindow.currentWindow().beginSheet(controller.window!)
|
|
} else if type == .watermark {
|
|
} else if type == .watermark {
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// if index == 1 {
|
|
|
|
-// winC.kEventName = "Reading_AddWatermark_BuyNow"
|
|
|
|
-// } else if index == 2 {
|
|
|
|
-// winC.kEventName = "Reading_RemoveWatermark_BuyNow"
|
|
|
|
-// }
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
if index == 1 {
|
|
if index == 1 {
|
|
@@ -4577,17 +4483,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
} else if type == .background {
|
|
} else if type == .background {
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// if index == 1 {
|
|
|
|
-// winC.kEventName = "Reading_AddBackground_BuyNow"
|
|
|
|
-// } else if index == 2 {
|
|
|
|
-// winC.kEventName = "Reading_RemoveBackground_BuyNow"
|
|
|
|
-// }
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
if index == 1 {
|
|
if index == 1 {
|
|
@@ -4669,13 +4564,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
} else if type == .measure {
|
|
} else if type == .measure {
|
|
-// if !IAPProductsManager.default().isAvailableAllFunction(){
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// winC.kEventName = "Reading_Measure_BuyNow"
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
winC.kEventName = "Reading_Measure_BuyNow"
|
|
winC.kEventName = "Reading_Measure_BuyNow"
|
|
@@ -5002,11 +4890,9 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
|
|
|
|
func openNewWindowAlertWindow() {
|
|
func openNewWindowAlertWindow() {
|
|
var needShowChooseWindow = false
|
|
var needShowChooseWindow = false
|
|
-//#if VERSION_FREE
|
|
|
|
- if (!IAPProductsManager.default().isAvailableAllFunction()) {
|
|
|
|
|
|
+ if (!KMMemberInfo.shared.isMemberAllFunction) {
|
|
needShowChooseWindow = true
|
|
needShowChooseWindow = true
|
|
}
|
|
}
|
|
-//#endif
|
|
|
|
if needShowChooseWindow {
|
|
if needShowChooseWindow {
|
|
let preferenceNoteShow = UserDefaults.standard.bool(forKey: KMTabbingHintShowFlag)
|
|
let preferenceNoteShow = UserDefaults.standard.bool(forKey: KMTabbingHintShowFlag)
|
|
if preferenceNoteShow {
|
|
if preferenceNoteShow {
|
|
@@ -5147,13 +5033,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
|
|
|
|
winC.startModal(nil)
|
|
winC.startModal(nil)
|
|
} else if index == 12 {
|
|
} else if index == 12 {
|
|
-// if IAPProductsManager.default().isAvailableAllFunction() == false {
|
|
|
|
-// KMProductCompareWC.shared.orientation = false
|
|
|
|
-// let winC = KMProductCompareWC.shared
|
|
|
|
-// winC.kEventName = "Reading_ReplaceText_BuyNow"
|
|
|
|
-// winC.showWindow(nil)
|
|
|
|
-// return
|
|
|
|
-// }
|
|
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
if KMMemberInfo.shared.isMemberAllFunction == false {
|
|
let winC = KMProductCompareWC.shared
|
|
let winC = KMProductCompareWC.shared
|
|
winC.kEventName = "Reading_ReplaceText_BuyNow"
|
|
winC.kEventName = "Reading_ReplaceText_BuyNow"
|
|
@@ -5184,7 +5063,6 @@ extension KMMainViewController : KMToolbarViewControllerDelegate {
|
|
}
|
|
}
|
|
|
|
|
|
let point = toolbarItem.convert(toolbarItem.frame.origin, to: nil)
|
|
let point = toolbarItem.convert(toolbarItem.frame.origin, to: nil)
|
|
-// - (winC.window?.frame.size.width ?? 0)
|
|
|
|
let x = point.x + (toolbarItem.window?.frame.origin.x ?? 0) - 200
|
|
let x = point.x + (toolbarItem.window?.frame.origin.x ?? 0) - 200
|
|
let y = point.y + (toolbarItem.window?.frame.origin.y ?? 0) - 388
|
|
let y = point.y + (toolbarItem.window?.frame.origin.y ?? 0) - 388
|
|
let winFramePoint = NSPoint(x: x, y: y)
|
|
let winFramePoint = NSPoint(x: x, y: y)
|