123456789101112131415161718192021222324252627282930313233 |
- //
- // KMSecurityWindowController.swift
- // PDF Master
- //
- // Created by lizhe on 2023/11/13.
- //
- import Cocoa
- typealias KMSecurityWindowControllerBatchAction = (_ controller: NSWindowController, _ files: [KMFileAttribute]) -> Void
- typealias KMSecurityWindowControllerCancelAction = (_ controller: NSWindowController) -> Void
- class KMSecurityWindowController: NSWindowController {
- @IBOutlet weak var securityView: KMSecurityView!
-
- var batchAction: KMSecurityWindowControllerBatchAction?
- var cancelAction: KMSecurityWindowControllerCancelAction?
-
- override func windowDidLoad() {
- super.windowDidLoad()
- // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
-
- securityView.cancelAction = { [unowned self] view in
- self.cancelAction?(self)
- }
-
- securityView.batchAction = { [unowned self] view, files in
- self.batchAction?(self, files)
- }
- }
-
- }
|