1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- //
- // KMConvertCSVWindowController.swift
- // PDF Reader Pro
- //
- // 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 initContentView() {
- super.initContentView()
- 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
- }
- }
-
- }
|