KMCloudEmptyCollectionViewItem.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // KMCloudEmptyCollectionViewItem.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by wanjun on 2022/11/23.
  6. //
  7. import Cocoa
  8. class KMCloudEmptyCollectionViewItem: NSCollectionViewItem {
  9. @IBOutlet weak var cloudImageView: NSImageView!
  10. @IBOutlet weak var cloudLabel: NSTextField!
  11. override func viewDidLoad() {
  12. super.viewDidLoad()
  13. initializeUI()
  14. }
  15. // MARK: Init
  16. func initializeUI() -> Void {
  17. }
  18. // MARK: private
  19. func refreshUI(item: Int) -> Void {
  20. switch item {
  21. case KMCloudDocumentState.Box.rawValue:
  22. cloudImageView.image = NSImage(named: "ceshi")
  23. cloudLabel.stringValue = NSLocalizedString(KMCloudDocumentState.Box.string(), comment: "")
  24. case KMCloudDocumentState.DropBox.rawValue:
  25. cloudImageView.image = NSImage(named: "ceshi")
  26. cloudLabel.stringValue = NSLocalizedString(KMCloudDocumentState.DropBox.string(), comment: "")
  27. case KMCloudDocumentState.GoogleDrive.rawValue:
  28. cloudImageView.image = NSImage(named: "ceshi")
  29. cloudLabel.stringValue = NSLocalizedString(KMCloudDocumentState.GoogleDrive.string(), comment: "")
  30. case KMCloudDocumentState.OneDrive.rawValue:
  31. cloudImageView.image = NSImage(named: "ceshi")
  32. cloudLabel.stringValue = NSLocalizedString(KMCloudDocumentState.OneDrive.string(), comment: "")
  33. default:
  34. break
  35. }
  36. }
  37. }