12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // KMSavePanelAccessoryController.swift
- // PDF Master
- //
- // Created by wanjun on 2023/10/10.
- //
- import Cocoa
- @objcMembers
- class KMSavePanelAccessoryController: NSViewController {
- @IBOutlet weak var openAutomaticButton: NSButton!
- var _needOpen: Bool = false
-
- override init(nibName nibNameOrNil: NSNib.Name?, bundle nibBundleOrNil: Bundle?) {
- super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
- }
- required init?(coder: NSCoder) {
- super.init(coder: coder)
- }
- override func awakeFromNib() {
- super.awakeFromNib()
-
- openAutomaticButton.title = NSLocalizedString("Open the document after saving", comment: "")
- openAutomaticButton.state = NSControl.StateValue.off
- }
- @IBAction func buttonClickedOpenAutomatic(_ sender: NSButton) {
- _needOpen = sender.state == NSControl.StateValue.on
- }
-
- //MARK: Get、Set
-
- var needOpen: Bool {
- return _needOpen
- }
- }
|