瀏覽代碼

Demo - 参数支持设置;支持添加测试项;

zhudongyong 1 年之前
父節點
當前提交
373ec2947d
共有 31 個文件被更改,包括 2580 次插入428 次删除
  1. 68 0
      KdanAutoTest/KdanAuto.xcodeproj/project.pbxproj
  2. 二進制
      KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate
  3. 723 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/AdvanceSettingProperty.plist
  4. 325 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/AdvanceSettingViewController.swift
  5. 118 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/AdvanceSettingViewController.xib
  6. 65 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASBOOLPropertyCell.swift
  7. 34 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASBOOLPropertyCell.xib
  8. 58 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASFloatPropertyCell.swift
  9. 42 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASFloatPropertyCell.xib
  10. 59 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASIntPropertyCell.swift
  11. 42 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASIntPropertyCell.xib
  12. 107 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASPropertyCell.swift
  13. 18 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASPropertyCell.xib
  14. 86 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASSelectPropertyCell.swift
  15. 47 0
      KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASSelectPropertyCell.xib
  16. 155 12
      KdanAutoTest/KdanAuto/Class/AutoTestCase/AutoTest.swift
  17. 392 347
      KdanAutoTest/KdanAuto/Class/AutoTestCase/AutoTestProperty.plist
  18. 1 1
      KdanAutoTest/KdanAuto/Class/Norrmal/ActivityView/ActivityView.swift
  19. 101 1
      KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestCaseCellView.swift
  20. 1 1
      KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestFileCellView.swift
  21. 1 1
      KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestFileCellView.xib
  22. 50 1
      KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestFileTypeCellView.swift
  23. 27 0
      KdanAutoTest/KdanAuto/Class/Setting/Command Line Tool.sh
  24. 3 22
      KdanAutoTest/KdanAuto/Class/Tools/FileConveter/FileConverter.swift
  25. 二進制
      KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion(1.6.0).framework/Versions/A/ComPDFKit_Conversion
  26. 5 7
      KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion(1.6.0).framework/Versions/A/Resources/Info.plist
  27. 3 3
      KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion(1.6.0).framework/Versions/A/_CodeSignature/CodeResources
  28. 二進制
      KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion.framework/Versions/A/ComPDFKit_Conversion
  29. 5 7
      KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion.framework/Versions/A/Resources/Info.plist
  30. 3 3
      KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion.framework/Versions/A/_CodeSignature/CodeResources
  31. 41 22
      KdanAutoTest/KdanAuto/ViewController.swift

+ 68 - 0
KdanAutoTest/KdanAuto.xcodeproj/project.pbxproj

@@ -45,6 +45,19 @@
 		246FE5A5299E0FCD00706586 /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 246FE599299E0FCC00706586 /* mztools.c */; };
 		246FE5A6299E0FCD00706586 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 246FE59F299E0FCC00706586 /* README.md */; };
 		246FE5A7299E0FCD00706586 /* ZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = 246FE5A0299E0FCC00706586 /* ZipArchive.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+		24848DAF29ED0E2A002A7ED5 /* AdvanceSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24848DAD29ED0E2A002A7ED5 /* AdvanceSettingViewController.swift */; };
+		24848DB029ED0E2A002A7ED5 /* AdvanceSettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24848DAE29ED0E2A002A7ED5 /* AdvanceSettingViewController.xib */; };
+		24848DB329ED187E002A7ED5 /* ASPropertyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24848DB229ED187E002A7ED5 /* ASPropertyCell.swift */; };
+		24848DB529ED1913002A7ED5 /* AdvanceSettingProperty.plist in Resources */ = {isa = PBXBuildFile; fileRef = 24848DB429ED1913002A7ED5 /* AdvanceSettingProperty.plist */; };
+		24848DB729ED2796002A7ED5 /* ASIntPropertyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24848DB629ED2796002A7ED5 /* ASIntPropertyCell.swift */; };
+		24848DB929ED2821002A7ED5 /* ASPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24848DB829ED2821002A7ED5 /* ASPropertyCell.xib */; };
+		24848DBB29ED2852002A7ED5 /* ASIntPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24848DBA29ED2852002A7ED5 /* ASIntPropertyCell.xib */; };
+		24848DBE29ED2B3F002A7ED5 /* ASSelectPropertyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24848DBC29ED2B3F002A7ED5 /* ASSelectPropertyCell.swift */; };
+		24848DBF29ED2B3F002A7ED5 /* ASSelectPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24848DBD29ED2B3F002A7ED5 /* ASSelectPropertyCell.xib */; };
+		24848DC229ED2E4B002A7ED5 /* ASBOOLPropertyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24848DC029ED2E4B002A7ED5 /* ASBOOLPropertyCell.swift */; };
+		24848DC329ED2E4B002A7ED5 /* ASBOOLPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24848DC129ED2E4B002A7ED5 /* ASBOOLPropertyCell.xib */; };
+		24848DC629ED2FE4002A7ED5 /* ASFloatPropertyCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24848DC429ED2FE4002A7ED5 /* ASFloatPropertyCell.xib */; };
+		24848DC729ED2FE4002A7ED5 /* ASFloatPropertyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24848DC529ED2FE4002A7ED5 /* ASFloatPropertyCell.swift */; };
 		24A6FF49293091E000B34F2E /* AutoTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A6FF48293091E000B34F2E /* AutoTest.swift */; };
 		24A6FF4B2930939D00B34F2E /* TextColorAutoTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A6FF4A2930939D00B34F2E /* TextColorAutoTest.swift */; };
 		24A6FF4F2930A1E100B34F2E /* FontAutoTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24A6FF4E2930A1E100B34F2E /* FontAutoTest.swift */; };
