VmsControlMF.h 14 KB

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