Pārlūkot izejas kodu

【2025】【压缩】整体逻辑串接

lizhe 3 mēneši atpakaļ
vecāks
revīzija
be858de231

+ 32 - 21
PDF Office/PDF Master/Class/PDFTools/Compress/Controller/KMCompressSettingViewController.swift

@@ -10,6 +10,7 @@ import KMComponentLibrary
 
 typealias KMCompressSettingViewControllerCancelAction = (_ controller: KMCompressSettingViewController ) -> Void
 typealias KMCompressSettingViewControllerDoneAction = (_ controller: KMCompressSettingViewController ) -> Void
+typealias KMCompressSettingViewControllerModelChangeAction = (_ controller: KMCompressSettingViewController, _ model: KMCompressSettingModel) -> Void
 
 class KMCompressSettingViewController: KMBaseViewController {
     @IBOutlet weak var doneButton: ComponentButton!
@@ -21,6 +22,7 @@ class KMCompressSettingViewController: KMBaseViewController {
     
     var cancelAction: KMCompressSettingViewControllerCancelAction?
     var doneAction: KMCompressSettingViewControllerDoneAction?
+    var modelChangeAction: KMCompressSettingViewControllerModelChangeAction?
     
     var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard) {
         didSet {
@@ -40,16 +42,28 @@ class KMCompressSettingViewController: KMBaseViewController {
 //            
 //            window.contentMinSize = CGSizeMake(624, 513)
 //            window.contentMaxSize = CGSizeMake(624, 513)
-//        }
-        
-//        self.showAlert("Unembed any font may result in incomplete display of text")
-//        
-//        // 自动移除视图
-//        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
-//            self.showAlert("Less than 7 items selected; compression quality may be affected")
 //        }
         
         self.updateUI()
+        
+        self.settingView.valueChangeAction = { [unowned self] view, tModel in
+            if tModel.fontUnembed == false {
+                if KMCompressSettingManager.shared.fetchFontCount() == 1 {
+                    self.showAlert("Unembed any font may result in incomplete display of text")
+                }
+            }
+            
+            let count = tModel.objectOptions.numberOfSetOptions() + tModel.userDataOptions.numberOfSetOptions() + tModel.otherDataOptions.numberOfSetOptions()
+            if count < 7 {
+                if KMCompressSettingManager.shared.fetchLimitAlert() == 1 {
+                    self.showAlert("Less than 7 items selected; compression quality may be affected")
+                }
+            }
+            
+            guard let callBack = modelChangeAction else { return }
+            
+            callBack(self, tModel)
+        }
     }
     
     func updateUI() {
@@ -71,23 +85,20 @@ class KMCompressSettingViewController: KMBaseViewController {
     }
 
     func showAlert(_ string: String) {
-        // 创建 alertView
-        let alertView = KMBatchOperateCompressSettingAlertView()
-        alertView.titleString = string
-        alertView.translatesAutoresizingMaskIntoConstraints = false
+        let centerYOffset = CGRectGetHeight(self.view.frame) / 2 + CGFloat((46 + 12) * (toastViews.count - 1)) // 每个 Toast 间隔 30px
+        
+        let alertView = ComponentMessage()
+        alertView.properties = ComponentMessageProperty(messageType: .warning, title: KMLocalizedString(string))
+        alertView.frame = CGRectMake((CGRectGetWidth(self.view.frame) - alertView.properties.propertyInfo.viewWidth)/2,
+                                     CGRectGetHeight(self.view.frame) - alertView.properties.propertyInfo.viewHeight - centerYOffset,
+                                     alertView.properties.propertyInfo.viewWidth,
+                                     alertView.properties.propertyInfo.viewHeight)
+        alertView.reloadData()
         self.view.addSubview(alertView)
-
+        
         // 添加到管理数组
         toastViews.append(alertView)
-
-        // 设置约束
-        let centerYOffset = CGFloat((46 + 12) * (toastViews.count - 1) + 68) // 每个 Toast 间隔 30px
-        NSLayoutConstraint.activate([
-            alertView.widthAnchor.constraint(lessThanOrEqualTo: self.view.widthAnchor, multiplier: 0.8),
-            alertView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
-            alertView.centerYAnchor.constraint(equalTo: self.view.topAnchor, constant: centerYOffset),
-        ])
-
+        
         // 自动移除视图
         DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
             self.removeAlert(alertView)

+ 6 - 6
PDF Office/PDF Master/Class/PDFTools/Compress/Controller/KMCompressSettingViewController.xib

@@ -18,14 +18,14 @@
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView id="Hz6-mo-xeY">
-            <rect key="frame" x="0.0" y="0.0" width="624" height="513"/>
+            <rect key="frame" x="0.0" y="0.0" width="584" height="640"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
             <subviews>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="fbx-YC-qHs" customClass="KMCompressSettingTableView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-                    <rect key="frame" x="8" y="64" width="608" height="405"/>
+                    <rect key="frame" x="8" y="64" width="568" height="532"/>
                 </customView>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="piB-Gy-QCa">
-                    <rect key="frame" x="0.0" y="469" width="624" height="44"/>
+                    <rect key="frame" x="0.0" y="596" width="584" height="44"/>
                     <subviews>
                         <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="G5g-e3-dep">
                             <rect key="frame" x="22" y="14" width="200" height="17"/>
@@ -43,17 +43,17 @@
                     </constraints>
                 </customView>
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="ahr-sZ-Pyx">
-                    <rect key="frame" x="0.0" y="0.0" width="624" height="64"/>
+                    <rect key="frame" x="0.0" y="0.0" width="584" height="64"/>
                     <subviews>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="SD8-YF-epz" customClass="ComponentButton" customModule="KMComponentLibrary">
-                            <rect key="frame" x="431" y="16" width="70" height="32"/>
+                            <rect key="frame" x="391" y="16" width="70" height="32"/>
                             <constraints>
                                 <constraint firstAttribute="width" constant="70" id="hWJ-Vj-ae0"/>
                                 <constraint firstAttribute="height" constant="32" id="hjK-e9-5cz"/>
                             </constraints>
                         </customView>
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="4Tt-0L-UrO" customClass="ComponentButton" customModule="KMComponentLibrary">
-                            <rect key="frame" x="509" y="16" width="91" height="32"/>
+                            <rect key="frame" x="469" y="16" width="91" height="32"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="32" id="MPZ-IE-H3I"/>
                                 <constraint firstAttribute="width" constant="91" id="Z6H-Ty-33k"/>

+ 7 - 2
PDF Office/PDF Master/Class/PDFTools/Compress/View/KMCompressContentView.swift

@@ -147,8 +147,8 @@ extension KMCompressContentView {
     @IBAction func settingButtonAction(_ sender: Any) {
         compressSettingViewController = KMCompressSettingViewController(nibName: "KMCompressSettingViewController", bundle: nil)
         let window = NSWindow(contentViewController: compressSettingViewController!)
-        window.minSize = CGSizeMake(624, 513)
-        window.maxSize = CGSizeMake(624, 513)
+        window.minSize = CGSizeMake(584, 640)
+        window.maxSize = CGSizeMake(584, 640)
         window.styleMask.remove(.resizable)
         
         let currentWindow = NSWindow.currentWindow()
@@ -163,5 +163,10 @@ extension KMCompressContentView {
         compressSettingViewController?.doneAction = { resultControler in
             currentWindow.endSheet(window)
         }
+        
+        compressSettingViewController?.modelChangeAction = { [unowned self] resultControler, tModel in
+            self.updateType(type: tModel.modelsType)
+        }
+        
     }
 }

+ 34 - 0
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/Manager/KMCompressSettingManager.swift

@@ -0,0 +1,34 @@
+//
+//  KMCompressSettingManager.swift
+//  PDF Reader Pro
+//
+//  Created by lizhe on 2024/12/16.
+//
+
+import Cocoa
+
+class KMCompressSettingManager {
+    // 静态常量,保证只初始化一次
+    static let shared = KMCompressSettingManager()
+    
+    private var fontCount: Int
+    private var limitCount: Int
+    // 私有初始化方法,防止外部创建实例
+    private init() {
+        // 初始化代码
+        fontCount = 0
+        limitCount = 0
+        print("KMCompressSettingManager 初始化完成")
+    }
+    
+    func fetchFontCount() -> Int {
+        fontCount = fontCount + 1
+        return fontCount
+    }
+    
+    func fetchLimitAlert() -> Int {
+        limitCount = limitCount + 1
+        return limitCount
+    }
+    
+}

+ 6 - 0
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/Model/KMCompressSettingModel.swift

@@ -48,6 +48,12 @@ struct KMCompressOtherDataOptions: OptionSet {
     static let pageContent = KMCompressOtherDataOptions(rawValue: 1 << 3)
 }
 
+extension OptionSet where RawValue: FixedWidthInteger {
+    func numberOfSetOptions() -> Int {
+        return rawValue.nonzeroBitCount // 使用 Swift 提供的内建方法
+    }
+}
+
 class KMCompressSettingModel: NSObject {
     // MARK: - 属性
     var modelsType: KMCompressModelsType = .standard

+ 0 - 25
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/View/AlertView/KMBatchOperateCompressSettingAlertView.swift

@@ -1,25 +0,0 @@
-//
-//  KMBatchOperateCompressSettingAlertView.swift
-//  PDF Reader Pro
-//
-//  Created by lizhe on 2024/11/21.
-//
-
-import Cocoa
-
-class KMBatchOperateCompressSettingAlertView: BaseXibView {
-    @IBOutlet weak var titleLabel: NSTextField!
-    
-    var titleString: String = "" {
-        didSet {
-            self.titleLabel.stringValue = titleString
-        }
-    }
-    
-    
-    override func draw(_ dirtyRect: NSRect) {
-        super.draw(dirtyRect)
-
-        // Drawing code here.
-    }
-}

+ 0 - 53
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/View/AlertView/KMBatchOperateCompressSettingAlertView.xib

@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22505" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
-    <dependencies>
-        <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22505"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMBatchOperateCompressSettingAlertView" customModule="PDF_Reader_Pro" customModuleProvider="target">
-            <connections>
-                <outlet property="titleLabel" destination="NIX-I8-6kU" id="U2D-G9-LsJ"/>
-            </connections>
-        </customObject>
-        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
-        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
-        <customView id="c22-O7-iKe">
-            <rect key="frame" x="0.0" y="0.0" width="577" height="47"/>
-            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
-            <subviews>
-                <box boxType="custom" borderWidth="0.0" cornerRadius="6" translatesAutoresizingMaskIntoConstraints="NO" id="rAK-Va-WfF">
-                    <rect key="frame" x="0.0" y="0.0" width="577" height="47"/>
-                    <view key="contentView" id="4WU-gf-YMU">
-                        <rect key="frame" x="0.0" y="0.0" width="577" height="47"/>
-                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                    </view>
-                    <color key="fillColor" white="0.0" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                </box>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NIX-I8-6kU">
-                    <rect key="frame" x="22" y="16" width="533" height="15"/>
-                    <textFieldCell key="cell" lineBreakMode="clipping" title="Unembed any font may result in incomplete display of text" id="gwW-Ti-4Rd">
-                        <font key="font" metaFont="cellTitle"/>
-                        <color key="textColor" red="0.9882352941176471" green="0.99215686274509807" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
-                    </textFieldCell>
-                    <connections>
-                        <action selector="titleLabel:" target="-1" id="yHJ-Vc-GJh"/>
-                    </connections>
-                </textField>
-            </subviews>
-            <constraints>
-                <constraint firstItem="rAK-Va-WfF" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" id="Aho-nu-bWU"/>
-                <constraint firstAttribute="bottom" secondItem="rAK-Va-WfF" secondAttribute="bottom" id="NiG-nw-2lZ"/>
-                <constraint firstItem="rAK-Va-WfF" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" id="U0N-YU-IKQ"/>
-                <constraint firstAttribute="trailing" secondItem="NIX-I8-6kU" secondAttribute="trailing" constant="24" id="VYa-RX-yWU"/>
-                <constraint firstItem="NIX-I8-6kU" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="16" id="bF2-Wh-Y62"/>
-                <constraint firstAttribute="bottom" secondItem="NIX-I8-6kU" secondAttribute="bottom" constant="16" id="jDJ-cg-HOn"/>
-                <constraint firstItem="NIX-I8-6kU" firstAttribute="leading" secondItem="c22-O7-iKe" secondAttribute="leading" constant="24" id="oWm-hR-Suv"/>
-                <constraint firstAttribute="trailing" secondItem="rAK-Va-WfF" secondAttribute="trailing" id="xrp-hr-BeK"/>
-            </constraints>
-            <point key="canvasLocation" x="187.5" y="206"/>
-        </customView>
-    </objects>
-</document>

+ 4 - 0
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/View/Tableview/Cell/KMCompressDiscardPanelTableCellView.swift

@@ -156,6 +156,10 @@ class KMCompressDiscardPanelTableCellView: KMBaseCompressTableCellView, NibLoada
         }
         
         self.reloadData()
+        
+        guard let callBack = actionBlock else { return }
+        
+        callBack(self, data)
     }
     
     func toggleOption<T: OptionSet>(_ option: T, in set: inout T) {

+ 3 - 6
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/View/Tableview/Cell/KMCompressFontsPanelTableCellView.swift

@@ -8,8 +8,6 @@
 import Cocoa
 import KMComponentLibrary
 
-typealias KMCompressFontsPanelTableCellViewSelectBlcok = (_ view: KMCompressFontsPanelTableCellView, _ isSelect: Bool) -> Void
-
 class KMCompressFontsPanelTableCellView: KMBaseCompressTableCellView, NibLoadable {
 
     @IBOutlet weak var titleLabel: NSTextField!
@@ -17,8 +15,6 @@ class KMCompressFontsPanelTableCellView: KMBaseCompressTableCellView, NibLoadabl
     
     var isSelect: Bool = false
     
-    var selectAction: KMCompressFontsPanelTableCellViewSelectBlcok?
-    
     override var model: KMCompressSettingCellModel? {
         didSet {
             self.updateUI()
@@ -65,8 +61,9 @@ class KMCompressFontsPanelTableCellView: KMBaseCompressTableCellView, NibLoadabl
         
         isSelect = !isSelect
         
-        guard let callBack = selectAction else { return }
+        data?.fontUnembed = isSelect
+        guard let callBack = actionBlock else { return }
         
-        callBack(self, isSelect)
+        callBack(self, data!)
     }
 }

+ 7 - 7
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/View/Tableview/Cell/KMCompressImagesPanelTableCellView.xib

@@ -34,14 +34,14 @@
                                                     </textFieldCell>
                                                 </textField>
                                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Mel-Y9-GUU" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
-                                                    <rect key="frame" x="93" y="0.0" width="166" height="32"/>
+                                                    <rect key="frame" x="93" y="0.0" width="141" height="32"/>
                                                     <constraints>
-                                                        <constraint firstAttribute="width" constant="166" id="72q-9H-b1c"/>
+                                                        <constraint firstAttribute="width" constant="141" id="72q-9H-b1c"/>
                                                         <constraint firstAttribute="height" constant="32" id="zJU-TA-4ec"/>
                                                     </constraints>
                                                 </customView>
                                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="taM-CD-cQz">
-                                                    <rect key="frame" x="261" y="8" width="24" height="16"/>
+                                                    <rect key="frame" x="236" y="8" width="24" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="PPI" id="DYQ-so-WNA">
                                                         <font key="font" metaFont="system"/>
                                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -49,7 +49,7 @@
                                                     </textFieldCell>
                                                 </textField>
                                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="nPY-8Y-8dL">
-                                                    <rect key="frame" x="297" y="8" width="137" height="16"/>
+                                                    <rect key="frame" x="272" y="8" width="137" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="PPI For Image Above:" id="YvU-Bd-LdU">
                                                         <font key="font" usesAppearanceFont="YES"/>
                                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -57,7 +57,7 @@
                                                     </textFieldCell>
                                                 </textField>
                                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vte-w4-cRw">
-                                                    <rect key="frame" x="543" y="8" width="24" height="16"/>
+                                                    <rect key="frame" x="518" y="8" width="24" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="PPI" id="BP0-6O-ISf">
                                                         <font key="font" metaFont="system"/>
                                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@@ -65,7 +65,7 @@
                                                     </textFieldCell>
                                                 </textField>
                                                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="Do5-Pt-nCk" customClass="ComponentInputNumber" customModule="KMComponentLibrary">
-                                                    <rect key="frame" x="440" y="0.0" width="101" height="32"/>
+                                                    <rect key="frame" x="415" y="0.0" width="101" height="32"/>
                                                     <constraints>
                                                         <constraint firstAttribute="width" constant="101" id="agV-zj-32A"/>
                                                         <constraint firstAttribute="height" constant="32" id="jps-41-egA"/>
@@ -101,7 +101,7 @@
                                                     </textFieldCell>
                                                 </textField>
                                                 <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s1O-eM-yjI">
-                                                    <rect key="frame" x="438" y="0.0" width="37" height="16"/>
+                                                    <rect key="frame" x="413" y="0.0" width="37" height="16"/>
                                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="p3L-Ps-J7G">
                                                         <font key="font" usesAppearanceFont="YES"/>
                                                         <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>

+ 15 - 3
PDF Office/PDF Master/Class/PDFTools/Compress/View/SettingView/View/Tableview/KMCompressSettingTableView.swift

@@ -7,10 +7,13 @@
 
 import Cocoa
 
+typealias KMCompressSettingTableViewValueChangeBlock = (_ view: KMCompressSettingTableView, _ model: KMCompressSettingModel) -> Void
 class KMCompressSettingTableView: BaseXibView {
     @IBOutlet weak var tableView: NSTableView!
     @IBOutlet weak var scrollView: NSScrollView!
     
+    var valueChangeAction: KMCompressSettingTableViewValueChangeBlock?
+    
     var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard) {
         didSet {
             self.reloadData()
@@ -132,15 +135,24 @@ extension KMCompressSettingTableView: NSTableViewDelegate, NSTableViewDataSource
             
             cell?.model = model
             cell?.data = self.model
-            cell?.actionBlock = { view, tModel in
+            cell?.actionBlock = { [unowned self] view, tModel in
                 switch model.type {
                 case .modes:
                     self.model = tModel
-                    self.reloadData()
                 default:
-                    
+                    if self.model.modelsType != .custom {
+                        self.model.modelsType = .custom
+                        self.model.updateCustomSettings()
+                        self.reloadData()
+                    } else {
+                        self.model.updateCustomSettings()
+                    }
                     break
                 }
+                
+                guard let callBack = valueChangeAction else { return }
+                
+                callBack(self, self.model)
             }
         }
         return cell

+ 16 - 24
PDF Office/PDF Reader Pro.xcodeproj/project.pbxproj

@@ -1413,12 +1413,6 @@
 		AD07BCD62D02CBB20075054B /* KMBaseCompressTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCAC2D02CBB20075054B /* KMBaseCompressTableCellView.swift */; };
 		AD07BCD72D02CBB20075054B /* KMBaseCompressTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCAC2D02CBB20075054B /* KMBaseCompressTableCellView.swift */; };
 		AD07BCD82D02CBB20075054B /* KMBaseCompressTableCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCAC2D02CBB20075054B /* KMBaseCompressTableCellView.swift */; };
-		AD07BCD92D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD07BCAE2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib */; };
-		AD07BCDA2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD07BCAE2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib */; };
-		AD07BCDB2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.xib in Resources */ = {isa = PBXBuildFile; fileRef = AD07BCAE2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib */; };
-		AD07BCDC2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCAF2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.swift */; };
-		AD07BCDD2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCAF2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.swift */; };
-		AD07BCDE2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCAF2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.swift */; };
 		AD07BCDF2D02CBB30075054B /* KMCompressContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCB02D02CBB20075054B /* KMCompressContentView.swift */; };
 		AD07BCE02D02CBB30075054B /* KMCompressContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCB02D02CBB20075054B /* KMCompressContentView.swift */; };
 		AD07BCE12D02CBB30075054B /* KMCompressContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD07BCB02D02CBB20075054B /* KMCompressContentView.swift */; };
