Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.3 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 29/03/2000
  5. // Last modification: 08/10/2003
  6. // Project Intruder Position Indicator
  7. // SUBSYSTEM: Logs targets
  8. // FILE: LogFiles.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of class CLogFiles
  13. //----------------------------------------------------------------------------
  14. #ifndef __LOG__H__INCLUDED__
  15. #define __LOG__H__INCLUDED__
  16. #include "Structs.h"
  17. #include "VideoWnd.h"
  18. #include "Locator.h"
  19. #include "Profile.h"
  20. #include "VideoStaticWnd.h"
  21. #include "..\lglib\thread.h"
  22. #define REPORT_IMAGES_IN_BLOCK 4
  23. class CLogFiles
  24. {
  25. public:
  26. CLogFiles();
  27. ~CLogFiles();
  28. public:
  29. BOOL Create( CVideoWnd *pVideoWnd, CVideoWnd *pFixedVideoWnd, CLgsRadarWnd *pLocator, CProfile *pProfile );
  30. public:
  31. void SetDebugMode(BOOL fMode);
  32. void Begin();
  33. void StoreInformation(LPCTSTR pStr, SYSTEMTIME &time);
  34. void StoreLocator();
  35. void StoreImage( TARGET_DESCRIPTION& td, BOOL bFixed );
  36. HBITMAP StorePreview(TARGET_DESCRIPTION& td);
  37. void StoreText(TARGET_DESCRIPTION& td);
  38. void Reset();
  39. void StoreInformationEx(LPCTSTR pStr, SYSTEMTIME &time);
  40. private:
  41. friend DWORD CALLBACK ThreadProcLogFiles(LPVOID lpvParam);
  42. private:
  43. void CheckFreeSpace();
  44. BOOL CheckOldFiles(SYSTEMTIME st);
  45. void DeleteOldFiles(SYSTEMTIME st);
  46. private:
  47. INT PrepareImageText( TARGET_DESCRIPTION& td, LPCTSTR pTag, LPTSTR pText, INT nMaxText );
  48. private:
  49. TCHAR m_pPathText[MAX_PATH];
  50. TCHAR m_pPathTextEx[MAX_PATH];
  51. TCHAR m_pPathImage[MAX_PATH];
  52. TCHAR m_pPathPreview[MAX_PATH];
  53. TCHAR m_pPathLocator[MAX_PATH];
  54. LPBITMAPINFO m_lpBmi;
  55. CVideoWnd *m_pVideoWnd;
  56. CVideoWnd *m_pFixedVideoWnd;
  57. CLgsRadarWnd *m_pLocator;
  58. CProfile *m_pProfile;
  59. HANDLE m_hEventQuit;
  60. HANDLE m_hThread;
  61. BOOL m_bDebugMode;
  62. BOOL m_PreviewNumber;
  63. BOOL m_ImageNumber;
  64. BOOL m_bReset;
  65. BOOL m_bWriteImage;
  66. BOOL m_bWriteText;
  67. INT m_nDays;
  68. BOOL m_bClockwise;
  69. private:
  70. CLgImageDIB m_ImageDIB;
  71. CLgImageDIB m_PreviewDIB;
  72. CLgImageJPEG m_ImageJPEG;
  73. CLgImageJPEG m_PreviewJPEG;
  74. };
  75. #endif