@@ -180,6 +193,19 @@
 		246FE59F299E0FCC00706586 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
 		246FE5A0299E0FCC00706586 /* ZipArchive.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZipArchive.m; sourceTree = "<group>"; };
 		246FE5A8299E106B00706586 /* KdanAuto_Bringe_Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KdanAuto_Bringe_Header.h; sourceTree = "<group>"; };
+		24848DAD29ED0E2A002A7ED5 /* AdvanceSettingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdvanceSettingViewController.swift; sourceTree = "<group>"; };
+		24848DAE29ED0E2A002A7ED5 /* AdvanceSettingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AdvanceSettingViewController.xib; sourceTree = "<group>"; };
+		24848DB229ED187E002A7ED5 /* ASPropertyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASPropertyCell.swift; sourceTree = "<group>"; };
+		24848DB429ED1913002A7ED5 /* AdvanceSettingProperty.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = AdvanceSettingProperty.plist; sourceTree = "<group>"; };
+		24848DB629ED2796002A7ED5 /* ASIntPropertyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASIntPropertyCell.swift; sourceTree = "<group>"; };
+		24848DB829ED2821002A7ED5 /* ASPropertyCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ASPropertyCell.xib; sourceTree = "<group>"; };
+		24848DBA29ED2852002A7ED5 /* ASIntPropertyCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ASIntPropertyCell.xib; sourceTree = "<group>"; };
+		24848DBC29ED2B3F002A7ED5 /* ASSelectPropertyCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ASSelectPropertyCell.swift; sourceTree = "<group>"; };
+		24848DBD29ED2B3F002A7ED5 /* ASSelectPropertyCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ASSelectPropertyCell.xib; sourceTree = "<group>"; };
+		24848DC029ED2E4B002A7ED5 /* ASBOOLPropertyCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ASBOOLPropertyCell.swift; sourceTree = "<group>"; };
+		24848DC129ED2E4B002A7ED5 /* ASBOOLPropertyCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ASBOOLPropertyCell.xib; sourceTree = "<group>"; };
+		24848DC429ED2FE4002A7ED5 /* ASFloatPropertyCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ASFloatPropertyCell.xib; sourceTree = "<group>"; };
+		24848DC529ED2FE4002A7ED5 /* ASFloatPropertyCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ASFloatPropertyCell.swift; sourceTree = "<group>"; };
 		24A6FF48293091E000B34F2E /* AutoTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoTest.swift; sourceTree = "<group>"; };
 		24A6FF4A2930939D00B34F2E /* TextColorAutoTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextColorAutoTest.swift; sourceTree = "<group>"; };
 		24A6FF4E2930A1E100B34F2E /* FontAutoTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FontAutoTest.swift; sourceTree = "<group>"; };
@@ -404,6 +430,34 @@
 			path = minizip;
 			sourceTree = "<group>";
 		};
+		24848DAC29ED0E2A002A7ED5 /* AdvanceSettingViewController */ = {
+			isa = PBXGroup;
+			children = (
+				24848DB429ED1913002A7ED5 /* AdvanceSettingProperty.plist */,
+				24848DB129ED1866002A7ED5 /* PropertyCell */,
+				24848DAD29ED0E2A002A7ED5 /* AdvanceSettingViewController.swift */,
+				24848DAE29ED0E2A002A7ED5 /* AdvanceSettingViewController.xib */,
+			);
+			path = AdvanceSettingViewController;
+			sourceTree = "<group>";
+		};
+		24848DB129ED1866002A7ED5 /* PropertyCell */ = {
+			isa = PBXGroup;
+			children = (
+				24848DB229ED187E002A7ED5 /* ASPropertyCell.swift */,
+				24848DB829ED2821002A7ED5 /* ASPropertyCell.xib */,
+				24848DB629ED2796002A7ED5 /* ASIntPropertyCell.swift */,
+				24848DBA29ED2852002A7ED5 /* ASIntPropertyCell.xib */,
+				24848DBC29ED2B3F002A7ED5 /* ASSelectPropertyCell.swift */,
+				24848DBD29ED2B3F002A7ED5 /* ASSelectPropertyCell.xib */,
+				24848DC029ED2E4B002A7ED5 /* ASBOOLPropertyCell.swift */,
+				24848DC129ED2E4B002A7ED5 /* ASBOOLPropertyCell.xib */,
+				24848DC529ED2FE4002A7ED5 /* ASFloatPropertyCell.swift */,
+				24848DC429ED2FE4002A7ED5 /* ASFloatPropertyCell.xib */,
+			);
+			path = PropertyCell;
+			sourceTree = "<group>";
+		};
 		24AE7B4B298BD97300462BD3 /* CompareViewController */ = {
 			isa = PBXGroup;
 			children = (
@@ -545,6 +599,7 @@
 		24D7FFF8292B4FDB00DAB5EE /* Class */ = {
 			isa = PBXGroup;
 			children = (
+				24848DAC29ED0E2A002A7ED5 /* AdvanceSettingViewController */,
 				240934B12992735200839CC8 /* Tools */,
 				24D70007292D141A00DAB5EE /* AutoTestCase */,
 				24D70002292B94A100DAB5EE /* Norrmal */,
@@ -779,11 +834,18 @@
 				24D7FF9F29261A6600DAB5EE /* Assets.xcassets in Resources */,
 				24CA233C298FF0F800038E10 /* CompareViewController.xib in Resources */,
 				24DCE8B529506CDE004EBA35 /* AutoTestProperty.plist in Resources */,
+				24848DB529ED1913002A7ED5 /* AdvanceSettingProperty.plist in Resources */,
+				24848DC329ED2E4B002A7ED5 /* ASBOOLPropertyCell.xib in Resources */,
+				24848DC629ED2FE4002A7ED5 /* ASFloatPropertyCell.xib in Resources */,
+				24848DB929ED2821002A7ED5 /* ASPropertyCell.xib in Resources */,
 				242F966F298BAE2200CFF56C /* Toggle_half.png in Resources */,
 				24D70000292B6FD100DAB5EE /* SettingViewController.xib in Resources */,
 				24D7FFA229261A6600DAB5EE /* Main.storyboard in Resources */,
+				24848DBB29ED2852002A7ED5 /* ASIntPropertyCell.xib in Resources */,
 				246FE5A6299E0FCD00706586 /* README.md in Resources */,
 				242F966D298BAE2200CFF56C /* Toggle_off.png in Resources */,
+				24848DBF29ED2B3F002A7ED5 /* ASSelectPropertyCell.xib in Resources */,
+				24848DB029ED0E2A002A7ED5 /* AdvanceSettingViewController.xib in Resources */,
 				24DCE8B0295047D8004EBA35 /* TestFileCellView.xib in Resources */,
 				24DCE8AC295046E7004EBA35 /* TestFileTypeCellView.xib in Resources */,
 			);
@@ -834,12 +896,16 @@
 			buildActionMask = 2147483647;
 			files = (
 				24D70009292D14DA00DAB5EE /* AutoTestProtocal.swift in Sources */,
+				24848DC229ED2E4B002A7ED5 /* ASBOOLPropertyCell.swift in Sources */,
+				24848DB729ED2796002A7ED5 /* ASIntPropertyCell.swift in Sources */,
 				24A6FF4F2930A1E100B34F2E /* FontAutoTest.swift in Sources */,
+				24848DAF29ED0E2A002A7ED5 /* AdvanceSettingViewController.swift in Sources */,
 				24A6FF49293091E000B34F2E /* AutoTest.swift in Sources */,
 				2455C0D629E035A400800E8E /* PerformSelectTool.m in Sources */,
 				246FE5A7299E0FCD00706586 /* ZipArchive.m in Sources */,
 				24CA233A298FEED300038E10 /* FileInfo.swift in Sources */,
 				24DCE8BB29518FD3004EBA35 /* ProcessThumbnal.swift in Sources */,
+				24848DB329ED187E002A7ED5 /* ASPropertyCell.swift in Sources */,
 				24D7FF9D29261A6400DAB5EE /* ViewController.swift in Sources */,
 				24A6FF512930AC4D00B34F2E /* AutoTestAdvanceSettingView.swift in Sources */,
 				24DCE8AD295046E7004EBA35 /* TestFileTypeCellView.swift in Sources */,
@@ -848,10 +914,12 @@
 				24CA2337298FD6BE00038E10 /* ImageCompareCellView.swift in Sources */,
 				24D7FF9B29261A6400DAB5EE /* AppDelegate.swift in Sources */,
 				243DACD32940C6E8008A8AA6 /* ActivityView.swift in Sources */,
+				24848DC729ED2FE4002A7ED5 /* ASFloatPropertyCell.swift in Sources */,
 				24AE7B4D298BD98300462BD3 /* CompareViewController.swift in Sources */,
 				240934B42992735200839CC8 /* FileConverter.swift in Sources */,
 				246FE5A4299E0FCD00706586 /* ioapi.c in Sources */,
 				24D7000B292D16BB00DAB5EE /* StringAutoTest.swift in Sources */,
+				24848DBE29ED2B3F002A7ED5 /* ASSelectPropertyCell.swift in Sources */,
 				246FE5A2299E0FCD00706586 /* unzip.c in Sources */,
 				246FE5A5299E0FCD00706586 /* mztools.c in Sources */,
 				24DCE8A9295046A5004EBA35 /* TestCaseCellView.swift in Sources */,

二進制
KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate


+ 723 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/AdvanceSettingProperty.plist

@@ -0,0 +1,723 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>PDF</key>
+	<dict>
+		<key>Extention</key>
+		<string>pdf</string>
+		<key>Class</key>
+		<string>PDFCompareTest</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>int</string>
+				<key>Property</key>
+				<string>imageDpi</string>
+				<key>Name</key>
+				<string>Image DPI</string>
+				<key>DefaultValue</key>
+				<integer>216</integer>
+			</dict>
+		</array>
+	</dict>
+	<key>RTF</key>
+	<dict>
+		<key>Extention</key>
+		<string>rtf</string>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isAllowOCR</string>
+				<key>Name</key>
+				<string>Allow OCR</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>language</string>
+				<key>Name</key>
+				<string>OCR Language</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Chinese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Chinese Traditiional</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>3</integer>
+						<key>Name</key>
+						<string>English</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>4</integer>
+						<key>Name</key>
+						<string>Japanese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>5</integer>
+						<key>Name</key>
+						<string>Korean</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainImages</string>
+				<key>Name</key>
+				<string>Contain Images</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>Word</key>
+	<dict>
+		<key>Extention</key>
+		<string>docx</string>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isAllowOCR</string>
+				<key>Name</key>
+				<string>Allow OCR</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainOCRBgImage</string>
+				<key>Name</key>
+				<string>Contain OCR BgImage</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>language</string>
+				<key>Name</key>
+				<string>OCR Language</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Chinese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Chinese Traditiional</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>3</integer>
+						<key>Name</key>
+						<string>English</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>4</integer>
+						<key>Name</key>
+						<string>Japanese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>5</integer>
+						<key>Name</key>
+						<string>Korean</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainImages</string>
+				<key>Name</key>
+				<string>Contain Images</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>PPT</key>
+	<dict>
+		<key>Extention</key>
+		<string>pptx</string>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isAllowOCR</string>
+				<key>Name</key>
+				<string>Allow OCR</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainOCRBgImage</string>
+				<key>Name</key>
+				<string>Contain OCR BgImage</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>language</string>
+				<key>Name</key>
+				<string>OCR Language</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Chinese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Chinese Traditiional</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>3</integer>
+						<key>Name</key>
+						<string>English</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>4</integer>
+						<key>Name</key>
+						<string>Japanese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>5</integer>
+						<key>Name</key>
+						<string>Korean</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainImages</string>
+				<key>Name</key>
+				<string>Contain Images</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>Excel</key>
+	<dict>
+		<key>Extention</key>
+		<string>xlsx</string>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>contentOptions</string>
+				<key>Name</key>
+				<string>Content Options</string>
+				<key>DefaultValue</key>
+				<integer>2</integer>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Only Text</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Only Table</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>2</integer>
+						<key>Name</key>
+						<string>All Content</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>worksheetOptions</string>
+				<key>Name</key>
+				<string>Worksheet Options</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>EachTable</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>EachPage</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>2</integer>
+						<key>Name</key>
+						<string>For The Document</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isAllowOCR</string>
+				<key>Name</key>
+				<string>Allow OCR</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainOCRBgImage</string>
+				<key>Name</key>
+				<string>Contain OCR BgImage</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>language</string>
+				<key>Name</key>
+				<string>OCR Language</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Chinese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Chinese Traditiional</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>3</integer>
+						<key>Name</key>
+						<string>English</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>4</integer>
+						<key>Name</key>
+						<string>Japanese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>5</integer>
+						<key>Name</key>
+						<string>Korean</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainImages</string>
+				<key>Name</key>
+				<string>Contain Images</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>CSV</key>
+	<dict>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Extention</key>
+		<string>csv</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isMergeCSV</string>
+				<key>Name</key>
+				<string>Merge CSV</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>HTML</key>
+	<dict>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Extention</key>
+		<string>html</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>paneOptions</string>
+				<key>Name</key>
+				<string>Pane Options</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>SinglePage</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Page Navigation By Bookmarks</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>2</integer>
+						<key>Name</key>
+						<string>Multiple Pages</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>2</integer>
+						<key>Name</key>
+						<string>Multipe Pages Split By Bookmarks</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isAllowOCR</string>
+				<key>Name</key>
+				<string>Allow OCR</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>language</string>
+				<key>Name</key>
+				<string>OCR Language</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Chinese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Chinese Traditiional</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>3</integer>
+						<key>Name</key>
+						<string>English</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>4</integer>
+						<key>Name</key>
+						<string>Japanese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>5</integer>
+						<key>Name</key>
+						<string>Korean</string>
+					</dict>
+				</array>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainImages</string>
+				<key>Name</key>
+				<string>Contain Images</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>TXT</key>
+	<dict>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Extention</key>
+		<string>txt</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isAllowOCR</string>
+				<key>Name</key>
+				<string>Allow OCR</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>NSInteger</string>
+				<key>Property</key>
+				<string>language</string>
+				<key>Name</key>
+				<string>OCR Language</string>
+				<key>DefaultValue</key>
+				<real>0</real>
+				<key>Values</key>
+				<array>
+					<dict>
+						<key>Value</key>
+						<integer>0</integer>
+						<key>Name</key>
+						<string>Chinese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>1</integer>
+						<key>Name</key>
+						<string>Chinese Traditiional</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>3</integer>
+						<key>Name</key>
+						<string>English</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>4</integer>
+						<key>Name</key>
+						<string>Japanese</string>
+					</dict>
+					<dict>
+						<key>Value</key>
+						<integer>5</integer>
+						<key>Name</key>
+						<string>Korean</string>
+					</dict>
+				</array>
+			</dict>
+		</array>
+	</dict>
+	<key>JPEG</key>
+	<dict>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Extention</key>
+		<string>jpg</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>int</string>
+				<key>Property</key>
+				<string>imageDpi</string>
+				<key>Name</key>
+				<string>Image DPI</string>
+				<key>DefaultValue</key>
+				<integer>216</integer>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+	<key>PNG</key>
+	<dict>
+		<key>Class</key>
+		<string>AutoTest</string>
+		<key>Extention</key>
+		<string>png</string>
+		<key>Params</key>
+		<array>
+			<dict>
+				<key>ValueType</key>
+				<string>int</string>
+				<key>Property</key>
+				<string>imageDpi</string>
+				<key>Name</key>
+				<string>Image DPI</string>
+				<key>DefaultValue</key>
+				<integer>216</integer>
+			</dict>
+			<dict>
+				<key>ValueType</key>
+				<string>BOOL</string>
+				<key>Property</key>
+				<string>isContainAnnotations</string>
+				<key>Name</key>
+				<string>Contain Annotations</string>
+				<key>DefaultValue</key>
+				<false/>
+			</dict>
+		</array>
+	</dict>
+</dict>
+</plist>

+ 325 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/AdvanceSettingViewController.swift

@@ -0,0 +1,325 @@
+//
+//  AdvanceSettingViewController.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2023/4/17.
+//
+
+import Cocoa
+
+class AdvanceSettingViewController: NSViewController, NSPopoverDelegate {
+    @IBOutlet var m_titleBarView:NSView! // Default is NO
+    @IBOutlet var m_cancelBtn:NSButton!
+    @IBOutlet var m_doneBtn:NSButton!
+    
+    @IBOutlet var m_titleLbl:NSTextField!
+    
+    @IBOutlet var m_nameLbl:NSTextField!
+    @IBOutlet var m_pathLbl:NSTextField!
+    
+    @IBOutlet var m_sepLine:NSView! // Default is NO
+    
+    let m_useOldLibCell = ASBOOLPropertyCell.shared()
+    
+    /**
+     {
+        "Extention" : "xlsx",
+        "Class"     : "AutoTest",
+        "Params"    : [
+                        {
+                            "ValueType" : "NSInteger",
+                            "Property"  : "contentOptions",
+                            "Name"      : "Content Options",
+                            "DefaultValue": @(2)
+                            "Values" : [{"Value":@(0), "Name":"Only Text"},
+                                        {"Value":@(1), "Name":"Only Table"},...
+                                        ]
+                        },
+                         {
+                             "ValueType" : "BOOL",
+                             "Property"  : "isAllowOCR",
+                             "Name"      : "Allow OCR",
+                             "DefaultValue": @(YES)
+                         },
+                        ...
+                       ]
+     }
+     */
+    var m_baseInfo:NSDictionary!
+    
+    /**
+     {
+        "Type":"Others(Old)", // The Folder Name
+        "ID" : "1001", // The ID for Search, private,
+        "Extentiion" : "txt",
+        "Name" : "快照对比(老库)", // Name
+        "Class" : "AutoTest",
+        "Params" : {
+                        "useOldLib" : @(true),
+                        "Options" : [
+                                        {
+                                            "Property" : "contentOptions",
+                                            "ValueType" : "NSInteger",
+                                            "Value": @(2)
+                                        },
+                                        ...
+                                    ]
+                    }
+     }
+     */
+    var m_testCaseInfo:NSMutableDictionary? = nil
+    
+    
+    /** such as CSV/PDF/PNG/JPG etc.
+     */
+    var m_fileType:String? = nil
+    var m_testObj:AutoTest? = nil
+    
+    var m_callBack:(_ testObj:AutoTest?, _ property:NSDictionary) -> () = {(obj, property) in
+        
+    }
+    
+    @IBOutlet var m_propertyCV:NSView!
+    var m_propertyViews = NSMutableArray()
+    
+    var _popover: NSPopover!
+    
+    
+    ///
+    static var sharedASViewController : AdvanceSettingViewController? = nil
+    class func shared() -> AdvanceSettingViewController {
+        if nil == sharedASViewController {
+            var objects : NSArray!
+            
+            Bundle.main.loadNibNamed("AdvanceSettingViewController", owner: nil, topLevelObjects: &objects)
+            
+            for tView in objects {
+                if let tv = tView as? AdvanceSettingViewController {
+                    sharedASViewController = tv
+                }
+            }
+        }
+        
+        return sharedASViewController!
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        // Do view setup here.
+    }
+    
+    override func awakeFromNib() {
+        self.view.wantsLayer = true;
+        self.view.layer?.backgroundColor = .init(gray: 0.98, alpha: 1)
+        
+        m_titleBarView.wantsLayer = true;
+        m_titleBarView.layer?.backgroundColor = .init(gray: 0.9, alpha: 0.8)
+        
+        m_sepLine.wantsLayer = true;
+        m_sepLine.layer?.backgroundColor = .init(gray: 0.5, alpha: 0.5);
+        
+        m_useOldLibCell?.setPropertyInfo(["ValueType":"BOOL",
+                                          "DefaultValue":NSNumber(booleanLiteral: true),
+                                          "Name":"Use Old Lib"
+                                         ])
+        m_useOldLibCell?.setValueChangedCallBack({ value, object in
+            let boolValue = value as! NSNumber
+            
+            for pv in self.m_propertyViews {
+                let propView = pv as! ASPropertyCell?
+                
+                propView?.setEnabled(!boolValue.boolValue)
+            }
+        });
+    }
+    
+    /// Setter
+    func setBaseInfo(_ info:NSDictionary) {
+        /**
+         {
+            class : AutoTest
+            Extention : pdf
+            Params: Aray
+         }
+         */
+        m_baseInfo = info;
+        
+        updateViews()
+    }
+    
+    func setTestCase(_ info:NSMutableDictionary?) {
+        m_testCaseInfo = info;
+        
+        m_doneBtn.title = (m_testCaseInfo == nil) ? "新建" : "保存"
+        
+        m_nameLbl.stringValue = (m_testCaseInfo?.value(forKey: "Name") ?? "") as! String
+        m_pathLbl.isEditable = m_testCaseInfo == nil;
+        m_pathLbl.stringValue = (m_testCaseInfo?.value(forKey: "Type") ?? "") as! String
+        
+        m_useOldLibCell?.setValue(NSNumber(booleanLiteral: false))
+        
+        let params = m_testCaseInfo?.value(forKey: "Params") as? NSDictionary
+        if (params != nil) {
+            let useOldLib = NSDictionary(dictionary: params!).value(forKey: "useOldLib") as? NSNumber
+            if (nil != useOldLib && useOldLib!.boolValue) {
+                m_useOldLibCell?.setValue(useOldLib as AnyObject)
+            }
+        }
+        
+        let boolValue = m_useOldLibCell?.value() as! NSNumber
+        for pv in self.m_propertyViews {
+            let propView = pv as! ASPropertyCell?
+            
+            propView?.setEnabled(!boolValue.boolValue)
+        }
+        
+        updateValues()
+    }
+    
+    func setCallback(_ callback:@escaping (_ testObj:AutoTest?, _ property:NSDictionary) -> ()) {
+        m_callBack = callback
+    }
+    
+    /// Load Views
+    func updateViews() {
+        for view in m_propertyViews {
+            (view as! ASPropertyCell?)!.removeFromSuperview()
+        }
+        m_propertyViews.removeAllObjects()
+        
+        if (m_baseInfo.value(forKey: "Params") != nil) {
+            let propertys = m_baseInfo.value(forKey: "Params") as! NSArray
+            for property in propertys {
+                let cell = ASPropertyCell.propertyCellFor(property as! NSDictionary)
+                
+                if (cell != nil) {
+                    m_propertyViews.add(cell!);
+                    m_propertyCV.addSubview(cell!);
+                }
+            }
+        }
+        m_propertyCV.addSubview(m_useOldLibCell!)
+        
+        let cellCount = m_propertyViews.count + 1
+        self.view.frame = CGRectMake(self.view.frame.origin.x,
+                                     self.view.frame.origin.y,
+                                     self.view.frame.size.width,
+                                     self.view.frame.size.height - self.m_propertyCV.frame.size.height + CGFloat(cellCount * 35)+5)
+        
+        m_useOldLibCell?.frame = CGRectMake(0, 5+CGFloat((cellCount - 1) * 35), self.m_propertyCV.frame.size.width, 35)
+        for pv in m_propertyViews {
+            let propView = pv as! ASPropertyCell?
+            
+            let index = cellCount - 2 - m_propertyViews.index(of: pv)
+            propView?.frame = CGRectMake(0, 5+CGFloat(index * 35), self.m_propertyCV.frame.size.width, 35)
+        }
+    }
+    
+    func updateValues() {
+        let params = m_testCaseInfo?.value(forKey: "Params") as? NSDictionary
+        if (params != nil) {
+            let options = params?.value(forKey: "Options") as? NSArray
+            
+            if (options != nil) {
+                for option in options! {
+                    let par = option as! NSDictionary
+                    
+                    let propertyName = par.value(forKey: "Property") as! String
+                    
+                    for pv in m_propertyViews {
+                        let propView = pv as! ASPropertyCell?
+                        let pv_propertyName = propView?.m_propertyInfo?.value(forKey: "Property") as! String
+                        
+                        if (NSString(string: propertyName).isEqual(to: pv_propertyName)) {
+                            if (par.value(forKey: "Value") != nil) {
+                                propView?.setValue(par.value(forKey: "Value")! as AnyObject)
+                            }
+                            break
+                        }
+                    }
+                }
+            }
+        }
+    }
+    
+    /// Show
+    func showIn(_ view:NSView, rect:NSRect) {
+        if _popover == nil {
+            _popover = NSPopover.init()
+            _popover.contentViewController = self;
+            _popover.delegate = self
+        }
+        _popover.contentSize = self.view.frame.size
+        
+        _popover.show(relativeTo: rect, of: view, preferredEdge: NSRectEdge.maxX)
+    }
+    
+    
+    /// IBAction
+    @IBAction func cancelAction(_ sender:NSButton) {
+        _popover.close()
+    }
+    
+    @IBAction func doneAction(_ sender:NSButton) {
+        let type = self.m_pathLbl.stringValue
+        let name = self.m_nameLbl.stringValue
+        
+        let property = NSMutableDictionary()
+        
+        property.setValue(type, forKey: "Type")
+        property.setValue(name, forKey: "Name")
+        if (m_testCaseInfo != nil) {
+            property.setValue(m_testCaseInfo?.value(forKey: "ID"), forKey: "ID")
+        }
+        property.setValue(m_baseInfo.value(forKey: "Extention"), forKey: "Extention")
+        property.setValue(m_baseInfo.value(forKey: "Class"), forKey: "Class")
+        
+        let params = NSMutableDictionary()
+        property.setValue(params, forKey: "Params")
+        let useOldLib = m_useOldLibCell?.value() as! NSNumber
+        if (useOldLib.boolValue) {
+            params.setValue(useOldLib, forKey: "useOldLib")
+        }else {
+            let options = NSMutableArray()
+            params.setValue(options, forKey: "Options")
+            
+            for pv in m_propertyViews {
+                let propView = pv as! ASPropertyCell?
+                let pv_propertyName = propView?.m_propertyInfo?.value(forKey: "Property") as! String
+                let pv_valueType = propView?.m_propertyInfo?.value(forKey: "ValueType") as! String
+                
+                options.add(["Property": pv_propertyName,
+                             "ValueType":pv_valueType,
+                             "Value":propView!.value()])
+            }
+        }
+        NSLog("property:\(property)")
+        m_callBack(m_testObj, property)
+        
+        _popover.close()
+    }
+    
+    
+    // NSPopoverDelegate
+    func popoverShouldClose(_ popover: NSPopover) -> Bool {
+        return true
+    }
+    
+}
+
+
+extension AdvanceSettingViewController {
+    
+    class func baseInfoFor(_ type:String) -> NSDictionary? {
+        let path = Bundle.main.path(forResource: "AdvanceSettingProperty", ofType: "plist")
+        
+        let asPropertys = try? NSDictionary.init(contentsOfFile: path!)
+        
+        if asPropertys != nil {
+            return asPropertys?.value(forKey: type) as? NSDictionary
+        }
+        
+        return nil
+    }
+    
+}

+ 118 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/AdvanceSettingViewController.xib

@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner">
+            <connections>
+                <outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
+            </connections>
+        </customObject>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="Hz6-mo-xeY">
+            <rect key="frame" x="0.0" y="0.0" width="400" height="306"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
+            <subviews>
+                <customView id="HTm-GH-rqU">
+                    <rect key="frame" x="0.0" y="270" width="400" height="36"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                    <subviews>
+                        <button verticalHuggingPriority="750" id="pmC-9z-umX">
+                            <rect key="frame" x="331" y="1" width="61" height="32"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="push" title="保存" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Kln-Af-jD2">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="doneAction:" target="vIn-MJ-Oxl" id="sw4-Me-LvT"/>
+                            </connections>
+                        </button>
+                        <button verticalHuggingPriority="750" id="iev-DT-Iod">
+                            <rect key="frame" x="13" y="1" width="61" height="32"/>
+                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                            <buttonCell key="cell" type="push" title="取消" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="6bl-3d-f9I">
+                                <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
+                                <font key="font" metaFont="system"/>
+                            </buttonCell>
+                            <connections>
+                                <action selector="cancelAction:" target="vIn-MJ-Oxl" id="4Jk-bk-WPA"/>
+                            </connections>
+                        </button>
+                        <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="7q6-6M-zhb">
+                            <rect key="frame" x="97" y="10" width="215" height="16"/>
+                            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                            <textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="转档参数设置" id="uhk-9T-rhP">
+                                <font key="font" metaFont="system" size="16"/>
+                                <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                                <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                            </textFieldCell>
+                        </textField>
+                    </subviews>
+                </customView>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="CGR-Vz-xOk">
+                    <rect key="frame" x="10" y="246" width="150" height="16"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="测试项名称:" id="uYh-Ek-Lyj">
+                        <font key="font" usesAppearanceFont="YES"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField verticalHuggingPriority="750" id="9qS-h4-7q6">
+                    <rect key="frame" x="161" y="243" width="219" height="21"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="请输入名称" bezelStyle="round" id="fa5-mu-P32">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="zfg-R0-oKb">
+                    <rect key="frame" x="10" y="217" width="150" height="16"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="测试项文件夹:" id="mPc-yn-FfJ">
+                        <font key="font" usesAppearanceFont="YES"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField verticalHuggingPriority="750" id="Ldt-LK-o1o">
+                    <rect key="frame" x="161" y="214" width="219" height="21"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" placeholderString="文件夹路径,例如 Others" bezelStyle="round" id="ykm-cJ-FBx">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <customView id="bQp-XC-Exy">
+                    <rect key="frame" x="0.0" y="200" width="400" height="1"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                </customView>
+                <customView id="0Lu-IC-dfs">
+                    <rect key="frame" x="0.0" y="0.0" width="400" height="200"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                </customView>
+            </subviews>
+            <point key="canvasLocation" x="41.5" y="171"/>
+        </customView>
+        <customObject id="vIn-MJ-Oxl" customClass="AdvanceSettingViewController" customModule="KdanAuto" customModuleProvider="target">
+            <connections>
+                <outlet property="m_cancelBtn" destination="iev-DT-Iod" id="WNn-YP-IQ5"/>
+                <outlet property="m_doneBtn" destination="pmC-9z-umX" id="3nN-5N-Ftt"/>
+                <outlet property="m_nameLbl" destination="9qS-h4-7q6" id="UM7-XV-Gfn"/>
+                <outlet property="m_pathLbl" destination="Ldt-LK-o1o" id="xq0-HE-Cwd"/>
+                <outlet property="m_propertyCV" destination="0Lu-IC-dfs" id="I9u-Zz-AFA"/>
+                <outlet property="m_sepLine" destination="bQp-XC-Exy" id="mkA-nr-7Mm"/>
+                <outlet property="m_titleBarView" destination="HTm-GH-rqU" id="5hZ-bM-wJK"/>
+                <outlet property="m_titleLbl" destination="7q6-6M-zhb" id="cSH-S7-aDC"/>
+                <outlet property="view" destination="Hz6-mo-xeY" id="Dg9-w8-unQ"/>
+            </connections>
+        </customObject>
+    </objects>
+</document>

+ 65 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASBOOLPropertyCell.swift

@@ -0,0 +1,65 @@
+//
+//  ASIntPropertyCell.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2023/4/17.
+//
+
+import Cocoa
+
+class ASBOOLPropertyCell: ASPropertyCell {
+    @IBOutlet var m_checkBtn:NSButton!
+
+    override class func shared() -> ASPropertyCell? {
+        var objects : NSArray!
+        
+        Bundle.main.loadNibNamed("ASBOOLPropertyCell", owner: nil, topLevelObjects: &objects)
+        
+        for tView in objects {
+            if let tv = tView as? ASBOOLPropertyCell {
+                return tv
+            }
+        }
+        
+        return nil
+    }
+    
+    
+    /// Setter
+    override func setPropertyInfo(_ info:NSDictionary) {
+        super.setPropertyInfo(info)
+        
+        self.m_checkBtn.title = "\(info.value(forKey: "Name") ?? ""):"
+        setValue((info.value(forKey: "DefaultValue") ?? "0") as AnyObject)
+    }
+    
+    override func setValue(_ value:AnyObject) {
+        super.setValue(value)
+        
+        if (value as? NSNumber)?.boolValue == true {
+            self.m_checkBtn.state = .on
+        }else {
+            self.m_checkBtn.state = .off
+        }
+    }
+    
+    override func value() -> AnyObject {
+        if (m_checkBtn.state == .on) {
+            return NSNumber(booleanLiteral: true)
+        }
+        return NSNumber(booleanLiteral: false)
+    }
+    
+    override func setEnabled(_ enabled:Bool) {
+        super.setEnabled(enabled)
+        
+        self.alphaValue = enabled ? 1 : 0.8
+        self.m_checkBtn.isEnabled = enabled;
+    }
+    
+    
+    ///IBAction
+    @IBAction func valueChanged(_ sender:NSButton) {
+        m_valueChange(self.value(), self)
+    }
+}

+ 34 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASBOOLPropertyCell.xib

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner"/>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe" customClass="ASBOOLPropertyCell" customModule="KdanAuto" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="537" height="35"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+            <subviews>
+                <button verticalHuggingPriority="750" id="Ftg-ui-Mvq">
+                    <rect key="frame" x="10" y="9" width="170" height="18"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <buttonCell key="cell" type="check" title="Check" bezelStyle="regularSquare" imagePosition="trailing" alignment="right" state="on" inset="2" id="jAk-8y-UxE">
+                        <behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
+                        <font key="font" metaFont="system"/>
+                    </buttonCell>
+                    <connections>
+                        <action selector="valueChanged:" target="c22-O7-iKe" id="N6V-Be-xcd"/>
+                    </connections>
+                </button>
+            </subviews>
+            <connections>
+                <outlet property="m_checkBtn" destination="Ftg-ui-Mvq" id="TIl-Hm-vVa"/>
+            </connections>
+            <point key="canvasLocation" x="142.5" y="31.5"/>
+        </customView>
+    </objects>
+</document>

+ 58 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASFloatPropertyCell.swift

@@ -0,0 +1,58 @@
+//
+//  ASIntPropertyCell.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2023/4/17.
+//
+
+import Cocoa
+
+class ASFloatPropertyCell: ASPropertyCell {
+    @IBOutlet var m_titleLbl:NSTextField!
+    @IBOutlet var m_valueLbl:NSTextField!
+
+    override class func shared() -> ASPropertyCell? {
+        var objects : NSArray!
+        
+        Bundle.main.loadNibNamed("ASFloatPropertyCell", owner: nil, topLevelObjects: &objects)
+        
+        for tView in objects {
+            if let tv = tView as? ASFloatPropertyCell {
+                return tv
+            }
+        }
+        
+        return nil
+    }
+    
+    
+    /// Setter
+    override func setPropertyInfo(_ info:NSDictionary) {
+        super.setPropertyInfo(info)
+        
+        self.m_titleLbl.stringValue = "\(info.value(forKey: "Name") ?? ""):"
+        setValue((info.value(forKey: "DefaultValue") ?? "0") as AnyObject)
+    }
+    
+    override func setValue(_ value:AnyObject) {
+        super.setValue(value)
+        
+        if (value as? NSNumber) != nil {
+            self.m_valueLbl.stringValue = "\((value as! NSNumber).floatValue)"
+        }else if ((value as? String) != nil) {
+            self.m_valueLbl.stringValue = "\((value as! NSString).floatValue)"
+        }
+    }
+    
+    override func value() -> AnyObject {
+        return NSNumber(value: NSString(string: self.m_valueLbl.stringValue).floatValue)
+    }
+    
+    override func setEnabled(_ enabled:Bool) {
+        super.setEnabled(enabled)
+        
+        self.alphaValue = enabled ? 1 : 0.6
+        self.m_valueLbl.isEnabled = enabled;
+    }
+    
+}

+ 42 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASFloatPropertyCell.xib

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner"/>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe" customClass="ASFloatPropertyCell" customModule="KdanAuto" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="537" height="35"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="6Ly-h0-iEb">
+                    <rect key="frame" x="10" y="10" width="150" height="16"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="OCR Language:" id="WSS-P2-qfE">
+                        <font key="font" usesAppearanceFont="YES"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField verticalHuggingPriority="750" id="bvQ-r4-93y">
+                    <rect key="frame" x="162" y="7" width="361" height="21"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="left" bezelStyle="round" id="b1f-P0-XSh">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+            </subviews>
+            <connections>
+                <outlet property="m_titleLbl" destination="6Ly-h0-iEb" id="0h9-zk-dHQ"/>
+                <outlet property="m_valueLbl" destination="bvQ-r4-93y" id="Po4-xf-Ruz"/>
+            </connections>
+            <point key="canvasLocation" x="142.5" y="31.5"/>
+        </customView>
+    </objects>
+</document>

+ 59 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASIntPropertyCell.swift

@@ -0,0 +1,59 @@
+//
+//  ASIntPropertyCell.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2023/4/17.
+//
+
+import Cocoa
+
+class ASIntPropertyCell: ASPropertyCell, NSTextFieldDelegate {
+    @IBOutlet var m_titleLbl:NSTextField!
+    @IBOutlet var m_valueLbl:NSTextField!
+
+    override class func shared() -> ASPropertyCell? {
+        var objects : NSArray!
+        
+        Bundle.main.loadNibNamed("ASIntPropertyCell", owner: nil, topLevelObjects: &objects)
+        
+        for tView in objects {
+            if let tv = tView as? ASIntPropertyCell {
+                return tv
+            }
+        }
+        
+        return nil
+    }
+    
+    
+    /// Setter
+    override func setPropertyInfo(_ info:NSDictionary) {
+        super.setPropertyInfo(info)
+        
+        self.m_titleLbl.stringValue = "\(info.value(forKey: "Name") ?? ""):"
+        setValue((info.value(forKey: "DefaultValue") ?? "0") as AnyObject)
+    }
+    
+    override func setValue(_ value:AnyObject) {
+        super.setValue(value)
+        
+        if (value as? NSNumber) != nil {
+            self.m_valueLbl.stringValue = "\((value as! NSNumber).intValue)"
+        }else if ((value as? String) != nil) {
+            self.m_valueLbl.stringValue = "\((value as! NSString).intValue)"
+        }
+    }
+    
+    override func value() -> AnyObject {
+        return NSNumber(value: NSString(string: self.m_valueLbl.stringValue).intValue)
+    }
+    
+    
+    override func setEnabled(_ enabled:Bool) {
+        super.setEnabled(enabled)
+        
+        self.alphaValue = enabled ? 1 : 0.6
+        self.m_valueLbl.isEnabled = enabled;
+    }
+    
+}

+ 42 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASIntPropertyCell.xib

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner"/>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe" customClass="ASIntPropertyCell" customModule="KdanAuto" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="537" height="35"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="6Ly-h0-iEb">
+                    <rect key="frame" x="10" y="10" width="150" height="16"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="OCR Language:" id="WSS-P2-qfE">
+                        <font key="font" usesAppearanceFont="YES"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <textField verticalHuggingPriority="750" fixedFrame="YES" id="bvQ-r4-93y">
+                    <rect key="frame" x="162" y="6" width="355" height="21"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="left" bezelStyle="round" id="b1f-P0-XSh">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+            </subviews>
+            <connections>
+                <outlet property="m_titleLbl" destination="6Ly-h0-iEb" id="0h9-zk-dHQ"/>
+                <outlet property="m_valueLbl" destination="bvQ-r4-93y" id="Po4-xf-Ruz"/>
+            </connections>
+            <point key="canvasLocation" x="142.5" y="31.5"/>
+        </customView>
+    </objects>
+</document>

+ 107 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASPropertyCell.swift

@@ -0,0 +1,107 @@
+//
+//  ASPropertyCell.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2023/4/17.
+//
+
+import Cocoa
+
+class ASPropertyCell: NSView {
+    var m_propertyInfo:NSDictionary? = nil
+    
+    var m_enabled:Bool = true
+    
+    var m_valueChange: (_ value:AnyObject, _ object:ASPropertyCell?) -> () = {(value, object) in
+        
+    }
+    
+    class func propertyCellFor(_ info:NSDictionary) -> ASPropertyCell? {
+        let valueType = info.value(forKey: "ValueType") as! String
+        
+        var object : ASPropertyCell? = nil;
+        
+        if (NSArray(array: ["BOOL", "bool"]).contains(valueType)) {
+            object = ASBOOLPropertyCell.shared()
+        }else if (NSArray(array: ["int",
+                                  "size_t",
+                                  "uint8_t",
+                                  "int16_t",
+                                  "uint16_t",
+                                  "int32_t",
+                                  "uint32_t",
+                                  "int64_t",
+                                 "uint64_t",
+                                 "NSInteger",
+                                 "NSUInteger"]).contains(valueType)) {
+            if (info.value(forKey: "Values") == nil){
+                object = ASIntPropertyCell.shared()
+            }else {
+                object = ASSelectPropertyCell.shared()
+            }
+        }else if (NSArray(array: ["float",
+                                  "double"]).contains(valueType)) {
+            if (info.value(forKey: "Values") == nil){
+                object = ASFloatPropertyCell.shared()
+            }else {
+                object = ASSelectPropertyCell.shared()
+            }
+        }else if (NSArray(array: ["CGSize", "NSSize"]).contains(valueType)) {
+            
+        }else if (NSArray(array: ["CGRect", "NSRect"]).contains(valueType)) {
+            
+        }
+        
+        if (object != nil) {
+            object?.setPropertyInfo(info)
+            return object
+        }
+        
+        return nil
+    }
+    
+    class func shared() -> ASPropertyCell? {
+        
+        var objects : NSArray!
+        
+        Bundle.main.loadNibNamed("ASPropertyCell", owner: nil, topLevelObjects: &objects)
+        
+        for tView in objects {
+            if let tv = tView as? ASPropertyCell {
+                return tv
+            }
+        }
+        
+        return nil
+    }
+    
+    /// Setter
+    func setPropertyInfo(_ info:NSDictionary) {
+        m_propertyInfo = info;
+    }
+    
+    func propertyInfo() -> NSDictionary {
+        return m_propertyInfo ?? NSDictionary()
+    }
+    
+    func setValue(_ value:AnyObject) {
+        
+    }
+    
+    func value() -> AnyObject {
+        return NSNumber(value: 0)
+    }
+    
+    func setEnabled(_ enabled:Bool) {
+        m_enabled = enabled;
+        
+    }
+    
+    func enabled() -> Bool {
+        return m_enabled
+    }
+    
+    func setValueChangedCallBack(_ callBack:@escaping (_ value:AnyObject, _ object:ASPropertyCell?) -> ()) {
+        m_valueChange = callBack
+    }
+}

+ 18 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASPropertyCell.xib

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner"/>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe" customClass="ASPropertyCell" customModule="KdanAuto" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="502" height="35"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+            <point key="canvasLocation" x="125" y="34.5"/>
+        </customView>
+    </objects>
+</document>

+ 86 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASSelectPropertyCell.swift

@@ -0,0 +1,86 @@
+//
+//  ASIntPropertyCell.swift
+//  KdanAuto
+//
+//  Created by 朱东勇 on 2023/4/17.
+//
+
+import Cocoa
+
+class ASSelectPropertyCell: ASPropertyCell {
+    @IBOutlet var m_titleLbl:NSTextField!
+    @IBOutlet var m_comboBox:NSComboBox!
+
+    override class func shared() -> ASPropertyCell? {
+        var objects : NSArray!
+        
+        Bundle.main.loadNibNamed("ASSelectPropertyCell", owner: nil, topLevelObjects: &objects)
+        
+        for tView in objects {
+            if let tv = tView as? ASSelectPropertyCell {
+                return tv
+            }
+        }
+        
+        return nil
+    }
+    
+    
+    /// Setter
+    override func setPropertyInfo(_ info:NSDictionary) {
+        super.setPropertyInfo(info)
+        
+        loadComboxItem()
+        
+        self.m_titleLbl.stringValue = "\(info.value(forKey: "Name") ?? ""):"
+        setValue((info.value(forKey: "DefaultValue") ?? "0") as AnyObject)
+    }
+    
+    override func setValue(_ value:AnyObject) {
+        super.setValue(value)
+        
+        let values = self.m_propertyInfo?.value(forKey: "Values") as? [NSDictionary]
+        if (values != nil) {
+            for tValue in values! {
+                if ((tValue.value(forKey: "Value") as! AnyObject).isEqual(to: value)) {
+                    let index = values!.firstIndex(of: tValue) ?? 0
+                    
+                    if (index != NSNotFound) {
+                        self.m_comboBox.selectItem(at: index);
+                    }
+                }
+            }
+        }
+    }
+    
+    override func value() -> AnyObject {
+        let index = self.m_comboBox.indexOfSelectedItem
+        
+        let values = self.m_propertyInfo?.value(forKey: "Values") as! [NSDictionary]
+        
+        if (values.count > index) {
+            return ((values[index] as NSDictionary).value(forKey: "Value") as? AnyObject) ?? NSNumber(value: 0)
+        }
+        return NSNumber(value: 0)
+    }
+    
+    override func setEnabled(_ enabled:Bool) {
+        super.setEnabled(enabled)
+        
+        self.alphaValue = enabled ? 1 : 0.6
+        self.m_comboBox.isEnabled = enabled;
+    }
+    
+    
+    /// load Items
+    func loadComboxItem() {
+        m_comboBox.removeAllItems()
+        
+        let values = self.m_propertyInfo?.value(forKey: "Values") as! [NSDictionary]
+        for value in values {
+            m_comboBox.addItem(withObjectValue: value.value(forKey: "Name"))
+        }
+    }
+    
+    
+}

+ 47 - 0
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASSelectPropertyCell.xib

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+    <dependencies>
+        <deployment identifier="macosx"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <customObject id="-2" userLabel="File's Owner"/>
+        <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
+        <customObject id="-3" userLabel="Application" customClass="NSObject"/>
+        <customView id="c22-O7-iKe" customClass="ASSelectPropertyCell" customModule="KdanAuto" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="537" height="35"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+            <subviews>
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="6Ly-h0-iEb">
+                    <rect key="frame" x="10" y="10" width="150" height="16"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" lineBreakMode="clipping" alignment="right" title="OCR Language:" id="WSS-P2-qfE">
+                        <font key="font" usesAppearanceFont="YES"/>
+                        <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
+                <comboBox verticalHuggingPriority="750" fixedFrame="YES" id="yrT-UH-aJd">
+                    <rect key="frame" x="174" y="4" width="346" height="23"/>
+                    <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
+                    <comboBoxCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" completes="NO" numberOfVisibleItems="5" id="YnP-SE-hbn">
+                        <font key="font" metaFont="system"/>
+                        <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                        <objectValues>
+                            <string>Item 1</string>
+                            <string>Item 2</string>
+                            <string>Item 3</string>
+                        </objectValues>
+                    </comboBoxCell>
+                </comboBox>
+            </subviews>
+            <connections>
+                <outlet property="m_comboBox" destination="yrT-UH-aJd" id="ORM-jG-Axt"/>
+                <outlet property="m_titleLbl" destination="6Ly-h0-iEb" id="0h9-zk-dHQ"/>
+            </connections>
+            <point key="canvasLocation" x="142.5" y="31.5"/>
+        </customView>
+    </objects>
+</document>

+ 155 - 12
KdanAutoTest/KdanAuto/Class/AutoTestCase/AutoTest.swift

@@ -16,7 +16,9 @@ class AutoTest : NSObject, AutoTestProtocal {
     
     public var _status :  AutoTestStatus = .Normal
     
+    var m_info:NSDictionary!
     var _fileType : String = "RTF"
+    var m_id : String = ""
     var _type : String = "Others"
     var _extention : String = "rtf"
     var _name : String = "对照测试"
@@ -32,35 +34,44 @@ class AutoTest : NSObject, AutoTestProtocal {
         
     }
     
-    class func autoTestFor(_ fileType:NSString ,type:NSString) -> AutoTest? {
-        let key = String(fileType) + "." + String(type)
+    class func autoTestFor(_ fileType:NSString ,id:NSString) -> AutoTest? {
+        let key = String(fileType)
+        let ID = String(id)
         
         if cacheObjects.value(forKey: key) != nil {
-            let object = cacheObjects.value(forKey: key)
+            let objectInfo = cacheObjects.value(forKey: key) as! NSMutableDictionary
             
-            return object as? AutoTest
+            if objectInfo.value(forKey: ID) != nil {
+                let object = objectInfo.value(forKey: ID)
+                
+                return object as? AutoTest
+            }
         }
         
-//        if  let cacheObject as AutoTest {
-//            return cacheObject
-//        }
-        
         let fileTypes = testTypeInfo[fileType] as! NSArray
-        
         let clsname = "KdanAuto"//Bundle.main.infoDictionary! ["CFBundleExecutable"]
         
+        var objectInfo = cacheObjects.value(forKey: key) as? NSMutableDictionary
+        if (nil == objectInfo) {
+            objectInfo = NSMutableDictionary()
+            cacheObjects.setValue(objectInfo, forKey: key)
+        }
+        
         for item in fileTypes {
             let cItem = item as! NSDictionary
             
+            let cID = cItem["ID"] as! NSString
             let cType = cItem["Type"] as! NSString
             let cExtention = cItem["Extention"] as! NSString
             let cName = cItem["Name"] as! NSString
             let cParams = cItem["Params"] as? NSDictionary
-            if (cType.isEqual(to: type)) {
+            if (cID.isEqual(to: ID)) {
                 let className = String((clsname )+"."+(cItem["Class"] as! String))
                 let cl = NSClassFromString(className) as! AutoTest.Type
                 
                 let object = cl.shared()
+                object?.m_id = cID as String
+                object?.m_info = cItem
                 object?._fileType = fileType as String
                 object?._type = String(cType)
                 object?._extention = String(cExtention)
@@ -68,7 +79,7 @@ class AutoTest : NSObject, AutoTestProtocal {
                 if nil != cParams {
                     object?._params = cParams ?? [:];
                 }
-                cacheObjects.setValue(object, forKey: key)
+                objectInfo!.setValue(object, forKey: ID)
                 
                 return object
             }
@@ -76,11 +87,12 @@ class AutoTest : NSObject, AutoTestProtocal {
         
         let object = AutoTest.shared()
         
+        object?.m_id = id as String
         object?._fileType = fileType as String
         object?._type = String(cType)
         object?._extention = ""
         object?._name = "对照测试"
-        cacheObjects.setValue(object, forKey: key)
+        objectInfo!.setValue(object, forKey: ID)
         
         return object
     }
@@ -938,3 +950,134 @@ extension AutoTest {
     }
 }
 
+
+let kAutoTestObjectUpdateNotification = "kAutoTestObjectUpdateNotification"
+extension AutoTest {
+    
+    class func dateString() -> String {
+        let date = NSDate.now
+        
+        return NSString(format: "%.0f", date.timeIntervalSince1970) as String
+    }
+    
+    class func createObject(_ fileType:NSString, property:NSDictionary) -> AutoTest? {
+        let key = fileType as String
+        var ID = property.value(forKey: "ID") as? String
+        
+        if nil != ID && cacheObjects.value(forKey: key) != nil {
+            let objectInfo = cacheObjects.value(forKey: key) as! NSMutableDictionary
+            
+            if objectInfo.value(forKey: ID!) != nil {
+                let object = objectInfo.value(forKey: ID!)
+                
+                return object as? AutoTest
+            }
+        }
+        
+        var objectInfo = cacheObjects.value(forKey: key) as? NSMutableDictionary
+        if (nil == objectInfo) {
+            objectInfo = NSMutableDictionary()
+            cacheObjects.setValue(objectInfo, forKey: key)
+        }
+        
+        let params = NSMutableDictionary(dictionary: property)
+        if nil == ID {
+            ID = AutoTest.dateString()
+            params.setValue(ID!, forKey: "ID")
+        }
+        
+        let cID = params["ID"] as! NSString
+        let cType = params["Type"] as! NSString
+        let cExtention = params["Extention"] as! NSString
+        let cName = params["Name"] as! NSString
+        let cParams = params["Params"] as? NSDictionary
+        
+        let clsname = "KdanAuto"//Bundle.main.infoDictionary! ["CFBundleExecutable"]
+        let className = String((clsname )+"."+(params["Class"] as! String))
+        let cl = NSClassFromString(className) as! AutoTest.Type
+        
+        let object = cl.shared()
+        object?.m_id = cID as String
+        object?.m_info = params
+        object?._fileType = fileType as String
+        object?._type = String(cType)
+        object?._extention = String(cExtention)
+        object?._name = String(cName)
+        if nil != cParams {
+            object?._params = cParams ?? [:];
+        }
+        objectInfo!.setValue(object, forKey: ID!)
+        
+        AutoTest.saveObjects()
+        
+        return object
+    }
+    
+    func update(_ property:NSDictionary) {
+        let cID = property["ID"] as! NSString
+        let cType = property["Type"] as! NSString
+        let cExtention = property["Extention"] as! NSString
+        let cName = property["Name"] as! NSString
+        let cParams = property["Params"] as? NSDictionary
+        
+        self.m_id = cID as String
+        self.m_info = property
+        self._type = String(cType)
+        self._extention = String(cExtention)
+        self._name = String(cName)
+        if nil != cParams {
+            self._params = cParams ?? [:];
+        }
+        
+        AutoTest.saveObjects()
+    }
+    
+    func delete() {
+        let key = self.fileType() as String
+        var ID = self.m_id as? String
+        
+        if nil != ID && cacheObjects.value(forKey: key) != nil {
+            let objectInfo = cacheObjects.value(forKey: key) as! NSMutableDictionary
+            
+            if objectInfo.value(forKey: ID!) != nil {
+                let object = objectInfo.value(forKey: ID!)
+                
+                objectInfo.setValue(nil, forKey: ID!)
+            }
+            
+            AutoTest.saveObjects()
+        }
+    }
+    
+    class func saveObjects() {
+        let propertyInfo = NSMutableDictionary();
+        
+        for key in testFileTypes {
+            let fileType = key
+            
+            let property = NSMutableArray()
+            propertyInfo.setValue(property, forKey: fileType)
+            
+            let objectInfo = cacheObjects.value(forKey: key) as? NSMutableDictionary
+            if (objectInfo != nil) {
+                for obj in objectInfo!.allValues {
+                    let object = obj as? AutoTest
+                    
+                    if (object?.m_info != nil) {
+                        property.add(object!.m_info)
+                    }
+                }
+            }
+        }
+        
+        var path = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true).first?.appending("/CustomAutoTestProperty.plist")
+        NSLog("Save Path:\(path)")
+        
+        propertyInfo.write(toFile: path!, atomically: true)
+        
+        testTypeInfo = propertyInfo as NSDictionary
+        
+        NotificationCenter.default.post(name: NSNotification.Name(kAutoTestObjectUpdateNotification), object: nil)
+    }
+    
+}

File diff suppressed because it is too large
+ 392 - 347
KdanAutoTest/KdanAuto/Class/AutoTestCase/AutoTestProperty.plist


+ 1 - 1
KdanAutoTest/KdanAuto/Class/Norrmal/ActivityView/ActivityView.swift

@@ -164,7 +164,7 @@ class ActivityView : NSView {
 //                                          userInfo: nil, repeats: true)
         }
         case .Finished: do {
-            _titleLbl.stringValue = NSString(format: "完成 %.0f%%", _degree) as String
+            _titleLbl.stringValue = NSString(format: "完成 %.0f%%", floor(_degree)) as String
             
             if fabs(_degree-100)>=0.1 {
                 _titleLbl.textColor = NSColor.red

+ 101 - 1
KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestCaseCellView.swift

@@ -12,7 +12,7 @@ public protocol TestCaseCellViewDelegate : NSObjectProtocol {
     func selectKeyDidUpdate(_ cell:NSTableCellView?)
 }
 
-class TestCaseCellView : NSTableCellView {
+class TestCaseCellView : NSTableCellView, NSMenuDelegate {
     @IBOutlet var _titleLbl : NSTextField!
     @IBOutlet var _keyContentView : NSView!
     @IBOutlet var _sepLine : NSView!
@@ -27,6 +27,13 @@ class TestCaseCellView : NSTableCellView {
     var _title : String!
     var _checkKeys : NSArray!
     
+    // Menu Item
+    var m_modifyItem:NSMenuItem!
+    var m_clearOriginItem:NSMenuItem!
+    var m_clearCheckItem:NSMenuItem!
+    var m_clearResultItem:NSMenuItem!
+    var m_deleteItem:NSMenuItem!
+    
     var delegate : TestCaseCellViewDelegate?
     
     class func shared() -> TestCaseCellView? {
@@ -46,6 +53,54 @@ class TestCaseCellView : NSTableCellView {
     override func awakeFromNib() {
         _sepLine.wantsLayer = true;
         _sepLine.layer?.backgroundColor = NSColor.lightGray.cgColor
+        
+        
+        let _menu = NSMenu(title: "")
+        
+        m_modifyItem = NSMenuItem.init(title: "高级设置",
+                                      action:#selector(self.setting(_:)), keyEquivalent: "")
+        m_modifyItem.target = self;
+        _menu.addItem(m_modifyItem)
+        
+        _menu.addItem(NSMenuItem.separator())
+        
+        m_clearOriginItem = NSMenuItem.init(title: "清除原文件",
+                                       action:#selector(self.clearOrigin(_:)), keyEquivalent: "")
+        m_clearOriginItem.target = self;
+        _menu.addItem(m_clearOriginItem)
+        
+        m_clearResultItem = NSMenuItem.init(title: "清除结果文件",
+                                            action:#selector(self.clearResult(_:)), keyEquivalent: "")
+        m_clearResultItem.target = self;
+        _menu.addItem(m_clearResultItem)
+        
+        m_clearCheckItem = NSMenuItem.init(title: "清除对照文件",
+                                            action:#selector(self.clearCheck(_:)), keyEquivalent: "")
+        m_clearCheckItem.target = self;
+        _menu.addItem(m_clearCheckItem)
+        
+        _menu.addItem(NSMenuItem.separator())
+        m_deleteItem = NSMenuItem.init(title: "删除测试项",
+                                       action:#selector(self.delete(_:)), keyEquivalent: "")
+        m_deleteItem.target = self;
+        _menu.addItem(m_deleteItem)
+        
+        self.menu = _menu
+        self.menu?.delegate = self;
+        
+        NSEvent.addLocalMonitorForEvents(matching: NSEvent.EventTypeMask.rightMouseUp) { event in
+            var point = event.locationInWindow;
+            if (nil != self.window?.contentView) {
+                point = self.window!.contentView!.convert(point, to: self)
+                
+                if (event.type == .rightMouseUp && CGRectContainsPoint(self.bounds, point)) {
+                    NSMenu.popUpContextMenu(self.menu!, with: event, for: self)
+                    return nil;
+                }
+            }
+            
+            return event
+        }
     }
     
     // Setter & Getter
@@ -154,6 +209,7 @@ class TestCaseCellView : NSTableCellView {
         _reportBtn.isHidden = (ActivityStatus(rawValue: (_autoTestObj?.status())!.rawValue) ?? .Normal) != .Finished
     }
     
+    
     // IBAction
     @IBAction func toggleAction(_ sender:NSButton) {
         if _autoTestObj != nil {
@@ -187,4 +243,48 @@ class TestCaseCellView : NSTableCellView {
         
     }
     
+    @IBAction func setting(_ sender:NSMenuItem) {
+        if (_autoTestObj != nil) {
+            let vc = AdvanceSettingViewController.shared()
+            
+            let info = AdvanceSettingViewController.baseInfoFor(_autoTestObj!._fileType)
+            
+            if (info != nil) {
+                vc.m_fileType = _autoTestObj!._fileType
+                vc.setBaseInfo(info!)
+                vc.setTestCase(_autoTestObj!.m_info as! NSMutableDictionary)
+                vc.m_testObj = _autoTestObj
+                vc.setCallback { obj, property in
+                    obj?.update(property)
+                }
+                
+                let point = self.convert(CGPoint(x: 0, y: 0),
+                                           to: self.window?.contentView ?? self)
+                vc.showIn(self.window?.contentView ?? self, rect: NSRect.init(origin: point, size: self.frame.size))
+            }
+        }
+    }
+    
+    @IBAction func clearOrigin(_ sender:NSMenuItem) {
+        if (_autoTestObj != nil) {
+            _autoTestObj?.clearOriginFiles()
+        }
+    }
+    
+    @IBAction func clearResult(_ sender:NSMenuItem) {
+        if (_autoTestObj != nil) {
+            _autoTestObj?.clearCacheFiles()
+        }
+    }
+    
+    @IBAction func clearCheck(_ sender:NSMenuItem) {
+        if (_autoTestObj != nil) {
+            _autoTestObj?.clearCompareFiles()
+        }
+    }
+    
+    @IBAction func delete(_ sender:NSMenuItem) {
+        _autoTestObj?.delete()
+    }
+    
 }

+ 1 - 1
KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestFileCellView.swift

@@ -173,7 +173,7 @@ class TestFileCellView : NSTableCellView, NSMenuDelegate {
             _testReportBtn.contentTintColor = NSColor.gray
         }
         
-        _testReportBtn.title = NSString(format: "%.0f%%", _degree) as String
+        _testReportBtn.title = NSString(format: "%.0f%%", floor(_degree)) as String
     }
     
     // IBActionn

+ 1 - 1
KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestFileCellView.xib

@@ -48,7 +48,7 @@
                         <action selector="showReportAction:" target="Ob6-j8-aNh" id="m1v-7B-LUA"/>
                     </connections>
                 </button>
-                <progressIndicator hidden="YES" fixedFrame="YES" maxValue="100" displayedWhenStopped="NO" indeterminate="YES" controlSize="small" style="spinning" id="sSA-JI-nga">
+                <progressIndicator hidden="YES" maxValue="100" displayedWhenStopped="NO" indeterminate="YES" controlSize="small" style="spinning" id="sSA-JI-nga">
                     <rect key="frame" x="314" y="7" width="16" height="16"/>
                     <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
                 </progressIndicator>

+ 50 - 1
KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestFileTypeCellView.swift

@@ -8,7 +8,7 @@
 import Foundation
 import AppKit
 
-class TestFileTypeCellView : NSTableCellView {
+class TestFileTypeCellView : NSTableCellView, NSMenuDelegate {
     @IBOutlet var _titleLbl : NSTextField!
     @IBOutlet var _sepLine : NSView!
     
@@ -33,9 +33,36 @@ class TestFileTypeCellView : NSTableCellView {
         return DataModel.shared.isExpand(fileType)
     }
     
+    
+    var m_nMenuItem:NSMenuItem!
     override func awakeFromNib() {
         _sepLine.wantsLayer = true;
         _sepLine.layer?.backgroundColor = NSColor.lightGray.cgColor
+        
+        
+        let _menu = NSMenu(title: "")
+        // Show In Finder
+        m_nMenuItem = NSMenuItem.init(title: "新建[PDF 转 \(_title)]测试项",
+                                      action:#selector(self.createTestItem(_:)), keyEquivalent: "")
+        m_nMenuItem.target = self;
+        _menu.addItem(m_nMenuItem)
+        
+        self.menu = _menu
+        self.menu?.delegate = self;
+        
+        NSEvent.addLocalMonitorForEvents(matching: NSEvent.EventTypeMask.rightMouseUp) { event in
+            var point = event.locationInWindow;
+            if (nil != self.window?.contentView) {
+                point = self.window!.contentView!.convert(point, to: self)
+                
+                if (event.type == .rightMouseUp && CGRectContainsPoint(self.bounds, point)) {
+                    NSMenu.popUpContextMenu(self.menu!, with: event, for: self)
+                    return nil;
+                }
+            }
+            
+            return event
+        }
     }
     
     // Setter & Getter
@@ -43,6 +70,7 @@ class TestFileTypeCellView : NSTableCellView {
         _title = title;
         
         _titleLbl.stringValue = _title ?? ""
+        m_nMenuItem.title = "新建[转 \(title)]测试项"
     }
     
     public func title() -> String? {
@@ -62,4 +90,25 @@ class TestFileTypeCellView : NSTableCellView {
     public func isExpand() -> Bool {
         return _isExpad
     }
+    
+    //IBAction
+    @IBAction func createTestItem(_ sender:NSMenuItem) {
+        let fileType = self.title()!
+        let vc = AdvanceSettingViewController.shared()
+        
+        let info = AdvanceSettingViewController.baseInfoFor(fileType)
+        
+        if (info != nil) {
+            vc.m_fileType = fileType
+            vc.setBaseInfo(info!)
+            vc.setTestCase(nil)
+            vc.setCallback { obj, property in
+                AutoTest.createObject(fileType as NSString, property: property)
+            }
+            
+            let point = self.convert(CGPoint(x: 0, y: 0),
+                                     to: self.window?.contentView ?? self)
+            vc.showIn(self.window?.contentView ?? self, rect: NSRect.init(origin: point, size: self.frame.size))
+        }
+    }
 }

+ 27 - 0
KdanAutoTest/KdanAuto/Class/Setting/Command Line Tool.sh

@@ -0,0 +1,27 @@
+$InFolder=$1
+
+#切换到当前目录
+cd "$InFolder"
+
+
+##执行分割
+#获取目录下面的所有文件列表
+#$items = Get-ChildItem  -Path "C:\temp" -Filter "*ä*" -Recurse | Select -Expand FullName
+$sitems = Get-ChildItem  -Path .\split | Select FullName
+
+#循环获取 Items 中的值
+foreach ($item in $sitems){
+    splitconfit.txt $item
+}
+
+
+##执行高亮
+#获取目录下面的所有文件列表
+#$items = Get-ChildItem  -Path "C:\temp" -Filter "*ä*" -Recurse | Select -Expand FullName
+$hitems = Get-ChildItem  -Path .\hilight | Select FullName
+
+#循环获取 Items 中的值
+foreach ($item in $hitems){
+    hilightconfit.txt $item
+}
+

+ 3 - 22
KdanAutoTest/KdanAuto/Class/Tools/FileConveter/FileConverter.swift

@@ -360,30 +360,11 @@ class FileConverter : NSObject, CPDFConverterDelegate, CPDFConverterFPDelegate {
     // Config Options Tools
     func configForOptions(_ inOptions:CPDFConvertOptions?, inParams:NSDictionary?) {
         // Fetch Options Info
-        let versionInfo = NSDictionary(dictionary: (inParams?.value(forKey: "Options") as? [AnyHashable:Any]) ?? [:])
+        let params = NSArray(array: (inParams?.value(forKey: "Options") as? [NSDictionary] ?? []))
         
         // options is not empty or nil
-        if (versionInfo.allKeys.count > 0) {
-            var allVersions = versionInfo.allKeys
-            
-            // Sort versions (by release date)
-            allVersions = allVersions.sorted(by: { version1, version2 in
-                let value1 = NSString(string: version1 as! String).integerValue
-                let value2 = NSString(string: version2 as! String).integerValue
-                
-                return (value1 < value2);
-            });
-            
-            for version in allVersions {
-                if (self.m_currentVersion >= NSString(string: version as! String).integerValue) {
-                    // config params for version
-                    let prams = versionInfo.value(forKey: version as! String) as! NSArray
-                    
-                    for param in prams {
-                        PerformSelectTool.performSelector(inOptions as Any, params: param as! [AnyHashable : Any]);
-                    }
-                }
-            }
+        for param in params {
+            PerformSelectTool.performSelector(inOptions as Any, params: param as! [AnyHashable : Any]);
         }
     }
     

二進制
KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion(1.6.0).framework/Versions/A/ComPDFKit_Conversion


+ 5 - 7
KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion(1.6.0).framework/Versions/A/Resources/Info.plist

@@ -3,13 +3,13 @@
 <plist version="1.0">
 <dict>
 	<key>BuildMachineOSBuild</key>
-	<string>22A400</string>
+	<string>21F79</string>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleExecutable</key>
 	<string>ComPDFKit_Conversion</string>
 	<key>CFBundleIdentifier</key>
-	<string>com.comdocumentaikit.ComDocumentAIKit.ComPDFKit-Conversion-OCR-macOS-Protected-</string>
+	<string>com.compdfkit.conversion</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
@@ -27,7 +27,7 @@
 	<key>DTCompiler</key>
 	<string>com.apple.compilers.llvm.clang.1_0</string>
 	<key>DTPlatformBuild</key>
-	<string>14A400</string>
+	<string>13F100</string>
 	<key>DTPlatformName</key>
 	<string>macosx</string>
 	<key>DTPlatformVersion</key>
@@ -37,12 +37,10 @@
 	<key>DTSDKName</key>
 	<string>macosx12.3</string>
 	<key>DTXcode</key>
-	<string>1401</string>
+	<string>1341</string>
 	<key>DTXcodeBuild</key>
-	<string>14A400</string>
+	<string>13F100</string>
 	<key>LSMinimumSystemVersion</key>
 	<string>10.10</string>
-	<key>NSHumanReadableCopyright</key>
-	<string></string>
 </dict>
 </plist>

+ 3 - 3
KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion(1.6.0).framework/Versions/A/_CodeSignature/CodeResources

@@ -106,7 +106,7 @@
 		</data>
 		<key>Resources/Info.plist</key>
 		<data>
-		oziEkFw/I7ow9RN37OB/MQejpZ8=
+		FOjLnTmJ1JFkbVGBJce7F2KsfYc=
 		</data>
 		<key>Resources/PDF2Excel.bundle/FPPDFInfo.plist</key>
 		<data>
@@ -1572,11 +1572,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			oziEkFw/I7ow9RN37OB/MQejpZ8=
+			FOjLnTmJ1JFkbVGBJce7F2KsfYc=
 			</data>
 			<key>hash2</key>
 			<data>
-			fIsM4HTClvVYVK4Tnr0CauXDclkNUjJqN67n037GHOU=
+			D+99ELC1HXy23TZAZ83mOBaApX6Z5HHqtB9H0RIbC7g=
 			</data>
 		</dict>
 		<key>Resources/PDF2Excel.bundle/FPPDFInfo.plist</key>

二進制
KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion.framework/Versions/A/ComPDFKit_Conversion


+ 5 - 7
KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion.framework/Versions/A/Resources/Info.plist

@@ -3,13 +3,13 @@
 <plist version="1.0">
 <dict>
 	<key>BuildMachineOSBuild</key>
-	<string>22A400</string>
+	<string>21F79</string>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleExecutable</key>
 	<string>ComPDFKit_Conversion</string>
 	<key>CFBundleIdentifier</key>
-	<string>com.comdocumentaikit.ComDocumentAIKit.ComPDFKit-Conversion-OCR-macOS-Protected-</string>
+	<string>com.compdfkit.conversion</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
@@ -27,7 +27,7 @@
 	<key>DTCompiler</key>
 	<string>com.apple.compilers.llvm.clang.1_0</string>
 	<key>DTPlatformBuild</key>
-	<string>14A400</string>
+	<string>13F100</string>
 	<key>DTPlatformName</key>
 	<string>macosx</string>
 	<key>DTPlatformVersion</key>
@@ -37,12 +37,10 @@
 	<key>DTSDKName</key>
 	<string>macosx12.3</string>
 	<key>DTXcode</key>
-	<string>1401</string>
+	<string>1341</string>
 	<key>DTXcodeBuild</key>
-	<string>14A400</string>
+	<string>13F100</string>
 	<key>LSMinimumSystemVersion</key>
 	<string>10.10</string>
-	<key>NSHumanReadableCopyright</key>
-	<string></string>
 </dict>
 </plist>

+ 3 - 3
KdanAutoTest/KdanAuto/Third Part Library/ComPDFKit_Conversion.framework/Versions/A/_CodeSignature/CodeResources

@@ -106,7 +106,7 @@
 		</data>
 		<key>Resources/Info.plist</key>
 		<data>
-		oziEkFw/I7ow9RN37OB/MQejpZ8=
+		FOjLnTmJ1JFkbVGBJce7F2KsfYc=
 		</data>
 		<key>Resources/PDF2Excel.bundle/FPPDFInfo.plist</key>
 		<data>
@@ -1572,11 +1572,11 @@
 		<dict>
 			<key>hash</key>
 			<data>
-			oziEkFw/I7ow9RN37OB/MQejpZ8=
+			FOjLnTmJ1JFkbVGBJce7F2KsfYc=
 			</data>
 			<key>hash2</key>
 			<data>
-			fIsM4HTClvVYVK4Tnr0CauXDclkNUjJqN67n037GHOU=
+			D+99ELC1HXy23TZAZ83mOBaApX6Z5HHqtB9H0RIbC7g=
 			</data>
 		</dict>
 		<key>Resources/PDF2Excel.bundle/FPPDFInfo.plist</key>

+ 41 - 22
KdanAutoTest/KdanAuto/ViewController.swift

@@ -46,8 +46,11 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
         advanceView.layer?.borderWidth = 1
         
         // Load Infos
-        let path = Bundle.main.path(forResource: "AutoTestProperty", ofType: "plist")!
-        let url = URL.init(fileURLWithPath: path, isDirectory: false)
+        var path = NSSearchPathForDirectoriesInDomains(.libraryDirectory, .userDomainMask, true).first?.appending("/CustomAutoTestProperty.plist")
+        if nil == path || !FileManager.default.fileExists(atPath: path!) {
+            path = Bundle.main.path(forResource: "AutoTestProperty", ofType: "plist")!
+        }
+        let url = URL.init(fileURLWithPath: path!, isDirectory: false)
         let initInfo = try! NSDictionary.init(contentsOf: url, error: ()) 
         
         testFileTypes = initInfo.allKeys as [String]
@@ -65,9 +68,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                 let types = testTypeInfo[fileType] as! NSArray
                 for typeInfo in types {
                     let ti = typeInfo as! NSDictionary
-                    let type = ti["Type"] as! NSString
+                    let id = ti["ID"] as! NSString
                     
-                    let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                    let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                     
                     if testObject != nil &&
                         testObject!.canUpdateRefImage() {
@@ -84,6 +87,22 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
             self.view.window?.title = "KdanAuto:"+CPDFConvertKit.sharedInstance().versionString
         }
     }
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        
+        NotificationCenter.default.addObserver(forName: NSNotification.Name(kAutoTestObjectUpdateNotification),
+                                               object: nil,
+                                               queue: nil) { notifiication in
+            self.itemsList.reloadData()
+        }
+    }
+    
+    override func viewWillAppear() {
+        super.viewWillAppear()
+        
+        self.view.window?.orderFront(nil)
+    }
 
     override var representedObject: Any? {
         didSet {
@@ -109,7 +128,7 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
         _currentCellInfo = cellInfo
         
         if (nil != _currentCellInfo) {
-            let autoTestObj = AutoTest.autoTestFor(NSString(string: (_currentCellInfo?.fileType())!), type:NSString(string: (_currentCellInfo?.typeInfo()["Type"] as! String)))
+            let autoTestObj = AutoTest.autoTestFor(NSString(string: (_currentCellInfo?.fileType())!), id:NSString(string: (_currentCellInfo?.typeInfo()["ID"] as! String)))
             
             advanceView.setAutoTestObj(autoTestObj)
         }else {
@@ -152,9 +171,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                 let types = testTypeInfo[fileType] as! NSArray
                 for typeInfo in types {
                     let ti = typeInfo as! NSDictionary
-                    let type = ti["Type"] as! NSString
+                    let id = ti["ID"] as! NSString
                     
-                    let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                    let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                     testObject?.testlog = { (msg, progress) in
                         DispatchQueue.main.async {
                             self.view.window?.title = "\(msg)(\(Int(progress*100))%)";
@@ -272,9 +291,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                 for typeInfo in types {
                     autoreleasepool {
                         let ti = typeInfo as! NSDictionary
-                        let type = ti["Type"] as! NSString
+                        let id = ti["ID"] as! NSString
                         
-                        let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                        let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                         testObject?.updateRefImage()
                     }
                 }
@@ -295,9 +314,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
             let types = testTypeInfo[fileType] as! NSArray
             for typeInfo in types {
                 let ti = typeInfo as! NSDictionary
-                let type = ti["Type"] as! NSString
+                let id = ti["ID"] as! NSString
                 
-                let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                 if nil != testObject {
                     testObject?.setSelectedKeys((testObject?.keys())!)
                 }
@@ -315,9 +334,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                     let types = testTypeInfo[fileType] as! NSArray
                     for typeInfo in types {
                         let ti = typeInfo as! NSDictionary
-                        let type = ti["Type"] as! NSString
+                        let id = ti["ID"] as! NSString
                         
-                        let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                        let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                         if nil != testObject {
                             testObject?.clearCompareFiles()
                         }
@@ -342,9 +361,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
                     let types = testTypeInfo[fileType] as! NSArray
                     for typeInfo in types {
                         let ti = typeInfo as! NSDictionary
-                        let type = ti["Type"] as! NSString
+                        let id = ti["ID"] as! NSString
                         
-                        let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                        let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                         if nil != testObject {
                             testObject?.clearCacheFiles()
                         }
@@ -367,9 +386,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
             let types = testTypeInfo[fileType] as! NSArray
             for typeInfo in types {
                 let ti = typeInfo as! NSDictionary
-                let type = ti["Type"] as! NSString
+                let id = ti["ID"] as! NSString
                 
-                let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                 if nil != testObject {
                     testObject?.setSelectedKeys([])
                 }
@@ -386,9 +405,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
             let types = testTypeInfo[fileType] as! NSArray
             for typeInfo in types {
                 let ti = typeInfo as! NSDictionary
-                let type = ti["Type"] as! NSString
+                let id = ti["ID"] as! NSString
                 
-                let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                 if (testObject?.selectedKeys().count != 0) {
                     let tFiles = testObject?.compareFiles();
                     if (tFiles != nil && tFiles?.count != 0) {
@@ -415,9 +434,9 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
             let types = testTypeInfo[fileType] as! NSArray
             for typeInfo in types {
                 let ti = typeInfo as! NSDictionary
-                let type = ti["Type"] as! NSString
+                let id = ti["ID"] as! NSString
                 
-                let testObject = AutoTest.autoTestFor(fileType as NSString, type: type)
+                let testObject = AutoTest.autoTestFor(fileType as NSString, id: id)
                 
                 if (testObject?.selectedKeys().count ?? 0 > 0) {
                     testObject?.setStatus(.Finished)
@@ -443,7 +462,7 @@ class ViewController : NSViewController, SettingViewControllerDelegate, AutoTest
         }else {
             let cellView = TestCaseCellView.shared()
             
-            let autoTestObj = AutoTest.autoTestFor(NSString(string: (cellInfo.fileType())), type:NSString(string: (cellInfo.typeInfo()["Type"] as! String)))
+            let autoTestObj = AutoTest.autoTestFor(NSString(string: (cellInfo.fileType())), id:NSString(string: (cellInfo.typeInfo()["ID"] as! String)))
             
             cellView?.setAutoTestObj(autoTestObj);
             cellView?.delegate = self;