CTV0500MF.h 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. //---------------------------------------------------------------------------
  2. #ifndef CTV0500MFH
  3. #define CTV0500MFH
  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 "CenterCommF.h"
  18. #include "DataTypesF.h"
  19. #include "WindowMsgF.h"
  20. #include "CDSCctvCtlrF.h"
  21. #include "cxButtons.hpp"
  22. #include "cxCalc.hpp"
  23. #include "cxCheckBox.hpp"
  24. #include "cxClasses.hpp"
  25. #include "cxContainer.hpp"
  26. #include "cxControls.hpp"
  27. #include "cxCustomData.hpp"
  28. #include "cxData.hpp"
  29. #include "cxDataStorage.hpp"
  30. #include "cxEdit.hpp"
  31. #include "cxFilter.hpp"
  32. #include "cxGraphics.hpp"
  33. #include "cxGrid.hpp"
  34. #include "cxGridBandedTableView.hpp"
  35. #include "cxGridCustomTableView.hpp"
  36. #include "cxGridCustomView.hpp"
  37. #include "cxGridLevel.hpp"
  38. #include "cxGridTableView.hpp"
  39. #include "cxGroupBox.hpp"
  40. #include "cxLabel.hpp"
  41. #include "cxLookAndFeelPainters.hpp"
  42. #include "cxLookAndFeels.hpp"
  43. #include "cxMaskEdit.hpp"
  44. #include "cxPC.hpp"
  45. #include "cxPCdxBarPopupMenu.hpp"
  46. #include "cxSpinEdit.hpp"
  47. #include "cxStyles.hpp"
  48. #include "cxTextEdit.hpp"
  49. #include "dxSkinBlack.hpp"
  50. #include "dxSkinBlue.hpp"
  51. #include "dxSkinCaramel.hpp"
  52. #include "dxSkinCoffee.hpp"
  53. #include "dxSkinDarkRoom.hpp"
  54. #include "dxSkinDarkSide.hpp"
  55. #include "dxSkinFoggy.hpp"
  56. #include "dxSkinGlassOceans.hpp"
  57. #include "dxSkiniMaginary.hpp"
  58. #include "dxSkinLilian.hpp"
  59. #include "dxSkinLiquidSky.hpp"
  60. #include "dxSkinLondonLiquidSky.hpp"
  61. #include "dxSkinMcSkin.hpp"
  62. #include "dxSkinMoneyTwins.hpp"
  63. #include "dxSkinOffice2007Black.hpp"
  64. #include "dxSkinOffice2007Blue.hpp"
  65. #include "dxSkinOffice2007Green.hpp"
  66. #include "dxSkinOffice2007Pink.hpp"
  67. #include "dxSkinOffice2007Silver.hpp"
  68. #include "dxSkinOffice2010Black.hpp"
  69. #include "dxSkinOffice2010Blue.hpp"
  70. #include "dxSkinOffice2010Silver.hpp"
  71. #include "dxSkinsCore.hpp"
  72. #include "dxSkinscxPCPainter.hpp"
  73. #include "dxSkinSeven.hpp"
  74. #include "dxSkinSharp.hpp"
  75. #include "dxSkinSilver.hpp"
  76. #include "dxSkinStardust.hpp"
  77. #include "FRAME_CctvStateListF.h"
  78. #include "IdBaseComponent.hpp"
  79. #include "IdComponent.hpp"
  80. #include "IdIcmpClient.hpp"
  81. #include "IdRawBase.hpp"
  82. #include "IdRawClient.hpp"
  83. #include "ImageBtn.h"
  84. #include "NVSVIEWERCTRLLib_OCX.h"
  85. #include <OleCtrls.hpp>
  86. //---------------------------------------------------------------------------
  87. //---------------------------------------------------------------------------
  88. class TCTV0500M : public TForm
  89. {
  90. __published: // IDE-managed Components
  91. TTimer *TmrShow;
  92. TPanel *PnlTop;
  93. TPanel *PnlRight;
  94. TPanel *PnlLeft;
  95. TPanel *PnlRTop;
  96. TcxGroupBox *GrpList;
  97. TcxGroupBox *cxGroupBox1;
  98. TImageList *ImageList1;
  99. TPanel *PnlCctv;
  100. TPanel *Panel2;
  101. TcxPageControl *PgCam;
  102. TcxTabSheet *TabRtsp;
  103. TcxButton *BtnWebCamUrl;
  104. TIdIcmpClient *IdIcmpClient1;
  105. TcxLabel *cxLabel9;
  106. TPanel *PnlCameraBack;
  107. TPanel *PnlCamConrtol;
  108. TcxButton *BtnImageSave;
  109. TPanel *PnlPTZ;
  110. TImageBtn *BtnUpLeft;
  111. TImageBtn *BtnUp;
  112. TImageBtn *BtnUpRight;
  113. TImageBtn *BtnLeft;
  114. TImageBtn *BtnHome;
  115. TImageBtn *BtnRight;
  116. TImageBtn *BtnDownLeft;
  117. TImageBtn *BtnDown;
  118. TImageBtn *BtnDownRight;
  119. TImageBtn *BtnZoomIn;
  120. TImageBtn *BtnZoomOut;
  121. TImageBtn *BtnFocusIn;
  122. TImageBtn *BtnFocusOut;
  123. TLabel *Label20;
  124. TTrackBar *PTZSpeed;
  125. TFRAMECctvStateList *FRAMECctvStateList1;
  126. TPanel *PnlBottome;
  127. TPanel *Panel1;
  128. TPanel *PnlCamera;
  129. TcxLabel *cxLabel14;
  130. TcxPageControl *PgControl;
  131. TcxTabSheet *TabPing;
  132. TcxGrid *CxPing;
  133. TcxGridBandedTableView *TvPing;
  134. TcxGridBandedColumn *ColumnSel;
  135. TcxGridBandedColumn *Col01;
  136. TcxGridBandedColumn *Col02;
  137. TcxGridBandedColumn *Col03;
  138. TcxGridBandedColumn *Col04;
  139. TcxGridBandedColumn *Col05;
  140. TcxGridBandedColumn *Col06;
  141. TcxGridBandedColumn *Col07;
  142. TcxGridBandedColumn *Col08;
  143. TcxGridBandedColumn *Col09;
  144. TcxGridBandedColumn *Col10;
  145. TcxGridBandedColumn *Col11;
  146. TcxGridBandedColumn *Col12;
  147. TcxGridBandedColumn *Col99;
  148. TcxGridLevel *GlPing;
  149. TPanel *PnlPing;
  150. TImage *ImgDesc99;
  151. TLabel *Label39;
  152. TLabel *Label40;
  153. TLabel *Label41;
  154. TLabel *Label42;
  155. TImage *ImgDesc98;
  156. TcxButton *BtnAllSelect0;
  157. TcxButton *BtnAllClear0;
  158. TcxButton *BtnReverse0;
  159. TcxSpinEdit *EdPingTimeout;
  160. TcxButton *BtnNwkPing;
  161. TcxButton *BtnNwkPingClear;
  162. TcxSpinEdit *EdPingPort;
  163. TcxButton *BtnAllSelect;
  164. TcxButton *BtnAllClear;
  165. TcxButton *BtnReverse;
  166. TcxLabel *lblSelCctv;
  167. TNVSViewerCtrl *NVSViewerCtrl1;
  168. TcxButton *BtnSaveImgFile;
  169. TcxLabel *cxLabel1;
  170. TcxLabel *cxLabel2;
  171. TcxTabSheet *TabPreset;
  172. TPanel *PnlPreset;
  173. TcxGrid *CxPreset;
  174. TcxGridTableView *TvPreset;
  175. TcxGridColumn *ColPresetNo;
  176. TcxGridColumn *ColPresetName;
  177. TcxGridColumn *ColPresetPan;
  178. TcxGridColumn *ColPresetTilt;
  179. TcxGridColumn *ColPresetZoom;
  180. TcxGridColumn *ColPresetFocus;
  181. TcxGridColumn *ColPresetAngle;
  182. TcxGridColumn *ColPresetDefault;
  183. TcxGridColumn *ColPresetDb;
  184. TcxGridLevel *GlPreset;
  185. TcxButton *BtnCctvPreset;
  186. TcxButton *BtnCctvPresetDel;
  187. TcxTextEdit *EdPresetName;
  188. TLabel *Label19;
  189. TImage *ImgDesc21;
  190. TLabel *Label18;
  191. TImage *ImgDesc20;
  192. TcxButton *BtnCctvPresetSet;
  193. TcxLabel *cxLabel3;
  194. TcxTextEdit *EdPresetNo;
  195. TcxLabel *cxLabel4;
  196. TcxSpinEdit *SePresetNo;
  197. TcxCheckBox *ChkCctvPresetDef;
  198. void __fastcall FormShow(TObject *Sender);
  199. void __fastcall TmrShowTimer(TObject *Sender);
  200. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  201. void __fastcall FormActivate(TObject *Sender);
  202. void __fastcall FormDeactivate(TObject *Sender);
  203. void __fastcall BtnAllSelectClick(TObject *Sender);
  204. void __fastcall FRAMECctvStateList1TvListCellDblClick(TcxCustomGridTableView *Sender,
  205. TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  206. TShiftState AShift, bool &AHandled);
  207. void __fastcall BtnWebCamUrlClick(TObject *Sender);
  208. void __fastcall PgControlPageChanging(TObject *Sender, TcxTabSheet *NewPage,
  209. bool &AllowChange);
  210. void __fastcall BtnNwkPingClick(TObject *Sender);
  211. void __fastcall BtnNwkPingClearClick(TObject *Sender);
  212. void __fastcall Col04CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  213. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  214. void __fastcall IdIcmpClient1Reply(TComponent *ASender, const TReplyStatus *AReplyStatus);
  215. void __fastcall Col08CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  216. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  217. void __fastcall TvPingCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  218. TMouseButton AButton, TShiftState AShift,
  219. bool &AHandled);
  220. void __fastcall BtnZoomInOutMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  221. void __fastcall BtnZoomInOutMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  222. void __fastcall BtnFocusInOutMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  223. void __fastcall BtnFocusInOutMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  224. void __fastcall BtnPanTileMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  225. void __fastcall BtnPanTileMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  226. void __fastcall BtnSaveImgFileClick(TObject *Sender);
  227. void __fastcall BtnCctvPresetClick(TObject *Sender);
  228. void __fastcall BtnCctvPresetSetClick(TObject *Sender);
  229. void __fastcall BtnCctvPresetDelClick(TObject *Sender);
  230. void __fastcall TvPresetCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  231. TShiftState AShift, bool &AHandled);
  232. void __fastcall SePresetNoPropertiesEditValueChanged(TObject *Sender);
  233. private: // User declarations
  234. void __fastcall CommClose();
  235. public:
  236. bool __fastcall OpenWebCamera();
  237. void __fastcall CloseWebCamera();
  238. public:
  239. bool FTmrShow;
  240. TCctvCtlr *FSelCtlr;
  241. TStringList *FCctvIds;
  242. String FTitle;
  243. public: // User declarations
  244. __fastcall TCTV0500M(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 TCTV0500M *CTV0500M;
  266. //---------------------------------------------------------------------------
  267. #endif