Kaynağa Gözat

Merge branch 'develop' of git.kdan.cc:Mac_PDF/PDF_Office into develop

tangchao 1 yıl önce
ebeveyn
işleme
add5c0491a

+ 6 - 6
PDF Office/PDF Office.xcodeproj/xcuserdata/lizhe.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2116,8 +2116,8 @@
             filePath = "PDF Office/Class/KMLightMember/Controller/Login&Register/KMLoginWindowController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "163"
-            endingLineNumber = "163"
+            startingLineNumber = "138"
+            endingLineNumber = "138"
             landmarkName = "setup()"
             landmarkType = "7">
             <Locations>
@@ -2164,8 +2164,8 @@
             filePath = "PDF Office/Class/KMLightMember/Controller/Login&amp;Register/KMLoginWindowController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "151"
-            endingLineNumber = "151"
+            startingLineNumber = "126"
+            endingLineNumber = "126"
             landmarkName = "setup()"
             landmarkType = "7">
          </BreakpointContent>
@@ -2196,8 +2196,8 @@
             filePath = "PDF Office/Class/KMLightMember/Controller/Login&amp;Register/KMLoginWindowController.swift"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "168"
-            endingLineNumber = "168"
+            startingLineNumber = "143"
+            endingLineNumber = "143"
             landmarkName = "setup()"
             landmarkType = "7">
          </BreakpointContent>

+ 12 - 4
PDF Office/PDF Office/Class/Home/ViewController/KMHomeViewController+Action.swift

@@ -206,7 +206,7 @@ extension KMHomeViewController {
     
     func createPDFButtonAction() {
         let popViewDataArr = [NSLocalizedString("New Blank Page", comment: ""),
-                              NSLocalizedString("New From Web Page", comment: ""),
+//                              NSLocalizedString("New From Web Page", comment: ""),
                               NSLocalizedString("Import From Scanner", comment: "")]
         createPopoverAction(popViewDataArr)
     }
@@ -967,8 +967,7 @@ extension KMHomeViewController {
         } else if count == NSLocalizedString("New From Web Page", comment: "") {
             importFromWebPage("")
         } else if count == NSLocalizedString("Import From Scanner", comment: "") {
-            print("从扫描仪导入")
-            
+            importFromScanner("")
         }
     }
     
