LWQ
2025-08-07 c049c2fdf2f5722e460d0dc5c7597bf819f2e2e5
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// DlgLicenseInfo.cpp : 备泅 颇老涝聪促.
//
 
#include "stdafx.h"
#include "EdgeInspector_App.h"
#include "DlgLicenseInfo.h"
#include "afxdialogex.h"
 
 
// CDlgLicenseInfo 措拳 惑磊涝聪促.
 
IMPLEMENT_DYNAMIC(CDlgLicenseInfo, CDialogEx)
 
CDlgLicenseInfo::CDlgLicenseInfo(CWnd* pParent /*=NULL*/)
    : CDialogEx(CDlgLicenseInfo::IDD, pParent)
{
 
}
 
CDlgLicenseInfo::~CDlgLicenseInfo()
{
}
 
void CDlgLicenseInfo::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}
 
 
void CDlgLicenseInfo::UpdateLicenseInfo()
{
    if(g_pStatus->m_pLicenseChecker == NULL)
        return;
 
    SLicenseStatus status = g_pStatus->m_pLicenseChecker->GetLicenseInfo();
 
    CWnd *pWnd = nullptr;
    CString strValue = L"";
 
    // serial no
    strValue.Format(L"Serial NO = %s", status.strSerialNo);
    pWnd = GetDlgItem(IDC_LBA_SERIAL_NO);
    if (pWnd && pWnd->GetSafeHwnd())
    {
        SetDlgItemText(IDC_LBA_SERIAL_NO, strValue);
    }
 
    // key status
    switch (status.nKeyStatus)
    {
    case LicenseKey_NotConnected:    // 楷搬 救凳
        strValue = L"Key Status = Not Connected";
        break;
    case LicenseKey_NotCertified:    // 牢刘 救凳
        strValue = L"Key Status = Not Certified";
        break;
    case LicenseKey_NotActivated:    // 劝己拳 救凳
        strValue = L"Key Status = Not Activated";
        break;
    case LicenseKey_Activated:        // 劝己拳 凳
        strValue = L"Key Status = Activated";
        break;
    }
    pWnd = GetDlgItem(IDC_LBA_LOCK_STATUS);
    if (pWnd && pWnd->GetSafeHwnd())
    {
        SetDlgItemText(IDC_LBA_LOCK_STATUS, strValue);
    }
    pWnd = GetDlgItem(IDC_LBA_LOCK_DUE_DATE);
    if (pWnd && pWnd->GetSafeHwnd())
    {
        strValue.Format(_T("Licensed Time = %04d/%02d/%02d-%02d:%02d:%02d"), status.expTime.GetYear()
            , status.expTime.GetMonth()
            , status.expTime.GetDay()
            , status.expTime.GetHour()
            , status.expTime.GetMinute()
            , status.expTime.GetSecond()
            );
 
        SetDlgItemText(IDC_LBA_LOCK_DUE_DATE, strValue);
    }
}
 
BEGIN_MESSAGE_MAP(CDlgLicenseInfo, CDialogEx)
END_MESSAGE_MAP()
 
 
// CDlgLicenseInfo 皋矫瘤 贸府扁涝聪促.