FrmVmsSymbMngrF.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. //---------------------------------------------------------------------------
  2. #ifndef FrmVmsSymbMngrFH
  3. #define FrmVmsSymbMngrFH
  4. //---------------------------------------------------------------------------
  5. #include <Classes.hpp>
  6. #include <Controls.hpp>
  7. #include <StdCtrls.hpp>
  8. #include <Forms.hpp>
  9. #include <DB.hpp>
  10. #include <DBClient.hpp>
  11. #include <FMTBcd.hpp>
  12. #include <Provider.hpp>
  13. #include <SqlExpr.hpp>
  14. #include <Menus.hpp>
  15. #include <ExtCtrls.hpp>
  16. #include <Graphics.hpp>
  17. #include <ComCtrls.hpp>
  18. #include <ADODB.hpp>
  19. #include <Dialogs.hpp>
  20. #include <ExtDlgs.hpp>
  21. //---------------------------------------------------------------------------
  22. //---------------------------------------------------------------------------
  23. #include "WindowMsgF.h"
  24. #include "cxButtons.hpp"
  25. #include "cxCalendar.hpp"
  26. #include "cxContainer.hpp"
  27. #include "cxControls.hpp"
  28. #include "cxDropDownEdit.hpp"
  29. #include "cxEdit.hpp"
  30. #include "cxGraphics.hpp"
  31. #include "cxGroupBox.hpp"
  32. #include "cxLabel.hpp"
  33. #include "cxLookAndFeelPainters.hpp"
  34. #include "cxLookAndFeels.hpp"
  35. #include "cxMaskEdit.hpp"
  36. #include "cxPC.hpp"
  37. #include "cxPCdxBarPopupMenu.hpp"
  38. #include "cxSpinEdit.hpp"
  39. #include "cxSplitter.hpp"
  40. #include "cxTextEdit.hpp"
  41. #include "cxTimeEdit.hpp"
  42. #include "dxSkinBlack.hpp"
  43. #include "dxSkinBlue.hpp"
  44. #include "dxSkinCaramel.hpp"
  45. #include "dxSkinCoffee.hpp"
  46. #include "dxSkinDarkRoom.hpp"
  47. #include "dxSkinDarkSide.hpp"
  48. #include "dxSkinFoggy.hpp"
  49. #include "dxSkinGlassOceans.hpp"
  50. #include "dxSkiniMaginary.hpp"
  51. #include "dxSkinLilian.hpp"
  52. #include "dxSkinLiquidSky.hpp"
  53. #include "dxSkinLondonLiquidSky.hpp"
  54. #include "dxSkinMcSkin.hpp"
  55. #include "dxSkinMoneyTwins.hpp"
  56. #include "dxSkinOffice2007Black.hpp"
  57. #include "dxSkinOffice2007Blue.hpp"
  58. #include "dxSkinOffice2007Green.hpp"
  59. #include "dxSkinOffice2007Pink.hpp"
  60. #include "dxSkinOffice2007Silver.hpp"
  61. #include "dxSkinOffice2010Black.hpp"
  62. #include "dxSkinOffice2010Blue.hpp"
  63. #include "dxSkinOffice2010Silver.hpp"
  64. #include "dxSkinsCore.hpp"
  65. #include "dxSkinscxPCPainter.hpp"
  66. #include "dxSkinSeven.hpp"
  67. #include "dxSkinSharp.hpp"
  68. #include "dxSkinSilver.hpp"
  69. #include "dxSkinStardust.hpp"
  70. #include "cxRadioGroup.hpp"
  71. #include "cxClasses.hpp"
  72. #include "cxCustomData.hpp"
  73. #include "cxData.hpp"
  74. #include "cxDataStorage.hpp"
  75. #include "cxDBData.hpp"
  76. #include "cxFilter.hpp"
  77. #include "cxGrid.hpp"
  78. #include "cxGridCustomTableView.hpp"
  79. #include "cxGridCustomView.hpp"
  80. #include "cxGridDBTableView.hpp"
  81. #include "cxGridLevel.hpp"
  82. #include "cxGridTableView.hpp"
  83. #include "cxStyles.hpp"
  84. #include "cxCheckBox.hpp"
  85. #include "cxImage.hpp"
  86. #include "cxButtonEdit.hpp"
  87. #include "cxBlobEdit.hpp"
  88. #include "cxHint.hpp"
  89. #include "dxCustomHint.hpp"
  90. #include "dxScreenTip.hpp"
  91. #include "dxSkinsForm.hpp"
  92. #include "FFBaseComponent.hpp"
  93. #include "FFBasePlay.hpp"
  94. #include "FFPlay.hpp"
  95. #include "dxGDIPlusClasses.hpp"
  96. #include "FFDecode.hpp"
  97. #include "cxCalc.hpp"
  98. class TSymbFmt {
  99. public:
  100. TSymbFmt(String AFmt, String AFmtType) {
  101. fmt = AFmt;
  102. fmtType = AFmtType;
  103. };
  104. ~TSymbFmt() {};
  105. public:
  106. String fmt;
  107. String fmtType;
  108. };
  109. class TFrmVmsSymbMngr : public TForm
  110. {
  111. __published: // IDE-managed Components
  112. TTimer *TmrShow;
  113. TShape *ShpTitle;
  114. TcxButton *BtnClose;
  115. TLabel *LblCaption;
  116. TShape *ShpList;
  117. TEdit *EdFocus;
  118. TPanel *PnlBack;
  119. TPanel *PnlLeft;
  120. TcxSplitter *cxSplitter1;
  121. TcxGroupBox *GrpList;
  122. TPanel *Panel1;
  123. TPanel *PnlSymbol;
  124. TcxGroupBox *GrpSymbBox;
  125. TcxGrid *CxList;
  126. TcxGridTableView *TvList;
  127. TcxGridColumn *ColSYMB_NMBR;
  128. TcxGridColumn *ColSYMB_DATA;
  129. TcxGridColumn *ColSYMB_NM;
  130. TcxGridColumn *ColSYMB_TYPE_DESC;
  131. TcxGridColumn *ColSYMB_EXPL;
  132. TcxGridColumn *ColSYMB_FILE_NM;
  133. TcxGridLevel *GlList;
  134. TPanel *PnlMenu;
  135. TcxButton *BtnEdit;
  136. TcxButton *BtnInsert;
  137. TcxButton *BtnDelete;
  138. TcxButton *BtnSave;
  139. TcxButton *BtnSaveImgFile;
  140. TSaveDialog *SaveDialog;
  141. TOpenPictureDialog *OpenBmp;
  142. TcxLabel *lblText1;
  143. TcxLabel *lblText2;
  144. TcxLabel *lblText3;
  145. TcxLabel *lblText4;
  146. TcxLabel *lblText5;
  147. TcxHintStyleController *cxHintStyleController1;
  148. TdxSkinController *dxSkinController1;
  149. TPopupMenu *PopupAdd;
  150. TMenuItem *MnuGeneral;
  151. TMenuItem *MnuTraffic;
  152. TMenuItem *MnuAtmp;
  153. TMenuItem *MnuWeather;
  154. TMenuItem *MnuVideo;
  155. TMenuItem *MnuIncident;
  156. TPanel *PnlCmd;
  157. TImage *ImgDesc02;
  158. TImage *ImgDesc03;
  159. TImage *ImgDesc04;
  160. TImage *ImgDesc14;
  161. TImage *ImgTemp;
  162. TcxLabel *cxLabel1;
  163. TcxTextEdit *EdNmbr;
  164. TcxLabel *cxLabel2;
  165. TcxTextEdit *EdExpl;
  166. TcxButtonEdit *EdImageFileName;
  167. TcxLabel *cxLabel3;
  168. TcxTextEdit *EdVmsCd;
  169. TcxComboBox *CbType;
  170. TcxLabel *cxLabel6;
  171. TcxTextEdit *EdName;
  172. TcxLabel *cxLabel4;
  173. TcxSpinEdit *SeSize;
  174. TcxSpinEdit *SeWidth;
  175. TcxSpinEdit *SeHeight;
  176. TcxPageControl *PgSymb;
  177. TcxTabSheet *TsSbt1;
  178. TPanel *PnlInfo2;
  179. TImage *ImgGeneral;
  180. TcxTabSheet *TsSbt2;
  181. TcxTabSheet *TsSbt3;
  182. TcxTabSheet *TsSbt4;
  183. TcxTabSheet *TsSbt5;
  184. TcxTabSheet *TsSbt6;
  185. TcxTabSheet *TsSbt7;
  186. TPanel *Panel2;
  187. TcxCheckBox *ChkFitScreen;
  188. TcxButton *BtnPlay;
  189. TcxButton *BtnStop;
  190. TcxButton *BtnPause;
  191. TPanel *PnlPlayer;
  192. TFFPlayer *FFPlayer1;
  193. TFFDecoder *FFDecoder1;
  194. TPanel *Panel3;
  195. TTrackBar *TrackBar;
  196. TLabel *lblDuration;
  197. TLabel *lblCurrentPTS;
  198. TMenuItem *MnuTrafficBack;
  199. TImage *ImgVideo;
  200. TPanel *Panel5;
  201. TPanel *Panel6;
  202. TImage *ImagTrafBack;
  203. TImage *ImagTraffic;
  204. TGridPanel *GridPanel1;
  205. TImage *ImagTraffic1;
  206. TImage *ImagTraffic2;
  207. TImage *ImagTraffic3;
  208. TcxLabel *cxLabel5;
  209. TcxLabel *cxLabel7;
  210. TcxLabel *cxLabel8;
  211. TPanel *Panel7;
  212. TcxLabel *cxLabel18;
  213. TImage *ImgDesc01;
  214. TPanel *Panel8;
  215. TImage *ImagAtmp;
  216. TPanel *Panel9;
  217. TImage *Image2;
  218. TcxLabel *cxLabel9;
  219. TGridPanel *GridPanel2;
  220. TImage *ImagAtmp1;
  221. TImage *ImagAtmp2;
  222. TImage *ImagAtmp3;
  223. TImage *ImagAtmp4;
  224. TOpenPictureDialog *OpenSubImag;
  225. TPanel *Panel10;
  226. TImage *ImagIncident;
  227. TPanel *Panel11;
  228. TImage *Image3;
  229. TcxLabel *cxLabel10;
  230. TcxButton *BtnAtmp1;
  231. TcxButton *cxButton1;
  232. TcxButton *cxButton2;
  233. TcxButton *cxButton3;
  234. TPanel *Panel12;
  235. TImage *ImagWeather;
  236. TPanel *Panel13;
  237. TImage *Image8;
  238. TcxLabel *cxLabel15;
  239. TGridPanel *GridPanel4;
  240. TImage *ImagWeather1;
  241. TImage *ImagWeather2;
  242. TImage *ImagWeather3;
  243. TImage *ImagWeather4;
  244. TcxButton *cxButton4;
  245. TcxButton *cxButton5;
  246. TcxButton *cxButton6;
  247. TcxButton *cxButton7;
  248. TGridPanel *GridPanel3;
  249. TImage *ImagIncident1;
  250. TImage *ImagIncident2;
  251. TImage *ImagIncident3;
  252. TImage *ImagIncident4;
  253. TcxButton *cxButton8;
  254. TcxButton *cxButton9;
  255. TcxButton *cxButton10;
  256. TcxButton *cxButton11;
  257. TcxGridColumn *ColSYMB_FILE_EXT;
  258. TcxGridColumn *ColSYMB_SIZE;
  259. TcxGridColumn *ColSYMB_WDTH;
  260. TcxGridColumn *ColSYMB_HGHT;
  261. TcxGridColumn *ColPLAY_TM;
  262. TcxGridColumn *ColBASE_YN;
  263. TcxGridColumn *ColUSE_YN;
  264. TcxGridColumn *ColSYMB_TYPE;
  265. TcxGridColumn *Column99;
  266. TcxGridColumn *TvListColumn1;
  267. TcxGridColumn *ColImagePath;
  268. TcxGridColumn *ColVideoPath;
  269. TImage *Image1;
  270. void __fastcall FormShow(TObject *Sender);
  271. void __fastcall TmrShowTimer(TObject *Sender);
  272. void __fastcall BtnCloseClick(TObject *Sender);
  273. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  274. void __fastcall BtnEditClick(TObject *Sender);
  275. void __fastcall BtnSaveClick(TObject *Sender);
  276. void __fastcall BtnInsertClick(TObject *Sender);
  277. void __fastcall BtnDeleteClick(TObject *Sender);
  278. void __fastcall BtnSaveImgFileClick(TObject *Sender);
  279. void __fastcall EdImageFileNameClick(TObject *Sender);
  280. void __fastcall OpenBmpCanClose(TObject *Sender, bool &CanClose);
  281. void __fastcall TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  282. TMouseButton AButton, TShiftState AShift,
  283. bool &AHandled);
  284. void __fastcall ColSYMB_DATACustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  285. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
  286. void __fastcall TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
  287. TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
  288. void __fastcall CbTypePropertiesChange(TObject *Sender);
  289. void __fastcall PnlMenuDblClick(TObject *Sender);
  290. void __fastcall MnuAddVmsSymbClick(TObject *Sender);
  291. void __fastcall FFPlayer1FileOpen(TObject *Sender, const __int64 ADuration, int AFrameWidth, int AFrameHeight, int &AScreenWidth,
  292. int &AScreenHeight);
  293. void __fastcall FFPlayer1OpenFailed(TObject *Sender);
  294. void __fastcall FFPlayer1Position(TObject *Sender, const __int64 APTS);
  295. void __fastcall FFPlayer1State(TObject *Sender, TPlayState APlayState);
  296. void __fastcall TrackBarChange(TObject *Sender);
  297. void __fastcall BtnPlayClick(TObject *Sender);
  298. void __fastcall BtnStopClick(TObject *Sender);
  299. void __fastcall BtnPauseClick(TObject *Sender);
  300. void __fastcall ChkFitScreenClick(TObject *Sender);
  301. void __fastcall ImagTrafficMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
  302. void __fastcall OpenSubImagCanClose(TObject *Sender, bool &CanClose);
  303. void __fastcall BtnSubImageSelectClick(TObject *Sender);
  304. private: // User declarations
  305. void __fastcall CommClose();
  306. String FTitle;
  307. bool FUpdate;
  308. bool FNewDb;
  309. bool EditMode;
  310. DWORD FFileSize;
  311. bool FImageUpdate;
  312. bool FIsUpdate;
  313. int FOldWidth, FOldHeight;
  314. int FNewWidth, FNewHeight;
  315. int CURR_SYMB_NMBR;
  316. String CURR_SYMB_NM;
  317. String CURR_SYMB_EXPL;
  318. String CURR_SYMB_TYPE;
  319. String CURR_SYMB_FILE_NM;
  320. String CURR_SYMB_FILE_EXT;
  321. int CURR_SYMB_SIZE;
  322. int CURR_SYMB_WDTH;
  323. int CURR_SYMB_HGHT;
  324. int CURR_PLAY_TM;
  325. TMemoryStream *CURR_SYMB_DATA;
  326. TMemoryStream *CURR_SYMB_AVI_DATA;
  327. String CURR_BASE_YN;
  328. String CURR_USE_YN;
  329. String CURR_LOCAL_FILE_NM;
  330. DWORD FPlayTime;
  331. __int64 FDuration;
  332. bool FTrackChanging;
  333. int FThumbNail;
  334. bool FPlayStream;
  335. bool FMakeThumbNail;
  336. TImage *FSymbImag;
  337. TImage *FSelImag;
  338. public:
  339. public: // User declarations
  340. __fastcall TFrmVmsSymbMngr(TComponent* Owner);
  341. void __fastcall SetColorScheme(String ASkinName);
  342. void __fastcall FormInit();
  343. void __fastcall ClearListMemory();
  344. void __fastcall LoadImageSymbol();
  345. void __fastcall DisplayInfo();
  346. TImage* __fastcall GetPreviewSymb(String ASymbType);
  347. void __fastcall ImageClear(TImage *AImage);
  348. String __fastcall GetSymbTypeDesc(String ASymbType);
  349. bool __fastcall UpdateVmsImage(String ANmbr, String AExpl, String ATypeCd);
  350. bool __fastcall DeleteVmsSymbLib(int SYMB_NMBR, bool ADelete);
  351. bool __fastcall UpdateVmsSymbLib(int SYMB_NMBR, String SYMB_NM, String SYMB_EXPL);
  352. bool __fastcall InsertVmsSymbLib(int SYMB_NMBR,
  353. String SYMB_TYPE,
  354. String SYMB_NM,
  355. String SYMB_EXPL,
  356. TMemoryStream *SYMB_DATA,
  357. TMemoryStream *SYMB_AVI_DATA,
  358. String SYMB_FILE_NM,
  359. String SYMB_FILE_EXT,
  360. int SYMB_SIZE,
  361. int SYMB_WDTH,
  362. int SYMB_HGHT,
  363. int PLAY_TM,
  364. String BASE_YN,
  365. String USE_YN);
  366. bool __fastcall GetNextVmsSymbNmbr(int &ANmbr, int AFromId, int AToId);
  367. void __fastcall ChangeSymbPage(String ASymbType);
  368. void __fastcall ChangeEditMode(int AEdit);
  369. };
  370. //---------------------------------------------------------------------------
  371. extern PACKAGE TFrmVmsSymbMngr *FrmVmsSymbMngr;
  372. //---------------------------------------------------------------------------
  373. #endif