@@ -2039,6 +2033,9 @@
 		ADD1B70A29471FA500C3FFF7 /* KMPrintChoosePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD1B70929471FA500C3FFF7 /* KMPrintChoosePresenter.swift */; };
 		ADD1B70B29471FA500C3FFF7 /* KMPrintChoosePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD1B70929471FA500C3FFF7 /* KMPrintChoosePresenter.swift */; };
 		ADD1B70C29471FA500C3FFF7 /* KMPrintChoosePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD1B70929471FA500C3FFF7 /* KMPrintChoosePresenter.swift */; };
+		ADD3EBC92D102DFF005B711B /* KMCompressSettingManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD3EBC82D102DFF005B711B /* KMCompressSettingManager.swift */; };
+		ADD3EBCA2D102DFF005B711B /* KMCompressSettingManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD3EBC82D102DFF005B711B /* KMCompressSettingManager.swift */; };
+		ADD3EBCB2D102DFF005B711B /* KMCompressSettingManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADD3EBC82D102DFF005B711B /* KMCompressSettingManager.swift */; };
 		ADD56F572BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */; };
 		ADD56F582BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */; };
 		ADD56F592BB3F48300E87ED9 /* KMFreeTextStylesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */; };
@@ -5756,8 +5753,6 @@
 		AD07BCA92D02CBB20075054B /* KMCompressFontsPanelTableCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMCompressFontsPanelTableCellView.swift; sourceTree = "<group>"; };
 		AD07BCAA2D02CBB20075054B /* KMCompressDiscardPanelTableCellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMCompressDiscardPanelTableCellView.xib; sourceTree = "<group>"; };
 		AD07BCAC2D02CBB20075054B /* KMBaseCompressTableCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMBaseCompressTableCellView.swift; sourceTree = "<group>"; };
-		AD07BCAE2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMBatchOperateCompressSettingAlertView.xib; sourceTree = "<group>"; };
-		AD07BCAF2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMBatchOperateCompressSettingAlertView.swift; sourceTree = "<group>"; };
 		AD07BCB02D02CBB20075054B /* KMCompressContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KMCompressContentView.swift; sourceTree = "<group>"; };
 		AD07BCB12D02CBB20075054B /* KMCompressContentView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMCompressContentView.xib; sourceTree = "<group>"; };
 		AD07BCEF2D02D6A60075054B /* KMBatchOperateRemoveHeaderFooterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMBatchOperateRemoveHeaderFooterViewController.xib; sourceTree = "<group>"; };
@@ -5989,6 +5984,7 @@
 		ADD1B7012946C8AD00C3FFF7 /* KMBaseTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBaseTextField.swift; sourceTree = "<group>"; };
 		ADD1B7052946CBB600C3FFF7 /* KMBaseTextFormatter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMBaseTextFormatter.swift; sourceTree = "<group>"; };
 		ADD1B70929471FA500C3FFF7 /* KMPrintChoosePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMPrintChoosePresenter.swift; sourceTree = "<group>"; };
+		ADD3EBC82D102DFF005B711B /* KMCompressSettingManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KMCompressSettingManager.swift; sourceTree = "<group>"; };
 		ADD56F542BB3F48200E87ED9 /* KMFreeTextStylesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KMFreeTextStylesViewController.m; sourceTree = "<group>"; };
 		ADD56F552BB3F48200E87ED9 /* KMFreeTextStylesViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KMFreeTextStylesViewController.xib; sourceTree = "<group>"; };
 		ADD56F562BB3F48200E87ED9 /* KMFreeTextStylesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMFreeTextStylesViewController.h; sourceTree = "<group>"; };
@@ -8830,6 +8826,7 @@
 		AD07BC9A2D02CBB20075054B /* SettingView */ = {
 			isa = PBXGroup;
 			children = (
+				ADD3EBC62D102DD4005B711B /* Manager */,
 				AD07BC9B2D02CBB20075054B /* Model */,
 				AD07BC9E2D02CBB20075054B /* View */,
 			);
@@ -8849,7 +8846,6 @@
 			isa = PBXGroup;
 			children = (
 				AD07BC9F2D02CBB20075054B /* Tableview */,
-				AD07BCAD2D02CBB20075054B /* AlertView */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -8888,15 +8884,6 @@
 			path = Base;
 			sourceTree = "<group>";
 		};
-		AD07BCAD2D02CBB20075054B /* AlertView */ = {
-			isa = PBXGroup;
-			children = (
-				AD07BCAE2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib */,
-				AD07BCAF2D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.swift */,
-			);
-			path = AlertView;
-			sourceTree = "<group>";
-		};
 		AD0E8AAD2A31B6F300DBFD3C /* Appstore */ = {
 			isa = PBXGroup;
 			children = (
@@ -9838,6 +9825,14 @@
 			path = TextField;
 			sourceTree = "<group>";
 		};
+		ADD3EBC62D102DD4005B711B /* Manager */ = {
+			isa = PBXGroup;
+			children = (
+				ADD3EBC82D102DFF005B711B /* KMCompressSettingManager.swift */,
+			);
+			path = Manager;
+			sourceTree = "<group>";
+		};
 		ADD56F532BB3F48200E87ED9 /* KMFreeTextStylesViewController */ = {
 			isa = PBXGroup;
 			children = (
@@ -14317,7 +14312,6 @@
 				89E9B3F9295BE2EC00AEFA61 /* KMEditPDFTextPropertyViewController.xib in Resources */,
 				9F8539CE29430BF300DF644E /* KMBrowserWindowController.xib in Resources */,
 				BBB789C32BE8BF2400F7E09C /* AIRedoConfirmView.xib in Resources */,
-				AD07BCD92D02CBB20075054B /* KMBatchOperateCompressSettingAlertView.xib in Resources */,
 				BB1B0AE92B4FC6E900889528 /* KMFunctionGuideMultiController.xib in Resources */,
 				9F8810982B56877C00F69815 /* KMAnnotationChoiceWidgetOptionsViewController.xib in Resources */,
 				ADDF83472B391A5C00A81A4E /* DSignatureCreateInfoViewController.xib in Resources */,
@@ -14475,7 +14469,6 @@
 				BB716D742CDDB73B009787ED /* KMHeaderFooterController.xib in Resources */,
 				ADD1B6F92946C0CA00C3FFF7 /* KMPrintChoosePageSizeMultipageView.xib in Resources */,
 				BB1A916F2AFB7871005E5FD8 /* KMConvertWindowController.xib in Resources */,
-				AD07BCDA2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.xib in Resources */,
 				BBB789C42BE8BF2400F7E09C /* AIRedoConfirmView.xib in Resources */,
 				9F69DBBE2B55014F003D4C45 /* KMAnnotationButtonWidgetAppearanceViewController.xib in Resources */,
 				AD3AAD4A2B0B7B8900DE5FE7 /* KMCompareToolbar.xib in Resources */,
@@ -15036,7 +15029,6 @@
 				ADEC7A83299397F8009A8256 /* SF-Pro-Text-Regular.otf in Resources */,
 				BB6EA2962B70AF48000D4490 /* KMConvertCompareViewController.xib in Resources */,
 				9F8810922B56614600F69815 /* KMAnnotationChoiceWidgetAppearanceViewController.xib in Resources */,
-				AD07BCDB2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.xib in Resources */,
 				BBE068A72CDDF149000512BC /* KMBatesTemplateItem.xib in Resources */,
 				9F94748129FA24200042F949 /* Credits.rtf in Resources */,
 				BB8AA5412CC66E490084F183 /* PDFImages.xcassets in Resources */,
@@ -15800,7 +15792,6 @@
 				9FCFEC742AC56ECE00EAD2CB /* CPDFListStampAnnotation.swift in Sources */,
 				BB9AEB5C2D101FD8004BF8D2 /* KMServerConfig.swift in Sources */,
 				657851682CFEA3C40023D640 /* KMSearchMode.swift in Sources */,
-				AD07BCDC2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.swift in Sources */,
 				9FCFECA42AD237B500EAD2CB /* KMBatchTableRowView.swift in Sources */,
 				BB86C1ED28F544F4005AD968 /* CPDFListView+Event.m in Sources */,
 				BB88E454294045B4002B3655 /* KMPDFConvertManager.swift in Sources */,
@@ -15978,6 +15969,7 @@
 				BBFEF71B2B3A784200C28AC0 /* KMSystemEditMenu.swift in Sources */,
 				9FF371BF2C69A6BB005F9CC5 /* CAreaMeasureInfoWindowController.swift in Sources */,
 				BB9138362CEE089C00BAB4A7 /* KMCropController.swift in Sources */,
+				ADD3EBC92D102DFF005B711B /* KMCompressSettingManager.swift in Sources */,
 				9FDD0F802952FC36000C4DAD /* KMDesignToken.swift in Sources */,
 				BB8810CA2B4F97D000AFA63E /* VerificationManager.m in Sources */,
 				F30B22852CB8D9630041002E /* KMNQuickToolCollectionViewItem.swift in Sources */,
@@ -17227,6 +17219,7 @@
 				9F0CB4D62986551600007028 /* KMDesignToken+Spacing.swift in Sources */,
 				BB88106E2B4F771D00AFA63E /* KMVerificationInfoViewController.m in Sources */,
 				65FABB322C9AFB0C00AA92E5 /* KMSectionCellView.swift in Sources */,
+				ADD3EBCA2D102DFF005B711B /* KMCompressSettingManager.swift in Sources */,
 				65C404372CFDE1E600B32BDC /* KMNBotaSearchCellView.swift in Sources */,
 				BB4A948E2B04726A00940F8B /* KMOCTool.m in Sources */,
 				F3732324292DFFFE0013862C /* CPDFListView+Extension.m in Sources */,
@@ -17461,7 +17454,6 @@
 				BBDF17FD2CD47F8500ACDB15 /* KMEditDocumentController.swift in Sources */,
 				BB1B0ACF2B4FC6E900889528 /* KMFunctionGuideMultiController.swift in Sources */,
 				BBB789852BE8BF2300F7E09C /* AIChatInfoManager.swift in Sources */,
-				AD07BCDD2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.swift in Sources */,
 				656C1E2F2CD0745200295F82 /* KMConvertPageRangeSettingItemView.swift in Sources */,
 				BB0FE0472B734DD1001E0F88 /* AIInfoConfig.swift in Sources */,
 				BB4A94A52B04DA0C00940F8B /* KMGOCRManagerNew.swift in Sources */,
@@ -18387,7 +18379,6 @@
 				BB451AC72CF5AF68003E1565 /* KMEraserController.swift in Sources */,
 				ADDF83672B391A5C00A81A4E /* DSignatureFromFileViewController.swift in Sources */,
 				BB7648EE29ECEEF400931039 /* KMAppearance.swift in Sources */,
-				AD07BCDE2D02CBB30075054B /* KMBatchOperateCompressSettingAlertView.swift in Sources */,
 				BB4DFD5C2CFDA9E600026C8B /* KMStampListController.swift in Sources */,
 				BB4A94932B04926700940F8B /* KMGOCROperation.swift in Sources */,
 				BB8B9A032B355EFB00A066EC /* KMLeftSideViewController+Outline.swift in Sources */,
@@ -18704,6 +18695,7 @@
 				BB6B4C0E292F62B20071CA06 /* KMPDFThumbnialPageView.swift in Sources */,
 				9FCFEC922AD11E5F00EAD2CB /* KMSplitView.swift in Sources */,
 				ADD1B6B929420B2300C3FFF7 /* KMPrintChooseView.swift in Sources */,
+				ADD3EBCB2D102DFF005B711B /* KMCompressSettingManager.swift in Sources */,
 				653647BB2CDCA5DE00CDB13E /* KMBatchOperateSplitViewController.swift in Sources */,
 				BB276A5A2B038D1100AB5578 /* KMOCRPDFWindowController.swift in Sources */,
 				BBE788F52CBD2464008086E2 /* TreeVC.swift in Sources */,