12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- //
- // KMConvertJsonWindowController.swift
- // PDF Reader Pro
- //
- // Created by User-Tangchao on 2024/10/29.
- //
- import Cocoa
- class KMConvertJsonWindowController: KMConvertBaseWindowController {
- override var fileExtension: String {
- return KMPDFConvert.pathExtension(.json)
- }
-
- override func initContentView() {
- super.initContentView()
-
- self.titleLabel.stringValue = NSLocalizedString("PDF to Json", comment: "")
- }
-
- override func initSettingView() -> KMConvertSettingView? {
- return KMConvertJsonSettingView.json_createFromNib()
- }
-
- override func initConvert() -> KMPDFConvert {
- return KMPDFConvertJson()
- }
-
- override func convertModelAppendParams(convert: KMPDFConvert) {
- super.convertModelAppendParams(convert: convert)
-
- if let _convert = convert as? KMPDFConvertHTML {
- let settingView: KMConvertJsonSettingView = self.settingView as! KMConvertJsonSettingView
- let index = settingView.extractIndex
- if (index == 0) {
- _convert.isAllInOneSheet = false
- } else if index == 1 {
- _convert.isAllInOneSheet = true
- }
- }
- }
- }
|