Browse Source

[系统菜单] - 文件 - 从相机导入/从扫描仪导入,功能补充

liujiajie 10 months ago
parent
commit
4521e7e05c

+ 2 - 0
PDF Office/PDF Master/AppDelegate.swift

@@ -542,10 +542,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, iRateDelegate{
     }
     }
     @objc func deviceCameraMenuItemAciton(sender: NSMenuItem) {
     @objc func deviceCameraMenuItemAciton(sender: NSMenuItem) {
         KMPrint("deviceCameraMenuItemAciton")
         KMPrint("deviceCameraMenuItemAciton")
+        NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kDeviceCameraMenuItemNotification"), object: nil)
     }
     }
     
     
     @objc func deviceScannerMenuItemAciton(sender: NSMenuItem) {
     @objc func deviceScannerMenuItemAciton(sender: NSMenuItem) {
         KMPrint("deviceScannerMenuItemAciton")
         KMPrint("deviceScannerMenuItemAciton")
+        NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kDeviceScannerMenuItemNotification"), object: nil)
     }
     }
     
     
     // MARK: PDF Reader Pro Menu
     // MARK: PDF Reader Pro Menu

+ 2 - 0
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -175,6 +175,8 @@ import Cocoa
         NotificationCenter.default.addObserver(self, selector: #selector(deviceVerifyFinishNotification), name: Notification.Name.init(NSNotification.Name.deviceVerifyFinish.rawValue), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(deviceVerifyFinishNotification), name: Notification.Name.init(NSNotification.Name.deviceVerifyFinish.rawValue), object: nil)
 #endif
 #endif
         
         
+        NotificationCenter.default.addObserver(self, selector: #selector(importFromCamera), name: Notification.Name("kDeviceCameraMenuItemNotification"), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(importFromScanner), name: Notification.Name("kDeviceScannerMenuItemNotification"), object: nil)
         self.loadFunctionGuide()
         self.loadFunctionGuide()
         
         
         self.loadAIIconView()
         self.loadAIIconView()