Pārlūkot izejas kodu

综合 - 测试项新库标识

zhudongyong 1 gadu atpakaļ
vecāks
revīzija
705f925398

BIN
KdanAutoTest/KdanAuto.xcodeproj/project.xcworkspace/xcuserdata/zhudongyong.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 4
KdanAutoTest/KdanAuto/Class/AdvanceSettingViewController/PropertyCell/ASSizePropertyCell.swift

@@ -42,8 +42,8 @@ class ASSizePropertyCell: ASPropertyCell, NSTextFieldDelegate {
             let sizeString = value as! String
             let size = NSSizeFromString(sizeString);
             
-            self.m_wTF.stringValue = "\(rect.size.width)";
-            self.m_hTF.stringValue = "\(rect.size.height)";
+            self.m_wTF.stringValue = "\(size.width)";
+            self.m_hTF.stringValue = "\(size.height)";
         }
     }
     
@@ -58,8 +58,6 @@ class ASSizePropertyCell: ASPropertyCell, NSTextFieldDelegate {
         super.setEnabled(enabled)
         
         self.alphaValue = enabled ? 1 : 0.6
-        self.m_xTF.isEnabled = enabled;
-        self.m_yTF.isEnabled = enabled;
         self.m_wTF.isEnabled = enabled;
         self.m_hTF.isEnabled = enabled;
     }

+ 18 - 0
KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestCaseCellView.swift

@@ -14,6 +14,7 @@ public protocol TestCaseCellViewDelegate : NSObjectProtocol {
 
 class TestCaseCellView : NSTableCellView, NSMenuDelegate {
     @IBOutlet var _titleLbl : NSTextField!
+    @IBOutlet var _markLbl : NSTextField!
     @IBOutlet var _keyContentView : NSView!
     @IBOutlet var _sepLine : NSView!
     @IBOutlet var _activityView : ActivityView!
@@ -111,6 +112,11 @@ class TestCaseCellView : NSTableCellView, NSMenuDelegate {
         _title = title;
         
         _titleLbl.stringValue = _title ?? ""
+        let size = _titleLbl.sizeThatFits(_titleLbl.frame.size);
+        _markLbl.frame = CGRectMake(_titleLbl.frame.origin.x + size.width,
+                                    _titleLbl.frame.origin.y,
+                                    _titleLbl.frame.size.width - size.width,
+                                    _titleLbl.frame.size.height)
     }
     
     public func title() -> String? {
@@ -189,6 +195,17 @@ class TestCaseCellView : NSTableCellView, NSMenuDelegate {
             self.setTitle((_autoTestObj?.name())!)
             self.setCheckKeys((_autoTestObj?.selectedKeys())!)
 
+            let useOldLibValue = _autoTestObj?.params().value(forKey: "useOldLib")
+            var useOldLib = false
+            if nil != useOldLibValue {
+                if (useOldLibValue as? String) != nil {
+                    useOldLib = NSString(string: (useOldLibValue as! String)).boolValue
+                }else if (useOldLibValue as? NSNumber) != nil {
+                    useOldLib = (useOldLibValue as! NSNumber).boolValue
+                }
+            }
+            
+            _markLbl.isHidden =  useOldLib
 //            self.wantsLayer = true
 //            if _autoTestObj?.isOriginFileExist() == true && _autoTestObj?.isCheckFileExist() == true {
 //                self.layer?.opacity = 1
@@ -199,6 +216,7 @@ class TestCaseCellView : NSTableCellView, NSMenuDelegate {
             self.setTitle("")
             self.setCheckKeys([])
             
+            _markLbl.isHidden = true;
 //            self.wantsLayer = true
 //            self.layer?.opacity = 0.5
         }

+ 10 - 0
KdanAutoTest/KdanAuto/Class/Norrmal/Cell/TestCaseCellView.xib

@@ -26,6 +26,15 @@
                         <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
                     </textFieldCell>
                 </textField>
+                <textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" id="p3u-y5-wfL">
+                    <rect key="frame" x="23" y="39" width="250" height="16"/>
+                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                    <textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="[新库]" id="BIW-SP-dyb">
+                        <font key="font" metaFont="systemBold"/>
+                        <color key="textColor" name="linkColor" catalog="System" colorSpace="catalog"/>
+                        <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
+                    </textFieldCell>
+                </textField>
                 <view id="zMS-2A-6Cy">
                     <rect key="frame" x="8" y="7" width="322" height="24"/>
                     <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -60,6 +69,7 @@
             <connections>
                 <outlet property="_activityView" destination="xZE-kG-hKQ" id="QaP-h4-ll6"/>
                 <outlet property="_keyContentView" destination="zMS-2A-6Cy" id="Egq-9y-jXs"/>
+                <outlet property="_markLbl" destination="p3u-y5-wfL" id="eVj-Rv-FV9"/>
                 <outlet property="_reportBtn" destination="lav-wa-kWL" id="Imc-qi-zlq"/>
                 <outlet property="_sepLine" destination="Dg0-nG-U3m" id="fck-m4-6W4"/>
                 <outlet property="_titleLbl" destination="EgA-BQ-X23" id="Kft-ve-pVP"/>