// // HomeLynxGuideModel.swift // PDF Reader Pro // // Created by Niehaoyu on 2024/7/22. // import Cocoa public enum LynxGuideType : Int, CaseIterable { case AdminConsole = 0 // 批量处理 case Onpremise case SSO case MultipleInstall case CustomSolutions case BusinessFeature } class HomeLynxGuideModel: NSObject { var type: LynxGuideType? init(type: LynxGuideType? = nil) { self.type = type } func titleString() -> String { var string = "" switch self.type { case .AdminConsole: string = "Admin Console" case .Onpremise: string = "On-premise deployment" case .SSO: string = "SSO (Single Sign-on)" case .MultipleInstall: string = "Multiple types of Installers" case .CustomSolutions: string = "Customized Solutions" case .BusinessFeature: string = "Business-specific Features" default: string = "" } return KMLocalizedString(string, nil)//string } func subTitleString() -> String { var string = "" switch self.type { case .AdminConsole: string = "Easily assign, remove, and unbind licenses for team members with Admin Console." case .Onpremise: string = "Provide a perfect solution for the government or enterprise with high data protection requirements." case .SSO: string = "SSO allows users to access multiple applications within a system with a single set of credentials." case .MultipleInstall: string = "Various install packages like msi, exe, pkg, dmg, etc." case .CustomSolutions: string = "LynxPDF Editor offers customized software features and services for enterprise users." case .BusinessFeature: string = "Digital sign, Custom stamp, Edit PDF, Convert PDF, Create and Fill Form, OCR, Secure PDF, etc." default: string = "" } return KMLocalizedString(string, nil)//string } func btnTitleString() -> String { var string = "" switch self.type { case .AdminConsole: string = "14-day Free Trial" case .Onpremise: string = "Learn More" case .SSO: string = "Learn More" case .MultipleInstall: string = "Learn More" case .CustomSolutions: string = "Learn More" case .BusinessFeature: string = "Learn More" default: string = "" } return KMLocalizedString(string, nil)//string } func iconImage(_ isHight: Bool = false) -> NSImage { var string = "" if isHight { switch self.type { case .AdminConsole: string = "adminConsole" case .Onpremise: string = "Onpremisedeployment" case .SSO: string = "SingleSign-on" case .MultipleInstall: string = "MultipletypesofInstallers" case .CustomSolutions: string = "solutions" case .BusinessFeature: string = "Business" default: string = "" } } else { switch self.type { case .AdminConsole: string = "adminConsole" case .Onpremise: string = "Onpremisedeployment" case .SSO: string = "SingleSign-on" case .MultipleInstall: string = "MultipletypesofInstallers" case .CustomSolutions: string = "solutions" case .BusinessFeature: string = "Business" default: string = "" } } return NSImage(named: string) ?? NSImage() } }