// 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 ¸Þ½ÃÁö 󸮱âÀÔ´Ï´Ù.