1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //
- // KMBatchRemoveView.swift
- // PDF Master
- //
- // Created by lizhe on 2023/1/16.
- //
- import Cocoa
- import KMComponentLibrary
- class KMBatchRemoveView: KMBatchSettingItemView {
- @IBOutlet weak var titleLabel: NSTextField!
- @IBOutlet weak var titleContentView: NSView!
- @IBOutlet weak var watermarkButton: ComponentCheckBox!
- @IBOutlet weak var backgroundButton: ComponentCheckBox!
- @IBOutlet weak var headerAndFooterButton: ComponentCheckBox!
- @IBOutlet weak var batesButton: ComponentCheckBox!
-
- var data = KMBatchRemoveViewModel()
- override func draw(_ dirtyRect: NSRect) {
- super.draw(dirtyRect)
- // Drawing code here.
- }
-
- override func setup() {
- super.setup()
-
- self.titleContentView.border(ComponentLibrary.shared.getComponentColorFromKey("colorBorder/divider"), 0.5, 0)
-
- watermarkButton.properties = ComponentCheckBoxProperty(size: .s,
- state: .normal,
- isDisabled: false,
- showhelp: false,
- text: KMLocalizedString("Watermark", comment: ""),
- checkboxType: .normal)
-
- backgroundButton.properties = ComponentCheckBoxProperty(size: .s,
- state: .normal,
- isDisabled: false,
- showhelp: false,
- text: KMLocalizedString("Background", comment: ""),
- checkboxType: .normal)
-
- headerAndFooterButton.properties = ComponentCheckBoxProperty(size: .s,
- state: .normal,
- isDisabled: false,
- showhelp: false,
- text: KMLocalizedString("Header & Footer", comment: ""),
- checkboxType: .normal)
-
- batesButton.properties = ComponentCheckBoxProperty(size: .s,
- state: .normal,
- isDisabled: false,
- showhelp: false,
- text: KMLocalizedString("Bates", comment: ""),
- checkboxType: .normal)
- }
-
- override func reloadData() {
-
- }
- }
- protocol KMBatchRemoveViewAction: KMBatchRemoveView {}
- extension KMBatchRemoveView: KMBatchRemoveViewAction {
- @IBAction func removeButtonAction(_ sender: NSButton) {
- guard self.data != nil else {
- return
- }
-
- if self.batchExport != nil {
- self.batchExport!(self, self.data)
- }
- }
- }
|