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.

151 lines
4.5 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 24/04/2000
  5. // Last modification: 17/11/2003
  6. // Project Intruder Position Indicator
  7. // SUBSYSTEM: Transfer Dialog
  8. // FILE: TransferDlg.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of class CTransferDlg
  13. //----------------------------------------------------------------------------
  14. #if !defined(_TRANSFERDLG_H_INCLUDED_)
  15. #define _TRANSFERDLG_H_INCLUDED_
  16. #include "Resource.h" // Added by ClassView
  17. class CApplication;
  18. class CProfile;
  19. #include "..\LgLib\Device\LgDeviceLGS.h"
  20. class CTransferDlg
  21. {
  22. public:
  23. CTransferDlg();
  24. ~CTransferDlg();
  25. public:
  26. void DrawEmptyMaps( HWND hWnd );
  27. void SetApplication(CApplication *pApplication, CProfile *pProfile );
  28. BOOL DoModal( HWND hWnd );
  29. enum { IDD = IDD_TRANSFER_DLG };
  30. private:
  31. BOOL DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  32. static BOOL CALLBACK DialogProcTransferDlg(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  33. private:
  34. void EnableControls(HWND hWnd, BOOL bEnable);
  35. void EnableParameters(HWND hWnd, BOOL bEnable);
  36. VOID ClearMasterBitmap(HWND hWnd, LPCTSTR lpFileName); // 25/03/2001
  37. void RedrawMap(HWND hWnd , BOOL fDurty = FALSE);
  38. void DrawMaps(HWND hWnd);
  39. void DrawFullMaps(HWND hWnd);
  40. void DrawFixedVideo( HDC hDC, RECT& rect, double scale );
  41. BOOL SendFiles( HWND hWnd );
  42. BOOL OnButtonSetCommSpeed( HWND hWnd, WPARAM, LPARAM );
  43. void OnButtonUpdateAddress( HWND hWnd );
  44. private:
  45. void OnWmDrawMap( HWND, WPARAM, LPARAM );
  46. void OnWmFullDrawMap( HWND, WPARAM, LPARAM );
  47. void OnWmParameters( HWND, WPARAM, LPARAM );
  48. void OnWmSendFile( HWND, WPARAM, LPARAM );
  49. void OnWmRestart( HWND, WPARAM, LPARAM );
  50. void OnWmSoftwareVersion( HWND, WPARAM, LPARAM );
  51. void OnWmSetCommSpeed( HWND, WPARAM, LPARAM );
  52. void OnWmSerialNumber( HWND, WPARAM, LPARAM );
  53. void OnButtonSerialNumber( HWND hWnd, WPARAM, LPARAM );
  54. void OnButtonCameraParameters( HWND hWnd, WPARAM, LPARAM );
  55. void OnWmCameraParameters( HWND, WPARAM, LPARAM );
  56. void OnCheckCameraAuto( HWND, WPARAM, LPARAM );
  57. void OnComboCameraType( HWND, WPARAM, LPARAM );
  58. void OnWmSetAddress( HWND, WPARAM, LPARAM );
  59. void OnButtonRelayUpdate( HWND hWnd, WPARAM, LPARAM );
  60. void OnWmRelayParameters( HWND, WPARAM, LPARAM );
  61. void OnCheckRelayAuto( HWND, WPARAM, LPARAM );
  62. void OnWmVoltageParameters( HWND, WPARAM, LPARAM );
  63. void OnButtonVoltageUpdate( HWND hWnd, WPARAM, LPARAM );
  64. void OnWmLRFDisable( HWND, WPARAM, LPARAM );
  65. void OnButtonLRFDisableUpdate( HWND hWnd, WPARAM, LPARAM );
  66. void OnButtonWidthTableUpdate( HWND hWnd, WPARAM, LPARAM );
  67. void OnWmWidthTable( HWND, WPARAM, LPARAM );
  68. void OnButtonFullReset( HWND, WPARAM, LPARAM );
  69. void OnWmFullReset( HWND, WPARAM, LPARAM );
  70. void OnButtonZoomTiltUpdate( HWND, WPARAM, LPARAM );
  71. void OnButtonZoomTiltDownload( HWND, WPARAM, LPARAM );
  72. void OnButtonZoomTiltGet( HWND, WPARAM, LPARAM );
  73. void OnButtonZoomTiltSet( HWND, WPARAM, LPARAM );
  74. void OnWmZoomTable( HWND, WPARAM, LPARAM );
  75. void OnWmTiltTable( HWND, WPARAM, LPARAM );
  76. void OnWmInitDialog( HWND, WPARAM, LPARAM );
  77. LRESULT OnWmNotify( HWND, WPARAM, LPARAM );
  78. LRESULT OnWmCommand( HWND, WPARAM, LPARAM );
  79. void OnButtonOk( HWND );
  80. void OnButtonFilesDelete( HWND hWnd );
  81. void OnButtonFilesAdd( HWND hWnd );
  82. void OnButtonDrawEdit( HWND hWnd );
  83. void OnButtonDrawClear( HWND hWnd );
  84. void OnCheckDraw( HWND hWnd );
  85. private:
  86. CApplication *m_pApplication;
  87. CProfile *m_pProfile;
  88. private:
  89. HBITMAP m_hBitmap;
  90. BOOL m_bDraw[2];
  91. private:
  92. void OnChangeDrawZeroShift( HWND hWnd );
  93. void OnButtonParameters( HWND hWnd );
  94. BOOL m_bParameterInitiated[2];
  95. INT m_nCurrentFile;
  96. TCHAR m_pCurrentFile[MAX_PATH];
  97. BOOL m_bSendHiddenZones;
  98. INT m_nSendHiddenZones;
  99. BOOL m_bZoomInitiated;
  100. BOOL m_bTiltInitiated;
  101. CLgDeviceLGS::LGS_SERIAL_NUMBER m_SerialNumber;
  102. CLgDeviceLGS::LGS_SOFTWARE_VERSION m_SoftwareVersion;
  103. };
  104. inline
  105. BOOL CALLBACK CTransferDlg::DialogProcTransferDlg( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
  106. {
  107. if(::IsWindow(hWnd))
  108. {
  109. if(uMsg == WM_INITDIALOG)
  110. ::SetWindowLong(hWnd, GWL_USERDATA, (LONG)lParam);
  111. CTransferDlg *pDlg = (CTransferDlg*)::GetWindowLong(hWnd, GWL_USERDATA);
  112. if(pDlg)
  113. return pDlg->DialogProc(hWnd, uMsg, wParam, lParam);
  114. }
  115. return FALSE;
  116. }
  117. #endif // !defined(_TRANSFERDLG_H_INCLUDED_)