123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- //
- // KMNAPPExpirationWindowController.swift
- // PDF Reader Pro Beta
- //
- // Created by kdanmobile on 2025/3/1.
- //
- import Cocoa
- import KMComponentLibrary
- class KMNAPPExpirationWindowController: KMNBaseWindowController {
-
- @IBOutlet var titleLabel: NSTextField!
- @IBOutlet var subTitleLabel: NSTextField!
- @IBOutlet var subContentLabel: NSTextField!
- @IBOutlet var sureButton: ComponentButton!
- @IBOutlet var contentTopConstraint:NSLayoutConstraint!
-
- var isEndTime: Bool! {
- get {
- //需拿远端的控制的时间
- return true
- }
- }
- override func windowDidLoad() {
- super.windowDidLoad()
- }
-
- override func initContentView() {
- titleLabel.font = NSFont.boldSystemFont(ofSize: 24)
-
- subTitleLabel.font = ComponentLibrary.shared.getFontFromKey ("mac/body-m-medium")
- subContentLabel.font = ComponentLibrary.shared.getFontFromKey("mac/body-m-medium")
- sureButton.properties = ComponentButtonProperty(type: .primary,
- size: .s,
- state: .normal,
- buttonText: KMLocalizedString("I Know"))
- sureButton.setTarget(self, action: #selector(submitButtonClicked(_ :)))
- sureButton.keyEquivalent = KMKeyEquivalent.enter
- if(isEndTime) {
- contentTopConstraint.constant = 70
- subContentLabel.isHidden = false
- } else {
- contentTopConstraint.constant = 46
- subContentLabel.isHidden = true
- }
- }
-
- override func updateUIThemeColor() {
-
- window?.contentView?.wantsLayer = true
- window?.contentView?.layer?.backgroundColor = ComponentLibrary.shared.getComponentColorFromKey("colorBg/popup").cgColor
- titleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorError/base")
- subTitleLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey ("colorText/1")
- subContentLabel.textColor = ComponentLibrary.shared.getComponentColorFromKey("colorText/1")
- sureButton.reloadData()
- }
-
- override func updateUILanguage() {
- titleLabel.stringValue = KMLocalizedString("Beta's Usage Rights Has Expired")
-
- subTitleLabel.stringValue = KMLocalizedString("PDF Reader Pro Team has incorporated your suggestions into consideration. ")
- subContentLabel.stringValue = KMLocalizedString("Please stay tuned for PDF Reader Pro 2025!")
- sureButton.properties.buttonText = KMLocalizedString("I Know")
-
- sureButton.reloadData()
- }
- //MARK: - Action
- @objc func cancelButtonClicked(_ sender: NSView) {
- own_closeEndSheet()
- }
-
- @objc func submitButtonClicked(_ sender: NSView) {
- own_closeEndSheet()
- }
- }
|