12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //
- // AIRedoConfirmView.swift
- // PDF Reader Pro Edition
- //
- // Created by Niehaoyu on 2024/4/22.
- //
- import Cocoa
- class AIRedoConfirmView: NSView, NibLoadable {
- @IBOutlet weak var contendView: NSView!
- @IBOutlet weak var infoLabel: NSTextField!
-
- @IBOutlet weak var redoButton: NSButton!
-
- var redoHandle: ((_ view: AIRedoConfirmView) -> Void)?
-
- override func draw(_ dirtyRect: NSRect) {
- super.draw(dirtyRect)
- // Drawing code here.
- }
-
-
- override func awakeFromNib() {
- super.awakeFromNib()
-
- self.wantsLayer = true
- self.layer?.backgroundColor = NSColor.clear.cgColor
-
- self.infoLabel.font = NSFont.SFProTextRegularFont(13)
- self.infoLabel.stringValue = NSLocalizedString("Redoing will cost 1 credit. Do you want to redo it?", comment: "")
- self.redoButton.title = NSLocalizedString("Redo (1 credit)", comment: "")
-
- }
-
- @IBAction func redoAction(_ sender: Any) {
- guard let callBack = self.redoHandle else {
- return
- }
- callBack(self)
- }
-
-
- }
|