VMS0500MF.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  1. //---------------------------------------------------------------------------
  2. #ifndef VMS0500MFH
  3. #define VMS0500MFH
  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 "CDSVmsCtlrF.h"
  21. //---------------------------------------------------------------------------
  22. #include "cxContainer.hpp"
  23. #include "cxControls.hpp"
  24. #include "cxEdit.hpp"
  25. #include "cxGraphics.hpp"
  26. #include "cxGroupBox.hpp"
  27. #include "cxLabel.hpp"
  28. #include "cxLookAndFeelPainters.hpp"
  29. #include "cxLookAndFeels.hpp"
  30. #include "cxPC.hpp"
  31. #include "cxPCdxBarPopupMenu.hpp"
  32. #include "cxSplitter.hpp"
  33. #include "dxSkinBlack.hpp"
  34. #include "dxSkinBlue.hpp"
  35. #include "dxSkinCaramel.hpp"
  36. #include "dxSkinCoffee.hpp"
  37. #include "dxSkinDarkRoom.hpp"
  38. #include "dxSkinDarkSide.hpp"
  39. #include "dxSkinFoggy.hpp"
  40. #include "dxSkinGlassOceans.hpp"
  41. #include "dxSkiniMaginary.hpp"
  42. #include "dxSkinLilian.hpp"
  43. #include "dxSkinLiquidSky.hpp"
  44. #include "dxSkinLondonLiquidSky.hpp"
  45. #include "dxSkinMcSkin.hpp"
  46. #include "dxSkinMoneyTwins.hpp"
  47. #include "dxSkinOffice2007Black.hpp"
  48. #include "dxSkinOffice2007Blue.hpp"
  49. #include "dxSkinOffice2007Green.hpp"
  50. #include "dxSkinOffice2007Pink.hpp"
  51. #include "dxSkinOffice2007Silver.hpp"
  52. #include "dxSkinOffice2010Black.hpp"
  53. #include "dxSkinOffice2010Blue.hpp"
  54. #include "dxSkinOffice2010Silver.hpp"
  55. #include "dxSkinsCore.hpp"
  56. #include "dxSkinscxPCPainter.hpp"
  57. #include "dxSkinSeven.hpp"
  58. #include "dxSkinSharp.hpp"
  59. #include "dxSkinSilver.hpp"
  60. #include "dxSkinStardust.hpp"
  61. #include "cxClasses.hpp"
  62. #include "cxCustomData.hpp"
  63. #include "cxData.hpp"
  64. #include "cxDataStorage.hpp"
  65. #include "cxFilter.hpp"
  66. #include "cxGrid.hpp"
  67. #include "cxGridCustomTableView.hpp"
  68. #include "cxGridCustomView.hpp"
  69. #include "cxGridLevel.hpp"
  70. #include "cxGridTableView.hpp"
  71. #include "cxStyles.hpp"
  72. #include "cxTextEdit.hpp"
  73. #include "cxGridCardView.hpp"
  74. #include "cxGridCustomLayoutView.hpp"
  75. #include "cxCheckBox.hpp"
  76. #include "cxDropDownEdit.hpp"
  77. #include "cxImage.hpp"
  78. #include "cxButtons.hpp"
  79. #include "cxCalc.hpp"
  80. #include "cxGridBandedTableView.hpp"
  81. #include "FRAME_VmsStateListF.h"
  82. #include "FRAME_VmsStateF.h"
  83. #include "FRAME_VmsMsgListF.h"
  84. #include "ImageBtn.h"
  85. #include "cxMaskEdit.hpp"
  86. #include "cxRadioGroup.hpp"
  87. #include "cxSpinEdit.hpp"
  88. #include "cxTimeEdit.hpp"
  89. #include <OleCtrls.hpp>
  90. #include <SHDocVw.hpp>
  91. //---------------------------------------------------------------------------
  92. #include "FrmSamsungPlayer1F.h"
  93. #include "IdBaseComponent.hpp"
  94. #include "IdComponent.hpp"
  95. #include "IdIcmpClient.hpp"
  96. #include "IdRawBase.hpp"
  97. #include "IdRawClient.hpp"
  98. #include "XNSSDKDEVICELib_OCX.h"
  99. #include "XNSSDKWINDOWLib_OCX.h"
  100. //---------------------------------------------------------------------------
  101. class TVMS0500M : public TForm
  102. {
  103. __published: // IDE-managed Components
  104. TTimer *TmrShow;
  105. TPanel *PnlCenter;
  106. TPanel *PnlRight;
  107. TPanel *PnlLeft;
  108. TPanel *PnlRTop;
  109. TcxGroupBox *GrpList;
  110. TcxGroupBox *cxGroupBox1;
  111. TcxGroupBox *cxGroupBox2;
  112. TcxPageControl *PgControl;
  113. TcxTabSheet *cxTabSheet3;
  114. TcxTabSheet *cxTabSheet1;
  115. TcxTabSheet *cxTabSheet2;
  116. TImageList *ImageList1;
  117. TcxButton *BtnAllClear;
  118. TcxButton *BtnReverse;
  119. TcxButton *BtnAllSelect;
  120. TPanel *PnlVms;
  121. TPanel *Panel2;
  122. TcxRadioButton *RdbOn;
  123. TcxRadioButton *RdbOff;
  124. TcxRadioButton *RdbReset;
  125. TcxButton *BtnControl;
  126. TcxTimeEdit *cxTimeOn;
  127. TcxTimeEdit *cxTimeOff;
  128. TImage *ImgDesc11;
  129. TImage *ImgDesc01;
  130. TcxButton *BtnOnOffSet;
  131. TImage *ImgDesc40;
  132. TLabel *Label5;
  133. TImage *ImgDesc41;
  134. TLabel *Label8;
  135. TLabel *Label13;
  136. TImage *ImgDesc42;
  137. TLabel *Label2;
  138. TImage *ImgDesc43;
  139. TLabel *Label15;
  140. TImage *ImgDesc44;
  141. TImage *ImgDesc61;
  142. TImage *ImgDesc62;
  143. TLabel *Label6;
  144. TLabel *Label4;
  145. TLabel *Label16;
  146. TLabel *Label7;
  147. TLabel *Label9;
  148. TLabel *Label10;
  149. TLabel *Label11;
  150. TLabel *Label12;
  151. TLabel *Label17;
  152. TcxSpinEdit *Se03;
  153. TcxSpinEdit *Se04;
  154. TcxSpinEdit *Se02;
  155. TcxSpinEdit *Se05;
  156. TcxSpinEdit *Se01;
  157. TcxSpinEdit *Se06;
  158. TcxSpinEdit *Se07;
  159. TLabel *Label1;
  160. TLabel *Label14;
  161. TcxButton *BtnConfig;
  162. TcxTabSheet *cxTabSheet4;
  163. TcxRadioButton *RdbAuto;
  164. TcxRadioButton *RdbFix;
  165. TcxRadioButton *RdbBase;
  166. TcxButton *BtnModeControl;
  167. TLabel *Label18;
  168. TcxRadioButton *RdbLuminance;
  169. TcxSpinEdit *SeLuminance;
  170. TLabel *Label19;
  171. TcxPageControl *PgCam;
  172. TcxTabSheet *TabRtsp;
  173. TPanel *PnlCamera;
  174. TLabel *Label3;
  175. TcxButton *BtnWebCamUrl;
  176. TcxButton *BtnDefaultMsg;
  177. TcxButton *BtnBlankDisplay;
  178. TPanel *PnlVmsCam;
  179. TPanel *PnlCamConrtol;
  180. TcxButton *BtnImageSave;
  181. TPanel *PnlPTZ;
  182. TImageBtn *BtnUpLeft;
  183. TImageBtn *BtnUp;
  184. TImageBtn *BtnUpRight;
  185. TImageBtn *BtnLeft;
  186. TImageBtn *BtnHome;
  187. TImageBtn *BtnRight;
  188. TImageBtn *BtnDownLeft;
  189. TImageBtn *BtnDown;
  190. TImageBtn *BtnDownRight;
  191. TImageBtn *BtnZoomIn;
  192. TImageBtn *BtnZoomOut;
  193. TImageBtn *BtnFocusIn;
  194. TImageBtn *BtnFocusOut;
  195. TLabel *Label20;
  196. TTrackBar *PTZSpeed;
  197. TcxTabSheet *cxTabSheet5;
  198. TcxButton *BtnParamSetting;
  199. TImage *ImgDesc57;
  200. TLabel *Label21;
  201. TcxTimeEdit *cxDisplayTimeOn;
  202. TcxTimeEdit *cxDisplayTimeOff;
  203. TImage *ImgDesc53;
  204. TLabel *Label23;
  205. TImage *ImgDesc54;
  206. TLabel *Label24;
  207. TLabel *Label25;
  208. TImage *ImgDesc52;
  209. TLabel *Label26;
  210. TImage *ImgDesc56;
  211. TLabel *Label27;
  212. TImage *ImgDesc51;
  213. TLabel *Label28;
  214. TLabel *Label29;
  215. TLabel *Label30;
  216. TLabel *Label31;
  217. TLabel *Label32;
  218. TcxSpinEdit *SeModRate;
  219. TcxSpinEdit *SeModCycle;
  220. TcxSpinEdit *SeLumDay;
  221. TcxSpinEdit *SeMsgTime;
  222. TcxSpinEdit *SeLumNight;
  223. TLabel *Label33;
  224. TcxSpinEdit *SeCommErrTime;
  225. TcxSpinEdit *SeSlotCommErr;
  226. TcxSpinEdit *SeSlotPowerErr;
  227. TcxButton *BtnDefMsgDownload;
  228. TcxTabSheet *cxTabSheet6;
  229. TGroupBox *GroupBox1;
  230. TImage *ImgDesc59;
  231. TLabel *Label22;
  232. TcxSpinEdit *SeFormCycleTime;
  233. TLabel *Label34;
  234. TcxButton *BtnDisplayTimeSet;
  235. TcxButton *BtnMsgImmediateDownload;
  236. TTimer *TmrCommand;
  237. TLabel *Label35;
  238. TLabel *Label36;
  239. TLabel *Label37;
  240. TLabel *Label38;
  241. TFRAMEVmsStateList *FRAMEVmsStateList1;
  242. TcxTabSheet *TabPing;
  243. TcxGrid *CxPing;
  244. TcxGridBandedTableView *TvPing;
  245. TcxGridBandedColumn *ColumnSel;
  246. TcxGridBandedColumn *Col01;
  247. TcxGridBandedColumn *Col02;
  248. TcxGridBandedColumn *Col03;
  249. TcxGridBandedColumn *Col04;
  250. TcxGridBandedColumn *Col05;
  251. TcxGridBandedColumn *Col06;
  252. TcxGridBandedColumn *Col07;
  253. TcxGridBandedColumn *Col08;
  254. TcxGridBandedColumn *Col09;
  255. TcxGridBandedColumn *Col10;
  256. TcxGridBandedColumn *Col11;
  257. TcxGridBandedColumn *Col12;
  258. TcxGridBandedColumn *Col99;
  259. TcxGridLevel *GlPing;
  260. TPanel *PnlPing;
  261. TcxButton *BtnAllSelect0;
  262. TcxButton *BtnAllClear0;
  263. TcxButton *BtnReverse0;
  264. TImage *ImgDesc99;
  265. TLabel *Label39;
  266. TcxSpinEdit *EdPingTimeout;
  267. TLabel *Label40;
  268. TcxButton *BtnNwkPing;
  269. TcxButton *BtnNwkPingClear;
  270. TIdIcmpClient *IdIcmpClient1;
  271. TcxSpinEdit *EdPingPort;
  272. TLabel *Label41;
  273. TLabel *Label42;
  274. TImage *ImgDesc98;
  275. TPanel *PnlSamsung;
  276. TXnsSdkDevice *XnsSdkDevice1;
  277. TXnsSdkWindow *XnsSdkWindow1;
  278. TcxLabel *LblErrMsg;
  279. TcxLabel *lblSelVms;
  280. TcxLabel *cxLabel1;
  281. TcxLabel *cxLabel2;
  282. TcxLabel *cxLabel3;
  283. TcxLabel *cxLabel4;
  284. TcxLabel *cxLabel5;
  285. TcxLabel *cxLabel9;
  286. TcxLabel *cxLabel6;
  287. TcxLabel *cxLabel7;
  288. TcxLabel *cxLabel8;
  289. TcxLabel *cxLabel10;
  290. TcxLabel *cxLabel11;
  291. TcxLabel *cxLabel12;
  292. TcxLabel *cxLabel13;
  293. TcxLabel *cxLabel14;
  294. TcxLabel *cxLabel15;
  295. TcxLabel *cxLabel16;
  296. TcxLabel *cxLabel17;
  297. TcxLabel *cxLabel18;
  298. TcxLabel *cxLabel19;
  299. TcxLabel *cxLabel20;
  300. TcxLabel *cxLabel21;
  301. TcxLabel *cxLabel22;
  302. TcxLabel *cxLabel23;
  303. TcxLabel *cxLabel24;
  304. TcxLabel *cxLabel25;
  305. TcxLabel *cxLabel26;
  306. TcxLabel *cxLabel27;
  307. TcxLabel *cxLabel28;
  308. TcxLabel *cxLabel30;
  309. TcxLabel *cxLabel31;
  310. TcxLabel *cxLabel32;
  311. void __fastcall FormShow(TObject *Sender);
  312. void __fastcall TmrShowTimer(TObject *Sender);
  313. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  314. void __fastcall FormActivate(TObject *Sender);
  315. void __fastcall FormDeactivate(TObject *Sender);
  316. void __fastcall BtnAllSelectClick(TObject *Sender);
  317. void __fastcall FRAMEVmsStateList1TvListCellDblClick(TcxCustomGridTableView *Sender,
  318. TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  319. TShiftState AShift, bool &AHandled);
  320. void __fastcall Se01PropertiesChange(TObject *Sender);
  321. void __fastcall BtnConfigClick(TObject *Sender);
  322. void __fastcall BtnControlClick(TObject *Sender);
  323. void __fastcall BtnOnOffSetClick(TObject *Sender);
  324. void __fastcall BtnModeControlClick(TObject *Sender);
  325. void __fastcall BtnWebCamUrlClick(TObject *Sender);
  326. void __fastcall BtnDefaultMsgClick(TObject *Sender);
  327. void __fastcall BtnUpLeftMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  328. int X, int Y);
  329. void __fastcall BtnUpLeftMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift,
  330. int X, int Y);
  331. void __fastcall BtnParamSettingClick(TObject *Sender);
  332. void __fastcall BtnDefMsgDownloadClick(TObject *Sender);
  333. void __fastcall BtnDisplayTimeSetClick(TObject *Sender);
  334. void __fastcall BtnMsgImmediateDownloadClick(TObject *Sender);
  335. void __fastcall TmrCommandTimer(TObject *Sender);
  336. void __fastcall PgControlPageChanging(TObject *Sender, TcxTabSheet *NewPage,
  337. bool &AllowChange);
  338. void __fastcall BtnNwkPingClick(TObject *Sender);
  339. void __fastcall BtnNwkPingClearClick(TObject *Sender);
  340. void __fastcall Col04CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  341. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  342. void __fastcall IdIcmpClient1Reply(TComponent *ASender, const TReplyStatus *AReplyStatus);
  343. void __fastcall Col08CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  344. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  345. void __fastcall TvPingCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  346. TMouseButton AButton, TShiftState AShift,
  347. bool &AHandled);
  348. void __fastcall XnsSdkDevice1ConnectFailed(TObject *Sender, long nWidth, long nHeight);
  349. void __fastcall XnsSdkDevice1DeviceStatusChanged(TObject *Sender, long nDeviceID,
  350. long nErrorCode, long nDeviceStatus, long nHddCondition);
  351. private: // User declarations
  352. void __fastcall CommClose();
  353. public:
  354. long m_hDevice; // Device handle
  355. long m_lDeviceId; // Device handle
  356. long m_hMediaSource; // Media stream ID
  357. long m_nControlId; // Control ID
  358. bool m_bIsMediaPlay; // Media play or stop
  359. bool FInitialize;
  360. String FStrmAddr;
  361. String FId;
  362. String FLoc;
  363. WideString FDefModel;
  364. WideString FModelName;
  365. WideString FIpAddress;
  366. int FPort;
  367. WideString FConnId;
  368. WideString FConnPass;
  369. String FCaption;
  370. void __fastcall ErrorMsg(String AErrMsg);
  371. bool __fastcall SetupWebCamera();
  372. void __fastcall WebCamPlay();
  373. void __fastcall WebCamStop();
  374. void __fastcall ReleaseWebCamera();
  375. bool __fastcall ConnectWebCamera();
  376. bool __fastcall OpenWebCamera();
  377. void __fastcall DisconnectWebCamera();
  378. void __fastcall CloseWebCamera();
  379. int __fastcall CameraControl(int ACommand, int ASpeed);
  380. int __fastcall Play(String AId,
  381. String ALoc,
  382. String AIpAddress,
  383. int APort,
  384. String AConnId,
  385. String AConnPass,
  386. String AComModel,
  387. String ADevModel);
  388. public:
  389. TForm *FPalyerForm;
  390. TVmsCtlr *FSelVmsObj;
  391. TStringList *FVmsIds;
  392. String FTitle;
  393. long FRtspHandle;
  394. TcxTabSheet *FCtrlTab;
  395. bool FInitPlayer;
  396. public: // User declarations
  397. __fastcall TVMS0500M(TComponent* Owner);
  398. bool FHtmlCompleted;
  399. void *fJSExec;
  400. bool __fastcall ExecScript(String AScript);
  401. String FCamUrl;
  402. void __fastcall OpenUrl(bool AOpen);
  403. void __fastcall LoadLocalSkin();
  404. void __fastcall DisplayInfo();
  405. void __fastcall ClearCheckList();
  406. int __fastcall GetSelListItems(bool ACommCheck=true);
  407. void __fastcall ActivateForm(bool AActivate);
  408. bool __fastcall UpdateVmsParam(String AVmsNmbr, void *pData);
  409. bool __fastcall UpdateVmsParam2(String AVmsNmbr, void *pData);
  410. void __fastcall ShowVmsWebCam(String AVmsNo);
  411. void __fastcall controlCamera(int ACommand);
  412. int FPingType;
  413. bool FPingTimeout;
  414. void __fastcall PingNetwork(String AIp, int APort);
  415. void __fastcall UpdatePingList();
  416. void __fastcall RefreshPingList(bool AInit=false);
  417. void __fastcall OnVmsSelectMessage(TMessage &Msg);
  418. void __fastcall OnMainFormMessage(TMessage &Msg);
  419. void __fastcall OnVmsStateRefreshMessage(TMessage &Msg);
  420. void __fastcall OnVmsFormRefreshMessage(TMessage &Msg);
  421. BEGIN_MESSAGE_MAP
  422. MESSAGE_HANDLER(WM_VMS_SELECT, TMessage, OnVmsSelectMessage)
  423. MESSAGE_HANDLER(WM_MAINFORM, TMessage, OnMainFormMessage)
  424. MESSAGE_HANDLER(WM_VMS_STATE_REFRESH, TMessage, OnVmsStateRefreshMessage)
  425. MESSAGE_HANDLER(WM_VMS_FORM_REFRESH, TMessage, OnVmsFormRefreshMessage)
  426. END_MESSAGE_MAP(TForm)
  427. };
  428. //---------------------------------------------------------------------------
  429. extern PACKAGE TVMS0500M *VMS0500M;
  430. //---------------------------------------------------------------------------
  431. #endif