VMSM430MF.h 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. //---------------------------------------------------------------------------
  2. #ifndef VMSM430MFH
  3. #define VMSM430MFH
  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 "FRAME_VmsListF.h"
  86. #include "cxImage.hpp"
  87. #include "cxButtonEdit.hpp"
  88. #include "cxBlobEdit.hpp"
  89. #include "dxGDIPlusClasses.hpp"
  90. #include "FFBaseComponent.hpp"
  91. #include "FFBasePlay.hpp"
  92. #include "FFPlay.hpp"
  93. #include "FFDecode.hpp"
  94. #include "IdAntiFreeze.hpp"
  95. #include "IdAntiFreezeBase.hpp"
  96. #include "IdBaseComponent.hpp"
  97. #include "IdComponent.hpp"
  98. #include "IdExplicitTLSClientServerBase.hpp"
  99. #include "IdFTP.hpp"
  100. #include "IdTCPClient.hpp"
  101. #include "IdTCPConnection.hpp"
  102. #include "cxCalc.hpp"
  103. #define MAX_PLAYER 1
  104. class TSymbFmt {
  105. public:
  106. TSymbFmt(String AFmt, String AFmtType) {
  107. fmt = AFmt;
  108. fmtType = AFmtType;
  109. };
  110. ~TSymbFmt() {};
  111. public:
  112. String fmt;
  113. String fmtType;
  114. };
  115. class TVMSM430M : public TForm
  116. {
  117. __published: // IDE-managed Components
  118. TTimer *TmrShow;
  119. TShape *ShpTitle;
  120. TcxButton *BtnClose;
  121. TLabel *LblCaption;
  122. TShape *ShpList;
  123. TEdit *EdFocus;
  124. TPanel *PnlBack;
  125. TPanel *PnlLeft;
  126. TcxSplitter *cxSplitter1;
  127. TcxGroupBox *GrpList;
  128. TPanel *Panel1;
  129. TPanel *PnlVmsList;
  130. TPanel *PnlSymbol;
  131. TcxSplitter *cxSplitter2;
  132. TcxGroupBox *cxGroupBox1;
  133. TcxGroupBox *cxGroupBox2;
  134. TFRAMEVmsList *FRAMEVmsList1;
  135. TcxGrid *CxList;
  136. TcxGridTableView *TvList;
  137. TcxGridColumn *ColLink1;
  138. TcxGridColumn *ColLink2;
  139. TcxGridColumn *ColLink3;
  140. TcxGridColumn *ColLink4;
  141. TcxGridColumn *ColLink5;
  142. TcxGridColumn *ColLink6;
  143. TcxGridLevel *GlList;
  144. TPanel *PnlMenu;
  145. TcxButton *BtnEdit;
  146. TcxButton *BtnInsert;
  147. TcxButton *BtnDelete;
  148. TcxButton *BtnSave;
  149. TPanel *Panel4;
  150. TcxButton *BtnDownload;
  151. TPanel *PnlCmd;
  152. TPanel *PnlPlayer;
  153. TImage *ImgPreView;
  154. TcxLabel *cxLabel18;
  155. TImage *ImgDesc01;
  156. TcxLabel *cxLabel1;
  157. TImage *ImgDesc02;
  158. TcxTextEdit *EdNmbr;
  159. TcxLabel *cxLabel2;
  160. TImage *ImgDesc03;
  161. TcxTextEdit *EdExpl;
  162. TcxButtonEdit *EdImageFileName;
  163. TcxLabel *cxLabel3;
  164. TImage *ImgDesc04;
  165. TcxButton *BtnSaveImgFile;
  166. TSaveDialog *SaveDialog;
  167. TOpenPictureDialog *OpenBmp;
  168. TcxTextEdit *EdVmsCd;
  169. TcxLabel *lblText1;
  170. TcxLabel *lblText2;
  171. TcxLabel *lblText3;
  172. TcxLabel *lblText4;
  173. TcxLabel *lblText5;
  174. TFFPlayer *FFPlayer1;
  175. TTrackBar *TrackBar1;
  176. TLabel *lblDuration1;
  177. TLabel *lblCurrentPTS1;
  178. TcxCheckBox *ChkFullScreen;
  179. TcxLabel *lblImage1;
  180. TcxLabel *lblImage2;
  181. TcxLabel *lblImage3;
  182. TcxLabel *lblImage4;
  183. TcxLabel *lblImage5;
  184. TcxLabel *lblImage9;
  185. TcxLabel *lblImage8;
  186. TcxLabel *lblImage7;
  187. TcxLabel *lblImage6;
  188. TcxLabel *lblImage12;
  189. TImage *ImgTemp;
  190. TFFDecoder *FFDecoder1;
  191. TcxButton *BtnPlay;
  192. TcxButton *BtnStop;
  193. TcxButton *BtnPause;
  194. TImage *ImgDesc07;
  195. TcxLabel *cxLabel4;
  196. TcxTextEdit *EdFileName;
  197. TcxLabel *lblImage21;
  198. TcxLabel *lblImage22;
  199. TIdFTP *IdFtp;
  200. TcxLabel *lblSameFile;
  201. TcxLabel *lblFtpServer;
  202. TImage *Image1;
  203. TcxSpinEdit *SeHeight;
  204. TcxSpinEdit *SeWidth;
  205. TcxLabel *cxLabel5;
  206. TcxSpinEdit *SeSize;
  207. TcxGridColumn *ColSize;
  208. void __fastcall FormShow(TObject *Sender);
  209. void __fastcall TmrShowTimer(TObject *Sender);
  210. void __fastcall BtnCloseClick(TObject *Sender);
  211. void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
  212. void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
  213. void __fastcall BtnEditClick(TObject *Sender);
  214. void __fastcall BtnSaveClick(TObject *Sender);
  215. void __fastcall BtnInsertClick(TObject *Sender);
  216. void __fastcall BtnDeleteClick(TObject *Sender);
  217. void __fastcall BtnSaveImgFileClick(TObject *Sender);
  218. void __fastcall EdImageFileNameClick(TObject *Sender);
  219. void __fastcall OpenBmpCanClose(TObject *Sender, bool &CanClose);
  220. void __fastcall TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  221. TMouseButton AButton, TShiftState AShift,
  222. bool &AHandled);
  223. void __fastcall BtnDownloadClick(TObject *Sender);
  224. void __fastcall TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
  225. TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
  226. void __fastcall BtnPlayClick(TObject *Sender);
  227. void __fastcall FFPlayer1FileOpen(TObject *Sender, const __int64 ADuration, int AFrameWidth, int AFrameHeight, int &AScreenWidth,
  228. int &AScreenHeight);
  229. void __fastcall BtnStopClick(TObject *Sender);
  230. void __fastcall BtnPauseClick(TObject *Sender);
  231. void __fastcall ChkFullScreenClick(TObject *Sender);
  232. void __fastcall TrackBar1Change(TObject *Sender);
  233. void __fastcall FFPlayer1OpenFailed(TObject *Sender);
  234. void __fastcall FFPlayer1Position(TObject *Sender, const __int64 APTS);
  235. void __fastcall FFPlayer1State(TObject *Sender, TPlayState APlayState);
  236. private: // User declarations
  237. void __fastcall CommClose();
  238. TcxDataController *m_pGDC;
  239. String FTitle;
  240. bool FUpdate;
  241. bool FNewDb;
  242. bool EditMode;
  243. TList *FListSymb;
  244. bool FPlayStream;
  245. int FThumbNail;
  246. bool FMakeThumbNail;
  247. DWORD FPlayTime;
  248. DWORD FFileSize;
  249. String FFileName;
  250. String FFileExt;
  251. __int64 FDuration[MAX_PLAYER];
  252. bool FTrackChanging[MAX_PLAYER];
  253. TTrackBar *FTrackBar[MAX_PLAYER];
  254. TLabel *FLblDuration[MAX_PLAYER];
  255. TLabel *FLblCurrPTS[MAX_PLAYER];
  256. TFFPlayer *FFPlayer[MAX_PLAYER];
  257. TPanel *FDispArea[MAX_PLAYER];
  258. String PlayerFile[MAX_PLAYER];
  259. public:
  260. TItsMap<String, TSymbFmt*> FSymbFmtLists;
  261. public: // User declarations
  262. __fastcall TVMSM430M(TComponent* Owner);
  263. void __fastcall FormInit();
  264. void __fastcall ClearSymbloList();
  265. void __fastcall LoadImageSymbol();
  266. void __fastcall DisplayInfo();
  267. bool __fastcall UpdateVmsImage(String ANmbr, String AExpl);
  268. bool __fastcall InsertVmsImage(String ANmbr, String AExpl, String AFileName, String ATypeCd);
  269. bool __fastcall IsUsedVideoFileName(String AFileName);
  270. bool __fastcall UploadFtpServer();
  271. void __fastcall DeleteFtpFile(AnsiString AFileName);
  272. void __fastcall ChangeEditMode(int AEdit);
  273. };
  274. //---------------------------------------------------------------------------
  275. extern PACKAGE TVMSM430M *VMSM430M;
  276. //---------------------------------------------------------------------------
  277. #endif