VMS0500MF.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  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 "IdBaseComponent.hpp"
  93. #include "IdComponent.hpp"
  94. #include "IdIcmpClient.hpp"
  95. #include "IdRawBase.hpp"
  96. #include "IdRawClient.hpp"
  97. #include "FFBaseComponent.hpp"
  98. #include "FFBasePlay.hpp"
  99. #include "FFPlay.hpp"
  100. #include "IdHTTP.hpp"
  101. #include "IdTCPClient.hpp"
  102. #include "IdTCPConnection.hpp"
  103. #include "IdAuthenticationDigest.hpp"
  104. #include "AcesTechXPlayer2Lib_OCX.h" /* idhttp ±ÇÇÑ ¼³Á¤À» À§ÇØ ÇÊ¿äÇÔ */
  105. //---------------------------------------------------------------------------
  106. class TVMS0500M : public TForm
  107. {
  108. __published: // IDE-managed Components
  109. TTimer *TmrShow;
  110. TPanel *PnlCenter;
  111. TPanel *PnlRight;
  112. TPanel *PnlLeft;
  113. TPanel *PnlRTop;
  114. TcxGroupBox *GrpList;
  115. TcxGroupBox *cxGroupBox1;
  116. TcxGroupBox *cxGroupBox2;
  117. TcxPageControl *PgControl;
  118. TcxTabSheet *cxTabSheet3;
  119. TcxTabSheet *cxTabSheet1;
  120. TcxTabSheet *cxTabSheet2;
  121. TImageList *ImageList1;
  122. TcxButton *BtnAllClear;
  123. TcxButton *BtnReverse;
  124. TcxButton *BtnAllSelect;
  125. TPanel *PnlVms;
  126. TPanel *Panel2;
  127. TcxRadioButton *RdbOn;
  128. TcxRadioButton *RdbOff;
  129. TcxRadioButton *RdbReset;
  130. TcxButton *BtnControl;
  131. TcxTimeEdit *cxTimeOn;
  132. TcxTimeEdit *cxTimeOff;
  133. TImage *ImgDesc11;
  134. TImage *ImgDesc01;
  135. TcxButton *BtnOnOffSet;
  136. TImage *ImgDesc40;
  137. TLabel *Label5;
  138. TImage *ImgDesc41;
  139. TLabel *Label8;
  140. TLabel *Label13;
  141. TImage *ImgDesc42;
  142. TLabel *Label2;
  143. TImage *ImgDesc43;
  144. TLabel *Label15;
  145. TImage *ImgDesc44;
  146. TImage *ImgDesc61;
  147. TImage *ImgDesc62;
  148. TLabel *Label6;
  149. TLabel *Label4;
  150. TLabel *Label16;
  151. TLabel *Label7;
  152. TLabel *Label9;
  153. TLabel *Label10;
  154. TLabel *Label11;
  155. TLabel *Label12;
  156. TLabel *Label17;
  157. TcxSpinEdit *Se03;
  158. TcxSpinEdit *Se04;
  159. TcxSpinEdit *Se02;
  160. TcxSpinEdit *Se05;
  161. TcxSpinEdit *Se01;
  162. TcxSpinEdit *Se06;
  163. TcxSpinEdit *Se07;
  164. TLabel *Label1;
  165. TLabel *Label14;
  166. TcxButton *BtnConfig;
  167. TcxTabSheet *cxTabSheet4;
  168. TcxRadioButton *RdbAuto;
  169. TcxRadioButton *RdbFix;
  170. TcxRadioButton *RdbBase;
  171. TcxButton *BtnModeControl;
  172. TLabel *Label18;
  173. TcxRadioButton *RdbLuminance;
  174. TcxSpinEdit *SeLuminance;
  175. TLabel *Label19;
  176. TcxPageControl *PgCam;
  177. TcxTabSheet *TabRtsp;
  178. TPanel *PnlCamera;
  179. TLabel *Label3;
  180. TcxButton *BtnWebCamUrl;
  181. TcxButton *BtnDefaultMsg;
  182. TcxButton *BtnBlankDisplay;
  183. TPanel *PnlVmsCam;
  184. TPanel *PnlCamConrtol;
  185. TcxButton *BtnImageSave;
  186. TPanel *PnlPTZ;
  187. TImageBtn *BtnUpLeft;
  188. TImageBtn *BtnUp;
  189. TImageBtn *BtnUpRight;
  190. TImageBtn *BtnLeft;
  191. TImageBtn *BtnHome;
  192. TImageBtn *BtnRight;
  193. TImageBtn *BtnDownLeft;
  194. TImageBtn *BtnDown;
  195. TImageBtn *BtnDownRight;
  196. TImageBtn *BtnZoomIn;
  197. TImageBtn *BtnZoomOut;
  198. TImageBtn *BtnFocusIn;
  199. TImageBtn *BtnFocusOut;
  200. TLabel *Label20;
  201. TTrackBar *PTZSpeed;
  202. TcxTabSheet *cxTabSheet5;
  203. TcxButton *BtnParamSetting;
  204. TImage *ImgDesc57;
  205. TLabel *Label21;
  206. TcxTimeEdit *cxDisplayTimeOn;
  207. TcxTimeEdit *cxDisplayTimeOff;
  208. TImage *ImgDesc53;
  209. TLabel *Label23;
  210. TImage *ImgDesc54;
  211. TLabel *Label24;
  212. TLabel *Label25;
  213. TImage *ImgDesc52;
  214. TLabel *Label26;
  215. TImage *ImgDesc56;
  216. TLabel *Label27;
  217. TImage *ImgDesc51;
  218. TLabel *Label28;
  219. TLabel *Label29;
  220. TLabel *Label30;
  221. TLabel *Label31;
  222. TLabel *Label32;
  223. TcxSpinEdit *SeModRate;
  224. TcxSpinEdit *SeModCycle;
  225. TcxSpinEdit *SeLumDay;
  226. TcxSpinEdit *SeMsgTime;
  227. TcxSpinEdit *SeLumNight;
  228. TLabel *Label33;
  229. TcxSpinEdit *SeCommErrTime;
  230. TcxSpinEdit *SeSlotCommErr;
  231. TcxSpinEdit *SeSlotPowerErr;
  232. TcxButton *BtnDefMsgDownload;
  233. TcxTabSheet *cxTabSheet6;
  234. TGroupBox *GroupBox1;
  235. TImage *ImgDesc59;
  236. TLabel *Label22;
  237. TcxSpinEdit *SeFormCycleTime;
  238. TLabel *Label34;
  239. TcxButton *BtnDisplayTimeSet;
  240. TcxButton *BtnMsgImmediateDownload;
  241. TTimer *TmrCommand;
  242. TLabel *Label35;
  243. TLabel *Label36;
  244. TLabel *Label37;
  245. TLabel *Label38;
  246. TFRAMEVmsStateList *FRAMEVmsStateList1;
  247. TcxTabSheet *TabPing;
  248. TcxGrid *CxPing;
  249. TcxGridBandedTableView *TvPing;
  250. TcxGridBandedColumn *ColumnSel;
  251. TcxGridBandedColumn *Col01;
  252. TcxGridBandedColumn *Col02;
  253. TcxGridBandedColumn *Col03;
  254. TcxGridBandedColumn *Col04;
  255. TcxGridBandedColumn *Col05;
  256. TcxGridBandedColumn *Col06;
  257. TcxGridBandedColumn *Col07;
  258. TcxGridBandedColumn *Col08;
  259. TcxGridBandedColumn *Col09;
  260. TcxGridBandedColumn *Col10;
  261. TcxGridBandedColumn *Col11;
  262. TcxGridBandedColumn *Col12;
  263. TcxGridBandedColumn *Col99;
  264. TcxGridLevel *GlPing;
  265. TPanel *PnlPing;
  266. TcxButton *BtnAllSelect0;
  267. TcxButton *BtnAllClear0;
  268. TcxButton *BtnReverse0;
  269. TImage *ImgDesc99;
  270. TLabel *Label39;
  271. TcxSpinEdit *EdPingTimeout;
  272. TLabel *Label40;
  273. TcxButton *BtnNwkPing;
  274. TcxButton *BtnNwkPingClear;
  275. TIdIcmpClient *IdIcmpClient1;
  276. TcxSpinEdit *EdPingPort;
  277. TLabel *Label41;
  278. TLabel *Label42;
  279. TImage *ImgDesc98;
  280. TcxLabel *lblSelVms;
  281. TcxLabel *cxLabel1;
  282. TcxLabel *cxLabel2;
  283. TcxLabel *cxLabel3;
  284. TcxLabel *cxLabel4;
  285. TcxLabel *cxLabel5;
  286. TcxLabel *cxLabel9;
  287. TcxLabel *cxLabel6;
  288. TcxLabel *cxLabel7;
  289. TcxLabel *cxLabel8;
  290. TcxLabel *cxLabel10;
  291. TcxLabel *cxLabel11;
  292. TcxLabel *cxLabel12;
  293. TcxLabel *cxLabel13;
  294. TcxLabel *cxLabel14;
  295. TcxLabel *cxLabel15;
  296. TcxLabel *cxLabel16;
  297. TcxLabel *cxLabel17;
  298. TcxLabel *cxLabel18;
  299. TcxLabel *cxLabel19;
  300. TcxLabel *cxLabel20;
  301. TcxLabel *cxLabel21;
  302. TcxLabel *cxLabel22;
  303. TcxLabel *cxLabel23;
  304. TcxLabel *cxLabel24;
  305. TcxLabel *cxLabel25;
  306. TcxLabel *cxLabel26;
  307. TcxLabel *cxLabel27;
  308. TcxLabel *cxLabel28;
  309. TcxLabel *cxLabel30;
  310. TcxLabel *cxLabel31;
  311. TcxLabel *cxLabel32;
  312. TcxComboBox *CbBrghMode;
  313. TcxSpinEdit *SeCurrBrgh;
  314. TLabel *Label44;
  315. TcxSpinEdit *SeWeekBrgh;
  316. TLabel *Label45;
  317. TcxSpinEdit *SeNghtBrgh;
  318. TLabel *Label46;
  319. TLabel *Label47;
  320. TImage *ImgDesc33;
  321. TcxTimeEdit *cxDispStrTm;
  322. TcxTimeEdit *cxDispEndTm;
  323. TLabel *Label49;
  324. TLabel *Label50;
  325. TLabel *Label51;
  326. TcxButton *BtnModuleOn;
  327. TcxButton *BtnModuleOff;
  328. TcxButton *BtnResetControl;
  329. TcxButton *BtnBrghControl;
  330. TcxButton *BtnImdFromDnld;
  331. TLabel *Label48;
  332. TcxComboBox *CbReset;
  333. TcxButton *BtnResetProgress;
  334. TcxButton *cxButton2;
  335. TcxButton *cxButton3;
  336. TcxButton *cxButton4;
  337. TLabel *Label43;
  338. TFFPlayer *FFPlayer1;
  339. TPanel *PnlSamsung;
  340. TcxLabel *LblErrMsg;
  341. TMemo *reMsg;
  342. TcxCheckBox *ChkFullScreen;
  343. TIdHTTP *IdHTTP1;
  344. TAcesTechXPlayer2 *AcesTechXPlayer21;
  345. void __fastcall FormShow(TObject *Sender);
  346. void __fastcall TmrShowTimer(TObject *Sender);
  347. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  348. void __fastcall FormActivate(TObject *Sender);
  349. void __fastcall FormDeactivate(TObject *Sender);
  350. void __fastcall BtnAllSelectClick(TObject *Sender);
  351. void __fastcall FRAMEVmsStateList1TvListCellDblClick(TcxCustomGridTableView *Sender,
  352. TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  353. TShiftState AShift, bool &AHandled);
  354. void __fastcall Se01PropertiesChange(TObject *Sender);
  355. void __fastcall BtnConfigClick(TObject *Sender);
  356. void __fastcall BtnControlClick(TObject *Sender);
  357. void __fastcall BtnOnOffSetClick(TObject *Sender);
  358. void __fastcall BtnModeControlClick(TObject *Sender);
  359. void __fastcall BtnWebCamUrlClick(TObject *Sender);
  360. void __fastcall BtnDefaultMsgClick(TObject *Sender);
  361. void __fastcall BtnWebCamControlMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift,
  362. int X, int Y);
  363. void __fastcall BtnWebCamControlMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift,
  364. int X, int Y);
  365. void __fastcall BtnParamSettingClick(TObject *Sender);
  366. void __fastcall BtnDefMsgDownloadClick(TObject *Sender);
  367. void __fastcall BtnDisplayTimeSetClick(TObject *Sender);
  368. void __fastcall BtnMsgImmediateDownloadClick(TObject *Sender);
  369. void __fastcall TmrCommandTimer(TObject *Sender);
  370. void __fastcall PgControlPageChanging(TObject *Sender, TcxTabSheet *NewPage,
  371. bool &AllowChange);
  372. void __fastcall BtnNwkPingClick(TObject *Sender);
  373. void __fastcall BtnNwkPingClearClick(TObject *Sender);
  374. void __fastcall Col04CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  375. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  376. void __fastcall IdIcmpClient1Reply(TComponent *ASender, const TReplyStatus *AReplyStatus);
  377. void __fastcall Col08CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  378. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  379. void __fastcall TvPingCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  380. TMouseButton AButton, TShiftState AShift,
  381. bool &AHandled);
  382. void __fastcall BtnImdFromDnldClick(TObject *Sender);
  383. void __fastcall BtnModuleControlClick(TObject *Sender);
  384. void __fastcall BtnResetClick(TObject *Sender);
  385. void __fastcall BtnBrghControlClick(TObject *Sender);
  386. void __fastcall FFPlayer1State(TObject *Sender, TPlayState APlayState);
  387. void __fastcall FFPlayer1OpenFailed(TObject *Sender);
  388. void __fastcall ChkFullScreenClick(TObject *Sender);
  389. void __fastcall IdHTTP1Authorization(TObject *Sender, TIdAuthentication *Authentication, bool &Handled);
  390. private: // User declarations
  391. void __fastcall CommClose();
  392. public:
  393. bool FStrmPlay;
  394. String FStrmUser;
  395. String FStrmPswd;
  396. String FStrmHttp;
  397. String FStrmAddr;
  398. void __fastcall ErrorMsg(String AErrMsg);
  399. void __fastcall WebCamPlay(String AVmsNo);
  400. void __fastcall WebCamStop();
  401. public:
  402. TForm *FPalyerForm;
  403. TVmsCtlr *FSelVmsObj;
  404. TStringList *FVmsIds;
  405. String FTitle;
  406. long FStrmHandle;
  407. TcxTabSheet *FCtrlTab;
  408. public: // User declarations
  409. __fastcall TVMS0500M(TComponent* Owner);
  410. void __fastcall LoadLocalSkin();
  411. void __fastcall DisplayInfo();
  412. void __fastcall ClearCheckList();
  413. int __fastcall GetSelListItems(bool ACommCheck=true);
  414. void __fastcall ActivateForm(bool AActivate);
  415. bool __fastcall UpdateVmsParam(String AVmsNmbr, void *pData);
  416. bool __fastcall UpdateVmsParam2(String AVmsNmbr, void *pData);
  417. int FPingType;
  418. bool FPingTimeout;
  419. void __fastcall PingNetwork(String AIp, int APort);
  420. void __fastcall UpdatePingList();
  421. void __fastcall RefreshPingList(bool AInit=false);
  422. void __fastcall OnVmsSelectMessage(TMessage &Msg);
  423. void __fastcall OnMainFormMessage(TMessage &Msg);
  424. void __fastcall OnVmsStateRefreshMessage(TMessage &Msg);
  425. void __fastcall OnVmsFormRefreshMessage(TMessage &Msg);
  426. BEGIN_MESSAGE_MAP
  427. MESSAGE_HANDLER(WM_VMS_SELECT, TMessage, OnVmsSelectMessage)
  428. MESSAGE_HANDLER(WM_MAINFORM, TMessage, OnMainFormMessage)
  429. MESSAGE_HANDLER(WM_VMS_STATE_REFRESH, TMessage, OnVmsStateRefreshMessage)
  430. MESSAGE_HANDLER(WM_VMS_FORM_REFRESH, TMessage, OnVmsFormRefreshMessage)
  431. END_MESSAGE_MAP(TForm)
  432. };
  433. //---------------------------------------------------------------------------
  434. extern PACKAGE TVMS0500M *VMS0500M;
  435. //---------------------------------------------------------------------------
  436. #endif