프로젝트

일반

사용자정보

개정판 eda9685a

IDeda9685a309072c19f4be1a60eb22bff02e8eb2b
상위 df0c7400
하위 c10cad5d, 85dfad8e

함의성이(가) 약 5년 전에 추가함

issue #624: add expiration date

Change-Id: I48e59d0d9e6df621fc98c6938494da06947f03db

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
659 659
            # Close the db connection
660 660
            conn.close()
661 661

  
662
        configs = [Config('app', 'mode', 'advanced'), Config('app', 'error origin point', '51,72')]
662
        # configs = [Config('app', 'mode', 'advanced'), Config('app', 'error origin point', '51,72')]
663
        # expiration date is 2019-11-9-23-59-59 : e52SoJJRdZ-apJuhlFWtnFWC
664
        # configs = [Config('app', 'error origin point', '51,72'), Config('app', 'expiration', 'e52SoJJRdZ-apJuhlFWtnFWC')]
665
        configs = [Config('app', 'error origin point', '51,72')]
663 666
        self.saveAppConfigs(configs)
664 667

  
665 668
    '''
DTI_PID/DTI_PID/License.py
65 65
    def check_license_key():
66 66
        """ check license key with computer name """
67 67
        from AppDocData import AppDocData
68
        from datetime import datetime, timedelta
68 69

  
69 70
        try:
70 71
            if QLicenseDialog.process_running(): return True
71 72

  
72 73
            appDocData = AppDocData.instance()
73 74
            configs = appDocData.getAppConfigs('app', 'license')
75
            configs2 = appDocData.getAppConfigs('app', 'expiration')
76
            if configs and 1 == len(configs) and configs2 and 1 == len(configs2):
77
                decoded = QLicenseDialog.decode(QLicenseDialog.KEY, configs[0].value)
78
                decoded2 = QLicenseDialog.decode(QLicenseDialog.KEY, configs2[0].value).split('-')
79
                ex_date = datetime(int(decoded2[0]), int(decoded2[1]), int(decoded2[2]), int(decoded2[3]), int(decoded2[4]), int(decoded2[5]))
80
                if decoded.upper() == os.environ['COMPUTERNAME'].upper() and ex_date > datetime.now() : return True
81
            '''
82
            configs = appDocData.getAppConfigs('app', 'license')
74 83
            if configs and 1 == len(configs):
75 84
                decoded = QLicenseDialog.decode(QLicenseDialog.KEY, configs[0].value)
76 85
                if decoded.upper() == os.environ['COMPUTERNAME'].upper(): return True
86
            '''
77 87

  
78 88
            dialog = QLicenseDialog(None)
79 89
            dialog.exec_()
DTI_PID/DTI_PID/MainWindow.py
254 254
        else:
255 255
            self.actionOCR_Training.setVisible(False)
256 256
            self.pushButtonBatchRecognition.setVisible(False)
257
            self.pushButtonCreateSymbol.setVisible(False)
258
            self.pushButtonDetectSymbol.setVisible(False)
257 259

  
258 260
        self.delimiter = '"'
259 261

  
DTI_PID/DTI_PID/RecognitionDialog.py
6 6
import os
7 7
import threading
8 8
import cv2
9
import numpy as np
9 10
from PyQt5.QtCore import *
10 11
from PyQt5.QtGui import *
11 12
from PyQt5.QtWidgets import *
......
1743 1744
        if configs and 1 == len(configs) and 'advanced' == configs[0].value:
1744 1745
            pass
1745 1746
        else:
1746
            self.ui.lineCheckBox.setVisible(False)
1747
            self.ui.checkBoxTraining.setVisible(False)
1747 1748

  
1748 1749
        '''
1749 1750
        if self.batch:

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)