Selaa lähdekoodia

【2025】【综合】加锁功能完善

niehaoyu 3 viikkoa sitten
vanhempi
commit
5ad75c0f29

+ 4 - 0
PDF Office/PDF Master/Class/GuideInfo/NewUserGuide/Window/KMNewUserGuideWindowController.swift

@@ -331,6 +331,10 @@ import Cocoa
             return false
         }
 #endif
+        
+#if VERSION_BETA
+      return false
+#endif
         // 不是新用户
         if KMMemberInfo.shared.isFreeAccount == false {
             return false

+ 4 - 0
PDF Office/PDF Master/Class/PDFTools/Extract/KMExtractWindowController.swift

@@ -293,6 +293,10 @@ class KMExtractWindowController: KMNBaseWindowController {
     }
     
     @objc func openButtonClicked(_ sender: NSView) {
+        if KMMemberInfo.shared.isLogin == false {
+            KMLoginWindowsController.shared.showWindow(nil)
+            return
+        }
         guard let pdfDocument = self.pdfDocument else {
             return
         }

+ 10 - 10
PDF Office/PDF Master/Class/PDFTools/Insert/KMPDFInsertPageWindow.swift

@@ -102,17 +102,17 @@ class KMPDFInsertPageWindow: NSWindowController {
     func initLocalization() -> Void {
         switch type {
         case .Insert:
-            titleLabel.stringValue = KMLocalizedString("插入", comment: "")
-            okLabel.stringValue = KMLocalizedString("插入", comment: "")
-            okBox.toolTip = KMLocalizedString("插入", comment: "")
-            cancelLabel.stringValue = KMLocalizedString("取消", comment: "")
-            cancelBox.toolTip = KMLocalizedString("取消", comment: "")
+            titleLabel.stringValue = KMLocalizedString("Insert", comment: "")
+            okLabel.stringValue = KMLocalizedString("Insert", comment: "")
+            okBox.toolTip = KMLocalizedString("Insert", comment: "")
+            cancelLabel.stringValue = KMLocalizedString("Cancel", comment: "")
+            cancelBox.toolTip = KMLocalizedString("Cancel", comment: "")
         case .some(.Extract):
-            titleLabel.stringValue = KMLocalizedString("提取", comment: "")
-            okLabel.stringValue = KMLocalizedString("提取", comment: "")
-            okBox.toolTip = KMLocalizedString("提取", comment: "")
-            cancelLabel.stringValue = KMLocalizedString("取消", comment: "")
-            cancelBox.toolTip = KMLocalizedString("取消", comment: "")
+            titleLabel.stringValue = KMLocalizedString("Extract", comment: "")
+            okLabel.stringValue = KMLocalizedString("Extract", comment: "")
+            okBox.toolTip = KMLocalizedString("Extract", comment: "")
+            cancelLabel.stringValue = KMLocalizedString("Cancel", comment: "")
+            cancelBox.toolTip = KMLocalizedString("Cancel", comment: "")
         case .none:
             break
         }

+ 4 - 0
PDF Office/PDF Master/Class/PDFTools/Insert/KMPDFInsertWindowController.swift

@@ -168,6 +168,10 @@ class KMPDFInsertWindowController: KMNBaseWindowController {
     }
     
     @IBAction func buttonItemClicked_Insert(_ sender: AnyObject?) {
+        if KMMemberInfo.shared.isLogin == false {
+            KMLoginWindowsController.shared.showWindow(nil)
+            return
+        }
         if let data = self._pdfDocument?.isLocked, data {
             self._pdfDocument?.unlock(withPassword: self._password ?? "")
         }

+ 0 - 4
PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.swift

@@ -520,10 +520,6 @@ extension KMNHomeViewController {
     }
     
     func fastTool_Batch() { // Batch
-        if KMMemberInfo.shared.isLogin == false {
-            KMLoginWindowsController.shared.showWindow(nil)
-            return
-        }
         let batchWindowController = KMBatchWindowController.manager
         batchWindowController.type = .convertPDF
         batchWindowController.inputData = []

+ 1 - 1
PDF Office/PDF Master/KMClass/KMHomeViewController/KMNHomeViewController.xib

@@ -63,7 +63,7 @@
                                         <constraint firstAttribute="width" constant="208" id="OgS-Bf-gLn"/>
                                     </constraints>
                                 </customView>
-                                <button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5bK-cQ-eiw">
+                                <button hidden="YES" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="5bK-cQ-eiw">
                                     <rect key="frame" x="30" y="30" width="111" height="32"/>
                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                                     <buttonCell key="cell" type="push" title="组件库Demo" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5gd-kg-WBc">

+ 5 - 0
PDF Office/PDF Master/KMClass/NewBatch/View/Setting/ImageToPDF/KMBatchImageToPDFView.swift

@@ -285,6 +285,11 @@ extension KMBatchImageToPDFView: ComponentSelectDelegate {
 //MARK: Action
 extension KMBatchImageToPDFView {
     @objc func saveButtonClicked(_ sender: ComponentButton) {
+        if KMMemberInfo.shared.isLogin == false {
+            KMLoginWindowsController.shared.showWindow(nil)
+            return
+        }
+        
         self.model.selectFilePath = self.selectFileInputButton.properties.text
         
         if !self.model.isNewPDF {