1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // KMBatchOperateCompressViewController.swift
- // PDF Reader Pro
- //
- // Created by lizhe on 2024/11/15.
- //
- import Cocoa
- import KMComponentLibrary
- class KMBatchOperateCompressViewController: KMBatchOperateBaseViewController {
- @IBOutlet weak var titleLabel: NSTextField!
- @IBOutlet weak var compressView: KMCompressContentView!
- @IBOutlet weak var compressButton: ComponentButton!
-
- var model: KMCompressSettingModel = KMCompressSettingModel(modelsType: .standard) {
- didSet {
- self.reloadData()
- }
- }
-
-
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do view setup here.
- self.updateUI()
- }
- }
- //UI
- extension KMBatchOperateCompressViewController {
- func updateUI() {
- compressButton.properties = ComponentButtonProperty(type: .primary, size: .xs, buttonText: KMLocalizedString("Compress"), keepPressState: false)
- compressButton.setTarget(self, action: #selector(compressButtonAction(_:)))
-
- self.compressView.selectTypeAction = {[unowned self] view, tModel in
- self.model = tModel
- }
- }
- }
- //MARK: Data
- extension KMBatchOperateCompressViewController {
- func reloadData() {
-
- }
- }
- //MARK: Action
- extension KMBatchOperateCompressViewController {
- @IBAction func compressButtonAction(_ sender: Any) {
- // KMCompressManager.shared.compress(documentURL: self.documentURL,
- // limit: limit,
- // model: self.model,
- // view: (self.window?.contentView)!) { [unowned self] isFinish, resultURL in
- // if isFinish {
- // self.closeWindow()
- // }
- // }
- }
- }
|