JLChen
2021-05-18 a869383e163a18cdedcf587383c1eca043129754
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
//  Copyright © 2018年 Zhejiang Dahua Technology Co.,Ltd. All rights reserved.
//    插网线引导页
 
import UIKit
import LCBaseModule
 
class DHPlugNetGuideViewController: DHGuideBaseViewController {
 
    override func viewDidLoad() {
        super.viewDidLoad()
 
        // Do any additional setup after loading the view.
        adjustConstraint()
        
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    private func adjustConstraint() {
        guideView.topImageView.contentMode = .scaleAspectFill
        guideView.updateTopImageViewConstraint(top: 0, width: view.bounds.width, maxHeight: 350)
    }
    
    // MARK: DHAddBaseVCProtocol
//    override func rightActionType() -> [DHAddBaseRightAction] {
//        var actions: [DHAddBaseRightAction] = [.restart]
//        if DHAddDeviceManager.sharedInstance.supportConfigModes.contains(.wifi) {
//            actions.append(.switchToWireless)
//        }
//        
//        return actions
//    }
 
    // MARK: DHGuideBaseVCProtocol
    override func tipText() -> String? {
        return "add_device_plug_cable_to_device".lc_T
    }
    
    override func tipImageName() -> String? {
        return "adddevice_netsetting_networkcable"
    }
    
    override func isCheckHidden() -> Bool {
        return true
    }
 
    override func doNext() {
        // 【*】支持SC码的,直接进入云配置流程;不支持SC的,进入旧的局域网提示界面
        if DHAddDeviceManager.sharedInstance.isSupportSC {
            basePushToConnectCloudVC()
        } else {
            let sameNetworkVC = DHSameNetworkViewController()
            navigationController?.pushViewController(sameNetworkVC, animated: true)
        }
    }
}