| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | 
							- #include "stdafx.h"
 
- #include "SkylightMng.h"
 
- CSkylightMng::CSkylightMng()
 
- {
 
- }
 
- CSkylightMng::~CSkylightMng()
 
- {
 
- }
 
- BOOL CSkylightMng::IsSkylight(SYSTEMTIME* pstTime)
 
- {
 
- 	if (pstTime == NULL)
 
- 	{
 
- 		SYSTEMTIME st;
 
- 		GetLocalTime(&st);
 
- 		if (st.wHour <= 4 && st.wHour >= 0)
 
- 			return TRUE;
 
- 	}
 
- 	else
 
- 	{
 
- 		if (pstTime->wHour <= 4 && pstTime->wHour >= 0)
 
- 			return TRUE;
 
- 	}
 
- 	return FALSE;
 
- }
 
- BOOL CSkylightMng::IsSkylight(COleDateTime* pdtTime)
 
- {
 
- 	if (pdtTime)
 
- 	{
 
- 		if (pdtTime->GetHour() <= 4 && pdtTime->GetHour() >= 0)
 
- 			return TRUE;
 
- 	}
 
- 	return FALSE;
 
- }
 
- BOOL CSkylightMng::IsSkylight(CTime* ptmTime)
 
- {
 
- 	if (ptmTime)
 
- 	{
 
- 		if (ptmTime->GetHour() <= 4 && ptmTime->GetHour() >= 0)
 
- 			return TRUE;
 
- 	}
 
- 	
 
- 	return FALSE;
 
- }
 
- CSkylightMng CSkylightMng::m_pInstance;
 
 
  |