KMUserFbHelpPopController.swift 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // KMUserFbHelpPopController.swift
  3. // PDF Reader Pro Edition
  4. //
  5. // Created by tangchao on 2024/7/12.
  6. //
  7. import Cocoa
  8. class KMUserFbHelpPopController: NSViewController {
  9. @IBOutlet weak var point1: NSView!
  10. @IBOutlet weak var tipLabel1: NSTextField!
  11. @IBOutlet weak var point2: NSView!
  12. @IBOutlet weak var tipLabel2: NSTextField!
  13. var isDrak: Bool = false {
  14. didSet {
  15. }
  16. }
  17. var formatSting: String = ""
  18. convenience init() {
  19. self.init(nibName: "KMUserFbHelpPopController", bundle: nil)
  20. }
  21. override func viewWillAppear() {
  22. super.viewWillAppear()
  23. for pointV in [self.point1, self.point2] {
  24. pointV?.wantsLayer = true
  25. pointV?.layer?.cornerRadius = 1.5
  26. if self.isDrak {
  27. pointV?.layer?.backgroundColor = NSColor(red: 110/255.0, green: 109/255.0, blue: 112/255.0, alpha: 1).cgColor
  28. } else {
  29. pointV?.layer?.backgroundColor = .black
  30. }
  31. }
  32. }
  33. override func viewDidLoad() {
  34. super.viewDidLoad()
  35. // for pointV in [self.point1, self.point2] {
  36. // pointV?.wantsLayer = true
  37. // pointV?.layer?.cornerRadius = 1.5
  38. // pointV?.layer?.backgroundColor = .black
  39. // }
  40. self.tipLabel1.stringValue = NSLocalizedString("Limit file size to 20M, upload up to 10 files", comment: "")
  41. // 不限制文件格式(图片+PDF+Office(Excel/Word/Powerpoint)+TXT+HTML+MP4…)
  42. self.tipLabel2.stringValue = "\(NSLocalizedString("Format:", comment: ""))\(self.formatSting)"
  43. }
  44. }