// 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 皋矫瘤 贸府扁涝聪促.
|