WCAM020MF.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. //---------------------------------------------------------------------------
  2. #ifndef WCAM020MFH
  3. #define WCAM020MFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <DB.hpp>
  10. #include <Menus.hpp>
  11. #include <ExtCtrls.hpp>
  12. #include <ADODB.hpp>
  13. #include <ImgList.hpp>
  14. #include <Graphics.hpp>
  15. #include <ComCtrls.hpp>
  16. //---------------------------------------------------------------------------
  17. #include <OleCtrls.hpp>
  18. #include "CenterCommF.h"
  19. #include "DataTypesF.h"
  20. #include "WindowMsgF.h"
  21. #include "CDSWCamCtlrF.h"
  22. #include "cxButtons.hpp"
  23. #include "cxCalc.hpp"
  24. #include "cxCheckBox.hpp"
  25. #include "cxClasses.hpp"
  26. #include "cxContainer.hpp"
  27. #include "cxControls.hpp"
  28. #include "cxCustomData.hpp"
  29. #include "cxData.hpp"
  30. #include "cxDataStorage.hpp"
  31. #include "cxEdit.hpp"
  32. #include "cxFilter.hpp"
  33. #include "cxGraphics.hpp"
  34. #include "cxGrid.hpp"
  35. #include "cxGridBandedTableView.hpp"
  36. #include "cxGridCustomTableView.hpp"
  37. #include "cxGridCustomView.hpp"
  38. #include "cxGridLevel.hpp"
  39. #include "cxGridTableView.hpp"
  40. #include "cxGroupBox.hpp"
  41. #include "cxLabel.hpp"
  42. #include "cxLookAndFeelPainters.hpp"
  43. #include "cxLookAndFeels.hpp"
  44. #include "cxMaskEdit.hpp"
  45. #include "cxPC.hpp"
  46. #include "cxPCdxBarPopupMenu.hpp"
  47. #include "cxSpinEdit.hpp"
  48. #include "cxStyles.hpp"
  49. #include "cxTextEdit.hpp"
  50. #include "dxSkinBlue.hpp"
  51. #include "dxSkinsCore.hpp"
  52. #include "dxSkinscxPCPainter.hpp"
  53. #include "FFBaseComponent.hpp"
  54. #include "FFBasePlay.hpp"
  55. #include "FFPlay.hpp"
  56. #include "FRAME_WCamStateListF.h"
  57. #include "IdBaseComponent.hpp"
  58. #include "IdComponent.hpp"
  59. #include "IdIcmpClient.hpp"
  60. #include "IdRawBase.hpp"
  61. #include "IdRawClient.hpp"
  62. #include "ImageBtn.h"
  63. #include "XNVTViewerCtrlLib_OCX.h"
  64. #include "dxSkinBlack.hpp"
  65. #include "dxSkinMcSkin.hpp"
  66. //---------------------------------------------------------------------------
  67. class TWCAM020M : public TForm
  68. {
  69. __published: // IDE-managed Components
  70. TTimer *TmrShow;
  71. TPanel *PnlTop;
  72. TPanel *PnlRight;
  73. TPanel *PnlLeft;
  74. TPanel *PnlRTop;
  75. TcxGroupBox *GrpList;
  76. TcxGroupBox *cxGroupBox1;
  77. TImageList *ImageList1;
  78. TPanel *PnlCctv;
  79. TPanel *Panel2;
  80. TcxPageControl *PgCam;
  81. TcxTabSheet *TabRtsp;
  82. TcxButton *BtnWebCamUrl;
  83. TIdIcmpClient *IdIcmpClient1;
  84. TcxLabel *cxLabel9;
  85. TPanel *PnlCameraBack;
  86. TPanel *PnlCamConrtol;
  87. TcxButton *BtnImageSave;
  88. TPanel *PnlPTZ;
  89. TImageBtn *BtnUpLeft;
  90. TImageBtn *BtnUp;
  91. TImageBtn *BtnUpRight;
  92. TImageBtn *BtnLeft;
  93. TImageBtn *BtnHome;
  94. TImageBtn *BtnRight;
  95. TImageBtn *BtnDownLeft;
  96. TImageBtn *BtnDown;
  97. TImageBtn *BtnDownRight;
  98. TImageBtn *BtnZoomIn;
  99. TImageBtn *BtnZoomOut;
  100. TImageBtn *BtnFocusIn;
  101. TImageBtn *BtnFocusOut;
  102. TLabel *Label20;
  103. TTrackBar *PTZSpeed;
  104. TPanel *PnlBottome;
  105. TPanel *Panel1;
  106. TPanel *PnlCamera;
  107. TcxLabel *cxLabel14;
  108. TcxPageControl *PgControl;
  109. TcxTabSheet *TabPing;
  110. TcxGrid *CxPing;
  111. TcxGridBandedTableView *TvPing;
  112. TcxGridBandedColumn *ColumnSel;
  113. TcxGridBandedColumn *Col01;
  114. TcxGridBandedColumn *Col02;
  115. TcxGridBandedColumn *Col03;
  116. TcxGridBandedColumn *Col04;
  117. TcxGridBandedColumn *Col05;
  118. TcxGridBandedColumn *Col06;
  119. TcxGridBandedColumn *Col07;
  120. TcxGridBandedColumn *Col08;
  121. TcxGridBandedColumn *Col09;
  122. TcxGridBandedColumn *Col10;
  123. TcxGridBandedColumn *Col11;
  124. TcxGridBandedColumn *Col12;
  125. TcxGridBandedColumn *Col99;
  126. TcxGridLevel *GlPing;
  127. TPanel *PnlPing;
  128. TImage *ImgDesc99;
  129. TLabel *Label39;
  130. TLabel *Label40;
  131. TLabel *Label41;
  132. TLabel *Label42;
  133. TImage *ImgDesc98;
  134. TcxButton *BtnAllSelect0;
  135. TcxButton *BtnAllClear0;
  136. TcxButton *BtnReverse0;
  137. TcxSpinEdit *EdPingTimeout;
  138. TcxButton *BtnNwkPing;
  139. TcxButton *BtnNwkPingClear;
  140. TcxSpinEdit *EdPingPort;
  141. TcxButton *BtnAllSelect;
  142. TcxButton *BtnAllClear;
  143. TcxButton *BtnReverse;
  144. TcxLabel *lblSelCctv;
  145. TcxButton *BtnSaveImgFile;
  146. TcxLabel *cxLabel1;
  147. TcxLabel *cxLabel2;
  148. TcxTabSheet *TabPreset;
  149. TPanel *PnlPreset;
  150. TcxGrid *CxPreset;
  151. TcxGridTableView *TvPreset;
  152. TcxGridColumn *ColPresetNo;
  153. TcxGridColumn *ColPresetName;
  154. TcxGridColumn *ColPresetPan;
  155. TcxGridColumn *ColPresetTilt;
  156. TcxGridColumn *ColPresetZoom;
  157. TcxGridColumn *ColPresetFocus;
  158. TcxGridColumn *ColPresetAngle;
  159. TcxGridColumn *ColPresetDefault;
  160. TcxGridColumn *ColPresetDb;
  161. TcxGridLevel *GlPreset;
  162. TcxButton *BtnCctvPreset;
  163. TcxButton *BtnCctvPresetDel;
  164. TcxTextEdit *EdPresetName;
  165. TLabel *Label19;
  166. TImage *ImgDesc21;
  167. TLabel *Label18;
  168. TImage *ImgDesc20;
  169. TcxButton *BtnCctvPresetSet;
  170. TcxLabel *cxLabel3;
  171. TcxTextEdit *EdPresetNo;
  172. TcxLabel *cxLabel4;
  173. TcxSpinEdit *SePresetNo;
  174. TcxCheckBox *ChkCctvPresetDef;
  175. TFRAMEWCamStateList *FRAMEWCamStateList1;
  176. TXNVTViewerCtrl *XNVTViewerCtrl1;
  177. TMemo *reMsg;
  178. TFFPlayer *FFPlayer1;
  179. void __fastcall FormShow(TObject *Sender);
  180. void __fastcall TmrShowTimer(TObject *Sender);
  181. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  182. void __fastcall FormActivate(TObject *Sender);
  183. void __fastcall FormDeactivate(TObject *Sender);
  184. void __fastcall BtnAllSelectClick(TObject *Sender);
  185. void __fastcall FRAMEWCamStateList1TvListCellDblClick(TcxCustomGridTableView *Sender,
  186. TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  187. TShiftState AShift, bool &AHandled);
  188. void __fastcall BtnWebCamUrlClick(TObject *Sender);
  189. void __fastcall PgControlPageChanging(TObject *Sender, TcxTabSheet *NewPage,
  190. bool &AllowChange);
  191. void __fastcall BtnNwkPingClick(TObject *Sender);
  192. void __fastcall BtnNwkPingClearClick(TObject *Sender);
  193. void __fastcall Col04CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  194. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  195. void __fastcall IdIcmpClient1Reply(TComponent *ASender, const TReplyStatus *AReplyStatus);
  196. void __fastcall Col08CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  197. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  198. void __fastcall TvPingCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  199. TMouseButton AButton, TShiftState AShift,
  200. bool &AHandled);
  201. void __fastcall BtnZoomInOutMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  202. void __fastcall BtnZoomInOutMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  203. void __fastcall BtnFocusInOutMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  204. void __fastcall BtnFocusInOutMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  205. void __fastcall BtnPanTileMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  206. void __fastcall BtnPanTileMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  207. void __fastcall BtnSaveImgFileClick(TObject *Sender);
  208. void __fastcall BtnCctvPresetClick(TObject *Sender);
  209. void __fastcall BtnCctvPresetSetClick(TObject *Sender);
  210. void __fastcall BtnCctvPresetDelClick(TObject *Sender);
  211. void __fastcall TvPresetCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  212. TShiftState AShift, bool &AHandled);
  213. void __fastcall SePresetNoPropertiesEditValueChanged(TObject *Sender);
  214. void __fastcall reMsgDblClick(TObject *Sender);
  215. void __fastcall XNVTViewerCtrl1EventNotify(TObject *Sender, BSTR message, long message_size);
  216. void __fastcall FFPlayer1State(TObject *Sender, TPlayState APlayState);
  217. private: // User declarations
  218. void __fastcall CommClose();
  219. public:
  220. bool __fastcall OpenWebCamera();
  221. void __fastcall CloseWebCamera();
  222. bool __fastcall OpenRtsp();
  223. void __fastcall CloseRtsp();
  224. public:
  225. bool FTmrShow;
  226. TWCamCtlr *FSelCtlr;
  227. TStringList *FSelIds;
  228. String FTitle;
  229. bool FStrmPlay;
  230. String FStrmUser;
  231. String FStrmPswd;
  232. String FStrmHttp;
  233. String FStrmAddr;
  234. public: // User declarations
  235. __fastcall TWCAM020M(TComponent* Owner);
  236. void __fastcall LoadLocalSkin();
  237. void __fastcall DisplayInfo();
  238. void __fastcall ClearCheckList();
  239. int __fastcall GetSelListItems(bool ACommCheck=true);
  240. void __fastcall ActivateForm(bool AActivate);
  241. int FPingType;
  242. bool FPingTimeout;
  243. void __fastcall PingNetwork(String AIp, int APort);
  244. void __fastcall UpdatePingList();
  245. void __fastcall RefreshPingList(bool AInit=false);
  246. void __fastcall ClearPreset();
  247. void __fastcall InitPreset();
  248. void __fastcall OnMainFormMessage(TMessage &Msg);
  249. void __fastcall OnCctvStateRefreshMessage(TMessage &Msg);
  250. BEGIN_MESSAGE_MAP
  251. MESSAGE_HANDLER(WM_MAINFORM, TMessage, OnMainFormMessage)
  252. MESSAGE_HANDLER(WM_VMS_STATE_REFRESH, TMessage, OnCctvStateRefreshMessage)
  253. END_MESSAGE_MAP(TForm)
  254. };
  255. //---------------------------------------------------------------------------
  256. extern PACKAGE TWCAM020M *WCAM020M;
  257. //---------------------------------------------------------------------------
  258. #endif