Browse Source

【批量处理】- 压缩

jiajie 1 year ago
parent
commit
cc43e98463

+ 14 - 11
PDF Office/PDF Master/Class/Batch/WindowController/KMBatchOperateRightViewController.swift

@@ -8,13 +8,16 @@
 import Cocoa
 
 class KMBatchOperateRightViewController: NSViewController{
-    var compressViewController: KMBatchOperateCompressViewController?
-    
-      lazy var convertViewController: KMBatchOperateConvertViewController? = {
-          let vc = KMBatchOperateConvertViewController(files: self.files)
-          vc.operateType = .Convert
-          return vc
-      }()
+    lazy var compressViewController: KMBatchOperateCompressViewController? = {
+        let vc = KMBatchOperateCompressViewController(files: self.files)
+        vc.operateType = .Compress
+        return vc
+    }()
+    lazy var convertViewController: KMBatchOperateConvertViewController? = {
+        let vc = KMBatchOperateConvertViewController(files: self.files)
+        vc.operateType = .Convert
+        return vc
+    }()
     lazy var addWatermarkViewController: KMBatchOperateAddWatermarkViewController? = {
         let vc = KMBatchOperateAddWatermarkViewController(files: self.files)
         vc.operateType = .AddWatermark
@@ -101,10 +104,10 @@ class KMBatchOperateRightViewController: NSViewController{
 //                        make?.edges.equalTo()(self.view)
 //                    })
                 } else if _currentType == .Compress {
-//                    self.view.addSubview(self.compressViewController.view)
-//                    self.compressViewController?.view.mas_makeConstraints({ make in
-//                        make?.edges.equalTo()(self.view)
-//                    })
+                    self.view.addSubview(self.compressViewController!.view)
+                    self.compressViewController?.view.mas_makeConstraints({ make in
+                        make?.edges.equalTo()(self.view)
+                    })
                 } else if _currentType == .CreatePDF {
 //                    self.view.addSubview(self.imageToPDFViewController.view)
 //                    self.imageToPDFViewController?.view.mas_makeConstraints({ make in

+ 8 - 8
PDF Office/PDF Master/Class/Batch/WindowController/VC/KMBatchOperateCompressViewController.xib

@@ -37,7 +37,7 @@
                         <constraint firstAttribute="height" constant="1" id="quc-k2-w7g"/>
                     </constraints>
                 </box>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9XA-Ss-REU">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9XA-Ss-REU">
                     <rect key="frame" x="34" y="245" width="37" height="16"/>
                     <textFieldCell key="cell" title="Label" id="EuU-hO-Up2">
                         <font key="font" metaFont="system"/>
@@ -45,7 +45,7 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NJ8-R3-NNq">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="NJ8-R3-NNq">
                     <rect key="frame" x="34" y="218" width="37" height="16"/>
                     <textFieldCell key="cell" title="Label" id="7Po-hc-8df">
                         <font key="font" metaFont="system"/>
@@ -53,7 +53,7 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s3M-WR-b0B">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="s3M-WR-b0B">
                     <rect key="frame" x="34" y="191" width="37" height="16"/>
                     <textFieldCell key="cell" title="Label" id="i0p-bT-jDe">
                         <font key="font" metaFont="system"/>
@@ -61,7 +61,7 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="G4p-Mj-Wqk">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="G4p-Mj-Wqk">
                     <rect key="frame" x="34" y="164" width="37" height="16"/>
                     <textFieldCell key="cell" title="Label" id="9BY-68-WZA">
                         <font key="font" metaFont="system"/>
@@ -119,7 +119,7 @@
                         <action selector="buttonClicked_ChooseDPI:" target="-2" id="f7f-xL-i2z"/>
                     </connections>
                 </button>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BGJ-le-5vT">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="BGJ-le-5vT">
                     <rect key="frame" x="14" y="272" width="42" height="17"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="Och-Je-3zh">
                         <font key="font" metaFont="systemBold" size="14"/>
@@ -140,7 +140,7 @@
                         <action selector="buttonClicked_Action:" target="-2" id="cVx-s7-YUc"/>
                     </connections>
                 </button>
-                <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZM8-au-Zjj" customClass="KMSlider">
+                <slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ZM8-au-Zjj" customClass="KMSlider" customModule="PDF_Master" customModuleProvider="target">
                     <rect key="frame" x="36" y="100" width="204" height="28"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="200" id="stZ-Di-EVJ"/>
@@ -150,7 +150,7 @@
                         <action selector="comprssVauleAction:" target="-2" id="R9C-l8-4aD"/>
                     </connections>
                 </slider>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tY3-My-5Ov">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="tY3-My-5Ov">
                     <rect key="frame" x="36" y="85" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="1C5-jz-2Kv">
                         <font key="font" metaFont="system"/>
@@ -158,7 +158,7 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
-                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uQM-Hg-SLo">
+                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="uQM-Hg-SLo">
                     <rect key="frame" x="203" y="85" width="37" height="16"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="dmh-q4-Y71">
                         <font key="font" metaFont="system"/>

+ 4 - 4
PDF Office/PDF Master/Class/PDFTools/Watermark/Controller/KMBatchOperateAddWatermarkViewController.xib

@@ -41,7 +41,7 @@
                         <customView translatesAutoresizingMaskIntoConstraints="NO" id="NWw-iM-2Ew">
                             <rect key="frame" x="0.0" y="32" width="367" height="40"/>
                             <subviews>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IJL-su-pqC">
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="IJL-su-pqC">
                                     <rect key="frame" x="14" y="12" width="37" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" title="Label" id="w1W-HR-J3B">
                                         <font key="font" usesAppearanceFont="YES"/>
@@ -49,7 +49,7 @@
                                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                                     </textFieldCell>
                                 </textField>
-                                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xIQ-K6-xSi">
+                                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xIQ-K6-xSi">
                                     <rect key="frame" x="163" y="12" width="41" height="16"/>
                                     <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Label" id="pPb-aL-ohW">
                                         <font key="font" metaFont="system"/>
@@ -258,7 +258,7 @@
                             <rect key="frame" x="67" y="64" width="140" height="140"/>
                             <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="KMImageNameEmptyWatermark" id="YaT-om-RfU"/>
                         </imageView>
-                        <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="JqI-Pt-Ze1">
+                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="JqI-Pt-Ze1">
                             <rect key="frame" x="91" y="32" width="92" height="16"/>
                             <textFieldCell key="cell" title="Multiline Label" id="zpm-Gq-FGd">
                                 <font key="font" metaFont="system"/>
@@ -266,7 +266,7 @@
                                 <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                             </textFieldCell>
                         </textField>
-                        <textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="oay-iy-BGm">
+                        <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="oay-iy-BGm">
                             <rect key="frame" x="91" y="8" width="92" height="16"/>
                             <textFieldCell key="cell" title="Multiline Label" id="3PQ-kh-niF">
                                 <font key="font" metaFont="system"/>