123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- //
- // KMConvertCSVWindowController.swift
- // PDF Master
- //
- // Created by tangchao on 2022/12/6.
- //
- import Cocoa
- // 转档 CSV 窗口
- class KMConvertCSVWindowController: KMConvertBaseWindowController {
- override var fileExtension: String {
- let settingView: KMConvertCSVSettingView = self.settingView as! KMConvertCSVSettingView
- if settingView.selectedSettingIndex == 0 {
- return KMPDFConvert.pathExtension(.csv, false)
- } else {
- return KMPDFConvert.pathExtension(.csv, true)
- }
- }
-
- override func initDefaultValue() {
- super.initDefaultValue()
-
- self.titleLabel.stringValue = NSLocalizedString("PDF to CSV", comment: "")
- }
-
- override func initSettingView() -> KMConvertSettingView? {
- return KMConvertCSVSettingView.createFromNib()
- }
-
- override func initConvert() -> KMPDFConvert {
- return KMPDFConvertCSV()
- }
-
- override func convertModelAppendParams(convert: KMPDFConvert) {
- let settingView: KMConvertCSVSettingView = self.settingView as! KMConvertCSVSettingView
- if settingView.selectedSettingIndex == 0 {
- convert.isExtractTable = false
- } else {
- convert.isExtractTable = true
- }
- }
-
- }
|