示例#1
0
void BuildWWhizReg(WWhizReg* reg)
{
	CString str;

	CTime firstTime = GetFirstTime();
	CTime curTime = CTime::GetCurrentTime();
	CTimeSpan timeDiff = curTime - firstTime;
	CTimeSpan time21Days(21, 0, 0, 0);

	if (firstTime + time21Days > curTime)
	{
	}

	// Read the key stuff from the registry.
//	validRegistration = ValidRegistration();
//	if (!HasExpiredHelper()  &&  !validRegistration  &&  timeDiff.GetDays() > 14)
	CString regName = AfxGetApp()->GetProfileString("Config", "RegName");
	CString regCode = AfxGetApp()->GetProfileString("Config", "RegCode");

	time_t registrationTime;
	bool decoded = ValidateRegistrationCode(regCode, regName, registrationTime);
	if (!HasExpiredHelper()  &&  !decoded  &&  timeDiff.GetDays() > 14)
	{
		CExpiredDlg dlg;
		dlg.m_numDays = timeDiff.GetDays() + 1;
		dlg.DoModal();
	}
}
示例#2
0
Double_t DDASEvent::GetTimeWidth() const
{
    Double_t end_time   = GetLastTime();
    Double_t start_time = GetFirstTime();
    
    return (end_time-start_time);
}
示例#3
0
void RegistrationDialog(bool force)
{
	CTime firstTime = GetFirstTime();
	CTime curTime = CTime::GetCurrentTime();
	CTimeSpan timeDiff = curTime - firstTime;
	if (timeDiff.GetDays() > 14  ||  force)
	{
		CExpiredDlg dlg;
		dlg.m_numDays = timeDiff.GetDays() + 1;
		dlg.DoModal();
	}
}