HomeLynxGuideModel.swift 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //
  2. // HomeLynxGuideModel.swift
  3. // PDF Reader Pro
  4. //
  5. // Created by Niehaoyu on 2024/7/22.
  6. //
  7. import Cocoa
  8. public enum LynxGuideType : Int, CaseIterable {
  9. case AdminConsole = 0 // 批量处理
  10. case Onpremise
  11. case SSO
  12. case MultipleInstall
  13. case CustomSolutions
  14. case BusinessFeature
  15. }
  16. class HomeLynxGuideModel: NSObject {
  17. var type: LynxGuideType?
  18. init(type: LynxGuideType? = nil) {
  19. self.type = type
  20. }
  21. func titleString() -> String {
  22. var string = ""
  23. switch self.type {
  24. case .AdminConsole: string = "Admin Console"
  25. case .Onpremise: string = "On-premise deployment"
  26. case .SSO: string = "SSO (Single Sign-on)"
  27. case .MultipleInstall: string = "Multiple types of Installers"
  28. case .CustomSolutions: string = "Customized Solutions"
  29. case .BusinessFeature: string = "Business-specific Features"
  30. default: string = ""
  31. }
  32. return KMLocalizedString(string, nil)//string
  33. }
  34. func subTitleString() -> String {
  35. var string = ""
  36. switch self.type {
  37. case .AdminConsole: string = "Easily assign, remove, and unbind licenses for team members with Admin Console."
  38. case .Onpremise: string = "Provide a perfect solution for the government or enterprise with high data protection requirements."
  39. case .SSO: string = "SSO allows users to access multiple applications within a system with a single set of credentials."
  40. case .MultipleInstall: string = "Various install packages like msi, exe, pkg, dmg, etc."
  41. case .CustomSolutions: string = "LynxPDF Editor offers customized software features and services for enterprise users."
  42. case .BusinessFeature: string = "Digital sign, Custom stamp, Edit PDF, Convert PDF, Create and Fill Form, OCR, Secure PDF, etc."
  43. default: string = ""
  44. }
  45. return KMLocalizedString(string, nil)//string
  46. }
  47. func btnTitleString() -> String {
  48. var string = ""
  49. switch self.type {
  50. case .AdminConsole: string = "14-day Free Trial"
  51. case .Onpremise: string = "Learn More"
  52. case .SSO: string = "Learn More"
  53. case .MultipleInstall: string = "Learn More"
  54. case .CustomSolutions: string = "Learn More"
  55. case .BusinessFeature: string = "Learn More"
  56. default: string = ""
  57. }
  58. return KMLocalizedString(string, nil)//string
  59. }
  60. func iconImage(_ isHight: Bool = false) -> NSImage {
  61. var string = ""
  62. if isHight {
  63. switch self.type {
  64. case .AdminConsole: string = "adminConsole"
  65. case .Onpremise: string = "Onpremisedeployment"
  66. case .SSO: string = "SingleSign-on"
  67. case .MultipleInstall: string = "MultipletypesofInstallers"
  68. case .CustomSolutions: string = "solutions"
  69. case .BusinessFeature: string = "Business"
  70. default: string = ""
  71. }
  72. } else {
  73. switch self.type {
  74. case .AdminConsole: string = "adminConsole"
  75. case .Onpremise: string = "Onpremisedeployment"
  76. case .SSO: string = "SingleSign-on"
  77. case .MultipleInstall: string = "MultipletypesofInstallers"
  78. case .CustomSolutions: string = "solutions"
  79. case .BusinessFeature: string = "Business"
  80. default: string = ""
  81. }
  82. }
  83. return NSImage(named: string) ?? NSImage()
  84. }
  85. }