FrmWebCamCtrlF.h 9.1 KB

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