@@ -1005,7 +1004,16 @@ extension KMHomeViewController {
     }
     
     @IBAction func importFromScanner(_ sender: Any) {
-        
+        let vc = KMDeviceBrowserWindowController.init(windowNibName: "KMDeviceBrowserWindowController")
+        vc.type = .scanner
+        vc.importCameraFileCallback = {(url: NSURL) -> () in
+            NSDocumentController.shared.openDocument(withContentsOf: url as URL, display: false) { document, documentWasAlreadyOpen, error in
+                if document is KMMainDocument {
+                    (document as! KMMainDocument).isNewCreated = true
+                }
+            }
+        }
+        vc.showWindow(NSApp.mainWindow)
     }
     
     @IBAction func menuItemClick_mergePDF(_ sender: Any) {

+ 27 - 31
PDF Office/PDF Office/Class/KMLightMember/Controller/Login&Register/KMLoginWindowController.swift

@@ -43,37 +43,12 @@ class KMLoginWindowController: NSWindowController {
     
     //MARK: 打开文件
     static func show(window: NSWindow, _ type: DataNavigationViewButtonActionType = .Batch, _ logType: KMRegisterLogType = .login) -> KMLoginWindowController? {
-        if KMLightMemberManager.manager.isLogOff() {
-            let alert = NSAlert()
-            alert.messageText = NSLocalizedString("Unable to log", comment: "")
-            alert.informativeText = NSLocalizedString("Your account is currently being logged out and cannot be logged in.If you  have questions, you can contact customer service", comment: "")
-            alert.addButton(withTitle: NSLocalizedString("Contact Customer", comment: ""))
-            alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
-            alert.beginSheetModal(for: window) { result in
-                if (result == .alertFirstButtonReturn) {
-//                    KMMailHelper.newEmail(withContacts: "support@pdfreaderpro.com", andSubjects: "")
-//                    NSWorkspace.shared.launchApplication("Mailto:support@pdfreaderpro.com")
-//                    NSWorkspace.shared.open(URL(string: "mailto:support@pdfreaderpro.com")!)
-                    
-//                    let service = NSSharingService(named: NSSharingService.Name.composeEmail)
-//                    service?.recipients = ["support@pdfreaderpro.com"]
-//                    service?.subject = "Test Mail"
-//                    service?.perform(withItems: ["Test Mail body"])
-                } else if result == .alertSecondButtonReturn {
-                    return
-    //                    NSApp.mainWindow!.endSheet(view.window!)
-    //                    view.window?.close()
-                }
-            }
-            return nil
-        } else {
-            let controller: KMLoginWindowController = KMLoginWindowController.init(windowNibName: "KMLoginWindowController")
-            controller.inputType = type
-            controller.logType = logType
-            window.beginSheet(controller.window!)
-        
-            return controller
-        }
+        let controller: KMLoginWindowController = KMLoginWindowController.init(windowNibName: "KMLoginWindowController")
+        controller.inputType = type
+        controller.logType = logType
+        window.beginSheet(controller.window!)
+    
+        return controller
     }
     
     override func mouseDown(with event: NSEvent) {
@@ -190,6 +165,27 @@ class KMLoginWindowController: NSWindowController {
                 if success {
                     NSApp.mainWindow!.endSheet(self.window!)
                     view.window!.close()
+                } else if result?.code == 318 {
+                    let alert = NSAlert()
+                    alert.messageText = NSLocalizedString("Unable to log", comment: "")
+                    alert.informativeText = NSLocalizedString("Your account is currently being logged out and cannot be logged in.If you  have questions, you can contact customer service", comment: "")
+                    alert.addButton(withTitle: NSLocalizedString("Contact Customer", comment: ""))
+                    alert.addButton(withTitle: NSLocalizedString("Cancel", comment: ""))
+                    alert.beginSheetModal(for: NSApp.mainWindow!) { result in
+                        if (result == .alertFirstButtonReturn) {
+        //                    KMMailHelper.newEmail(withContacts: "support@pdfreaderpro.com", andSubjects: "")
+        //                    NSWorkspace.shared.launchApplication("Mailto:support@pdfreaderpro.com")
+                            NSWorkspace.shared.open(URL(string: "mailto:support@pdfreaderpro.com")!)
+                            
+        //                    let service = NSSharingService(named: NSSharingService.Name.composeEmail)
+        //                    service?.recipients = ["support@pdfreaderpro.com"]
+        //                    service?.subject = "Test Mail"
+        //                    service?.perform(withItems: ["Test Mail body"])
+                        } else if result == .alertSecondButtonReturn {
+                            return
+                        }
+                    }
+                    return
                 } else {
                     self.loginInputPasswordView.showAlert(result: result)
                 }

BIN
PDF Office/PDF Office/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/ComPDFKit


+ 18 - 0
PDF Office/PDF Office/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/Headers/CPDFKitConfig.h

@@ -77,6 +77,14 @@
  * Set whether to allow to highlight link field in the CPDFView.
  */
 - (void)setEnableLinkFieldHighlight:(BOOL)enableLinkFieldHighlight;
+/**
+ * Get whether to allow to highlight color link field in the CPDFView.
+ */
+- (CPDFKitPlatformColor *)enableLinkFieldHighlightColor;
+/**
+ * Set whether to allow to highlight color link field in the CPDFView.
+ */
+- (void)setEnableLinkFieldHighlightColor:(CPDFKitPlatformColor *)enableLinkFieldHighlightColor;
 
 /**
  * Get whether to allow to highlight form field in the CPDFView.
@@ -87,6 +95,16 @@
  */
 - (void)setEnableFormFieldHighlight:(BOOL)enableFormFieldHighlight;
 
+/**
+ * Get whether to allow to highlight color form field in the CPDFView.
+ */
+- (CPDFKitPlatformColor *)enableFormFieldHighlightColor;
+
+/**
+ * Set whether to allow to highlight color form field in the CPDFView.
+ */
+- (void)setEnableFormFieldHighlightColor:(CPDFKitPlatformColor *)enableFormFieldHighlightColor;
+
 /**
  * Get whether to allow annotation rotation.
  */

+ 2 - 2
PDF Office/PDF Office/Class/PDFWindowController/PDFSDK/ComPDFKit.framework/Versions/A/_CodeSignature/CodeResources

@@ -485,11 +485,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			F8ag8xgbKbGS5d8hxdwobCWHRUc=
+			e+e0P4WN5gpp5G9mhmJsevu4PpI=
 			</data>
 			<key>hash2</key>
 			<data>
-			PewYycn9tJCkDSRJDH47HZjGyL3Nv3PVDb29hexAlb4=
+			WhgoX2k8F8AdXf7zAaIjN9ZCsm8tHJXmZoOSNo17nXA=
 			</data>
 		</dict>
 		<key>Headers/CPDFKitPlatform.h</key>