FrmWebCamCtrlF.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. //---------------------------------------------------------------------------
  2. #ifndef FrmWebCamCtrlFH
  3. #define FrmWebCamCtrlFH
  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 "dxSkinBlack.hpp"
  64. #include "dxSkinsForm.hpp"
  65. #include <AppEvnts.hpp>
  66. #include "dxSkinMcSkin.hpp"
  67. #include "IdHTTP.hpp"
  68. #include "IdTCPClient.hpp"
  69. #include "IdTCPConnection.hpp"
  70. #include "IdAuthenticationDigest.hpp"
  71. #include "AcesTechXPlayer2Lib_OCX.h" /* idhttp ±ÇÇÑ ¼³Á¤À» À§ÇØ ÇÊ¿äÇÔ */
  72. //---------------------------------------------------------------------------
  73. class TFrmWebCamCtrl : public TForm
  74. {
  75. __published: // IDE-managed Components
  76. TTimer *TmrShow;
  77. TPanel *PnlTop;
  78. TPanel *PnlRight;
  79. TPanel *PnlLeft;
  80. TPanel *PnlRTop;
  81. TcxGroupBox *GrpList;
  82. TcxGroupBox *cxGroupBox1;
  83. TImageList *ImageList1;
  84. TPanel *PnlCctv;
  85. TPanel *Panel2;
  86. TcxPageControl *PgCam;
  87. TcxTabSheet *TabRtsp;
  88. TcxButton *BtnWebCamUrl;
  89. TIdIcmpClient *IdIcmpClient1;
  90. TcxLabel *cxLabel9;
  91. TPanel *PnlCameraBack;
  92. TPanel *PnlCamConrtol;
  93. TcxButton *BtnImageSave;
  94. TPanel *PnlPTZ;
  95. TImageBtn *BtnUpLeft;
  96. TImageBtn *BtnUp;
  97. TImageBtn *BtnUpRight;
  98. TImageBtn *BtnLeft;
  99. TImageBtn *BtnHome;
  100. TImageBtn *BtnRight;
  101. TImageBtn *BtnDownLeft;
  102. TImageBtn *BtnDown;
  103. TImageBtn *BtnDownRight;
  104. TImageBtn *BtnZoomIn;
  105. TImageBtn *BtnZoomOut;
  106. TImageBtn *BtnFocusIn;
  107. TImageBtn *BtnFocusOut;
  108. TLabel *Label20;
  109. TTrackBar *PTZSpeed;
  110. TPanel *PnlBottome;
  111. TPanel *Panel1;
  112. TPanel *PnlCamera;
  113. TcxLabel *cxLabel14;
  114. TcxPageControl *PgControl;
  115. TcxTabSheet *TabPing;
  116. TcxGrid *CxPing;
  117. TcxGridBandedTableView *TvPing;
  118. TcxGridBandedColumn *ColumnSel;
  119. TcxGridBandedColumn *Col01;
  120. TcxGridBandedColumn *Col02;
  121. TcxGridBandedColumn *Col03;
  122. TcxGridBandedColumn *Col04;
  123. TcxGridBandedColumn *Col05;
  124. TcxGridBandedColumn *Col06;
  125. TcxGridBandedColumn *Col07;
  126. TcxGridBandedColumn *Col08;
  127. TcxGridBandedColumn *Col09;
  128. TcxGridBandedColumn *Col10;
  129. TcxGridBandedColumn *Col11;
  130. TcxGridBandedColumn *Col12;
  131. TcxGridBandedColumn *Col99;
  132. TcxGridLevel *GlPing;
  133. TPanel *PnlPing;
  134. TImage *ImgDesc99;
  135. TLabel *Label39;
  136. TLabel *Label40;
  137. TLabel *Label41;
  138. TLabel *Label42;
  139. TImage *ImgDesc98;
  140. TcxButton *BtnAllSelect0;
  141. TcxButton *BtnAllClear0;
  142. TcxButton *BtnReverse0;
  143. TcxSpinEdit *EdPingTimeout;
  144. TcxButton *BtnNwkPing;
  145. TcxButton *BtnNwkPingClear;
  146. TcxSpinEdit *EdPingPort;
  147. TcxButton *BtnAllSelect;
  148. TcxButton *BtnAllClear;
  149. TcxButton *BtnReverse;
  150. TcxLabel *lblSelCctv;
  151. TcxButton *BtnSaveImgFile;
  152. TcxLabel *cxLabel1;
  153. TcxLabel *cxLabel2;
  154. TcxTabSheet *TabPreset;
  155. TPanel *PnlPreset;
  156. TcxGrid *CxPreset;
  157. TcxGridTableView *TvPreset;
  158. TcxGridColumn *ColPresetNo;
  159. TcxGridColumn *ColPresetName;
  160. TcxGridColumn *ColPresetPan;
  161. TcxGridColumn *ColPresetTilt;
  162. TcxGridColumn *ColPresetZoom;
  163. TcxGridColumn *ColPresetFocus;
  164. TcxGridColumn *ColPresetAngle;
  165. TcxGridColumn *ColPresetDefault;
  166. TcxGridColumn *ColPresetDb;
  167. TcxGridLevel *GlPreset;
  168. TcxButton *BtnCctvPreset;
  169. TcxButton *BtnCctvPresetDel;
  170. TcxTextEdit *EdPresetName;
  171. TLabel *Label19;
  172. TImage *ImgDesc21;
  173. TLabel *Label18;
  174. TImage *ImgDesc20;
  175. TcxButton *BtnCctvPresetSet;
  176. TcxLabel *cxLabel3;
  177. TcxTextEdit *EdPresetNo;
  178. TcxLabel *cxLabel4;
  179. TcxSpinEdit *SePresetNo;
  180. TcxCheckBox *ChkCctvPresetDef;
  181. TFRAMEWCamStateList *FRAMEWCamStateList1;
  182. TMemo *reMsg;
  183. TFFPlayer *FFPlayer1;
  184. TdxSkinController *dxSkinController1;
  185. TApplicationEvents *ApplicationEvents1;
  186. TcxButton *BtnStatRefresh;
  187. TTimer *TmrRefresh;
  188. TIdHTTP *IdHTTP1;
  189. TAcesTechXPlayer2 *AcesTechXPlayer21;
  190. void __fastcall FormShow(TObject *Sender);
  191. void __fastcall TmrShowTimer(TObject *Sender);
  192. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  193. void __fastcall FormActivate(TObject *Sender);
  194. void __fastcall FormDeactivate(TObject *Sender);
  195. void __fastcall BtnAllSelectClick(TObject *Sender);
  196. void __fastcall FRAMEWCamStateList1TvListCellDblClick(TcxCustomGridTableView *Sender,
  197. TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  198. TShiftState AShift, bool &AHandled);
  199. void __fastcall BtnWebCamUrlClick(TObject *Sender);
  200. void __fastcall PgControlPageChanging(TObject *Sender, TcxTabSheet *NewPage,
  201. bool &AllowChange);
  202. void __fastcall BtnNwkPingClick(TObject *Sender);
  203. void __fastcall BtnNwkPingClearClick(TObject *Sender);
  204. void __fastcall Col04CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  205. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  206. void __fastcall IdIcmpClient1Reply(TComponent *ASender, const TReplyStatus *AReplyStatus);
  207. void __fastcall Col08CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  208. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  209. void __fastcall TvPingCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  210. TMouseButton AButton, TShiftState AShift,
  211. bool &AHandled);
  212. void __fastcall BtnSaveImgFileClick(TObject *Sender);
  213. void __fastcall BtnCctvPresetClick(TObject *Sender);
  214. void __fastcall BtnCctvPresetSetClick(TObject *Sender);
  215. void __fastcall BtnCctvPresetDelClick(TObject *Sender);
  216. void __fastcall TvPresetCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  217. TShiftState AShift, bool &AHandled);
  218. void __fastcall SePresetNoPropertiesEditValueChanged(TObject *Sender);
  219. void __fastcall reMsgDblClick(TObject *Sender);
  220. void __fastcall FFPlayer1State(TObject *Sender, TPlayState APlayState);
  221. void __fastcall BtnStatRefreshClick(TObject *Sender);
  222. void __fastcall TmrRefreshTimer(TObject *Sender);
  223. void __fastcall IdHTTP1Authorization(TObject *Sender, TIdAuthentication *Authentication, bool &Handled);
  224. void __fastcall BtnUpMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  225. void __fastcall BtnUpMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  226. void __fastcall EdPresetNameKeyPress(TObject *Sender, wchar_t &Key);
  227. private: // User declarations
  228. void __fastcall CommClose();
  229. public:
  230. bool __fastcall OpenRtsp();
  231. void __fastcall CloseRtsp();
  232. public:
  233. bool FTmrShow;
  234. TWCamCtlr *FSelCtlr;
  235. TStringList *FSelIds;
  236. String FTitle;
  237. bool FStrmPlay;
  238. String FStrmUser;
  239. String FStrmPswd;
  240. String FStrmHttp;
  241. String FStrmAddr;
  242. long FStrmHandle;
  243. public: // User declarations
  244. __fastcall TFrmWebCamCtrl(TComponent* Owner);
  245. void __fastcall LoadLocalSkin();
  246. void __fastcall DisplayInfo();
  247. void __fastcall ClearCheckList();
  248. int __fastcall GetSelListItems(bool ACommCheck=true);
  249. void __fastcall ActivateForm(bool AActivate);
  250. int FPingType;
  251. bool FPingTimeout;
  252. void __fastcall PingNetwork(String AIp, int APort);
  253. void __fastcall UpdatePingList();
  254. void __fastcall RefreshPingList(bool AInit=false);
  255. void __fastcall ClearPreset();
  256. void __fastcall InitPreset();
  257. void __fastcall OnMainFormMessage(TMessage &Msg);
  258. void __fastcall OnCctvStateRefreshMessage(TMessage &Msg);
  259. BEGIN_MESSAGE_MAP
  260. MESSAGE_HANDLER(WM_MAINFORM, TMessage, OnMainFormMessage)
  261. MESSAGE_HANDLER(WM_VMS_STATE_REFRESH, TMessage, OnCctvStateRefreshMessage)
  262. END_MESSAGE_MAP(TForm)
  263. };
  264. //---------------------------------------------------------------------------
  265. extern PACKAGE TFrmWebCamCtrl *FrmWebCamCtrl;
  266. //---------------------------------------------------------------------------
  267. #endif