12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // KMBOTAManagerClass.swift
- // PDF Reader Pro
- //
- // Created by lxy on 2022/11/15.
- //
- import Cocoa
- let thumbnailMethodKey = "KMThumbnailMethodKey"
- let outlineMethodKey = "KMOutlineMethoddKey"
- let bookMarkMethodKey = "KMBookMarkMethodKey"
- let anntationMethodKey = "KMAnntationMethodKey"
- let searchMethodKey = "KMSearchMethodKey"
- let formMethodKey = "KMFormMethodKey"
- let signatureMethodKey = "KMSignatureMethodKey"
- let snapshotMethodKey = "KMSnapshotMethodKey"
- class KMBOTAManagerClass: NSObject {
- static let shard = KMBOTAManagerClass()
- var thumbnailMethod = true
- var outlineMethod = true
- var bookMarkMethod = true
- var anntationMethod = true
- var searchMethod = true
- var formMethod = false
- var signatureMethod = false
-
- private override init() {
- super.init()
- }
-
- override func copy() -> Any {
- return self
- }
-
- override func mutableCopy() -> Any {
- return self
- }
-
- func getMethodShow(key:String) -> Bool {
- if UserDefaults.standard.object(forKey:key) != nil {
- let value = UserDefaults.standard.bool(forKey: key)
- return value
- } else {
- if key == formMethodKey || key == signatureMethodKey {
- return false
- }
- return true
- }
- }
-
- func setLeftMethod(show:Bool, key:String) {
- UserDefaults.standard.set(show, forKey: key)
- UserDefaults.standard.synchronize()
- }
-
-
- }
|