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.

133 lines
3.5 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: TabReportDlg.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of TabReportDlg.h
  13. //----------------------------------------------------------------------------
  14. #if !defined(AFX_TABREPORTDLG_H__E4084058_490D_46F6_A3F9_A9379C0B1214__INCLUDED_)
  15. #define AFX_TABREPORTDLG_H__E4084058_490D_46F6_A3F9_A9379C0B1214__INCLUDED_
  16. #include "ImageViewWnd.h" // Added by ClassView
  17. #if _MSC_VER > 1000
  18. #pragma once
  19. #endif // _MSC_VER > 1000
  20. #include "ProgramSkin.h"
  21. class CMainDlg;
  22. class CTabReportDlg : public CDialog
  23. {
  24. // Construction
  25. public:
  26. CTabReportDlg(CWnd* pParent = NULL); // standard constructor
  27. virtual ~CTabReportDlg();
  28. public:
  29. void SetReportFile( PBYTE pList, INT nSize );
  30. void SetReportList( PBYTE pBuffer, INT nSize );
  31. public:
  32. // Dialog Data
  33. //{{AFX_DATA(CTabReportDlg)
  34. enum { IDD = IDD_REPORT_DLG };
  35. CButton m_ButtonDetection;
  36. CStatic m_StaticPreview;
  37. CSliderCtrl m_SliderPreview;
  38. CSliderCtrl m_SliderImage;
  39. CStatic m_StaticImage;
  40. CRichEditCtrl m_RichEdit;
  41. CStatic m_StaticLocator;
  42. CTreeCtrl m_Tree;
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(CTabReportDlg)
  47. public:
  48. virtual BOOL PreTranslateMessage(MSG* pMsg);
  49. protected:
  50. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. protected:
  54. // Generated message map functions
  55. //{{AFX_MSG(CTabReportDlg)
  56. afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
  57. virtual BOOL OnInitDialog();
  58. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  59. afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  60. afx_msg void OnPaint();
  61. afx_msg void OnButtonDetection();
  62. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  63. //}}AFX_MSG
  64. DECLARE_MESSAGE_MAP()
  65. public:
  66. void DownloadListFromHost();
  67. void DownloadFileFromHost();
  68. void SetMainDlg( CMainDlg *pDlg ) { m_pMainDlg = pDlg; }
  69. private:
  70. HTREEITEM m_hListTreeNode;
  71. BOOL m_bListWait;
  72. INT m_nListLevel;
  73. PCHAR m_pListBuffer;
  74. INT m_nListBufferSize;
  75. TCHAR m_pListName[MAX_PATH];
  76. PCHAR *m_ppListPtr;
  77. INT m_nListPtrCount;
  78. PCHAR m_pListLocator;
  79. PCHAR m_pListImage;
  80. PCHAR m_pListPreview;
  81. PCHAR m_pListText;
  82. private:
  83. TCHAR m_pFileName[MAX_PATH];
  84. BOOL m_bFileWait;
  85. INT m_nFileLevel;
  86. private:
  87. CMainDlg *m_pMainDlg;
  88. private:
  89. INT MakeTreePath( HTREEITEM hNode, LPTSTR pName, PINT pLength );
  90. private:
  91. CImageViewWnd m_ImageWnd;
  92. CImageViewWnd m_PreviewWnd;
  93. CImageViewWnd m_LocatorWnd;
  94. public:
  95. void SetSkin( CProgramSkin *pProgramSkin );
  96. void UpdateControlPosition();
  97. private:
  98. void ClearCurrentReport();
  99. void InitFromCache();
  100. BOOL CheckFile( LPCTSTR pFileName, DWORD dwFileSize );
  101. BOOL IsInCache( LPCTSTR pFileName, PDWORD pFileSize );
  102. BOOL PlaceToCache( LPCTSTR pFileName, PBYTE pData, INT nCount );
  103. BOOL OpenFromCache( LPCTSTR pFolderName );
  104. BOOL ShowDataFile( LPCTSTR pFileName );
  105. void DeleteOldFiles( PBYTE pList, INT nSize );
  106. private:
  107. CProgramSkin *m_pSkin;
  108. };
  109. //{{AFX_INSERT_LOCATION}}
  110. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  111. #endif // !defined(AFX_TABREPORTDLG_H__E4084058_490D_46F6_A3F9_A9379C0B1214__INCLUDED_)