123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- //---------------------------------------------------------------------------
- #ifndef VmsFormFH
- #define VmsFormFH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <stdio.h>
- #include <ADODB.hpp>
- #include <DB.hpp>
- #include <SyncObjs.hpp>
- #include <ExtCtrls.hpp>
- #include <jpeg.hpp>
- #include <GIFimg.hpp>
- //---------------------------------------------------------------------------
- #include "ITSLibF.h"
- #include "CDSItsObjectF.h"
- //---------------------------------------------------------------------------
- #define MAX_FORM_OBJ_LIST 64 /* 최대 VMS 오브젝트 리스트 갯수 */
- class TVmsFormObj
- {
- public:
- TVmsFormObj();
- ~TVmsFormObj();
- public:
- int ObjectKind; /* 객체종류 */
- int ObjectType; /* 객체타입 */
- int ObjectSize; /* 객체크기 */
- int IsBlinking; /* 점멸 여부 */
- int PosX; /* 위치 X */
- int PosY; /* 위치 Y */
- int Width; /* 객체넓이 */
- int TextWidth; /* 객체넓이 */
- int Height; /* 객체높이 */
- int BkColor; /* 객체배경색상 */
- int TextFontName; /* 폰트이름 */
- //TODO
- AnsiString StrTextFontName;
- int TextFontColor; /* 폰트색상 */
- int TextFontSize; /* 폰트크기 */
- int TextFontBold; /* 폰트굵기 */
- int TextAlign; /* 문자열정열방식 */
- AnsiString TextData; /* 문자열데이터 */
- AnsiString ImageId; /* 이미지아이디 */
- AnsiString ImageType; /* 이미지 타입 */
- AnsiString IFSC_ID;
- AnsiString TRFC_FILL_CD;
- TImage *pImageData; /* 이미지데이터 */
- TMemoryStream *pImageStream; /* 이미지데이터 버퍼 */
- public:
- void Clear();
- TImage *NewImage();
- };
- //---------------------------------------------------------------------------
- class TVmsForm
- {
- public:
- TVmsForm();
- ~TVmsForm();
- public:
- int ScenarioSeq; /* 폼 표출순서 */
- AnsiString VMS_FORM_ID; /* TB_VMS_FORM - VMS FORM ID */
- int DSPL_HH; /* TB_VMS_FORM - 표출시간(초) */
- AnsiString VMS_FORM_DSPL_DRCT_CD; /* TB_VMS_FORM - VMS 메시지 표출 방향 코드 */
- AnsiString VMS_FORM_DSPL_MTHD_CD; /* TB_VMS_FORM - VMS 메시지 표출 방법 코드 */
- int VMS_FORM_TYPE_CD; /* TB_VMS_FORM - 폼 종류 */
- int VMS_FORM_COLR_CD; /* TB_VMS_FORM - 배경색상 */
- int Width; /* 폼넓이 */
- int Height; /* 폼높이 */
- AnsiString TrfBakImgId;
- AnsiString VMS_SCH_TYPE;
- int VMS_SCH_FORM_TYPE;
- AnsiString SYMB_LIB_NMBR;
- AnsiString STRM_ADDR;
- bool Success;
- bool SvcRes; /* 제공결과 */
- bool FtpRes; /* 제공결과 */
- AnsiString FtpFileName;
- AnsiString LocalFileName;
- //////////////////////////////////////////////////////////////////////
- //// 프로토콜 적용을 위해서
- BYTE fileType; // 0x01 : 이미지 (JPG)
- // 0x02 : 동영상 (AVI)
- // 0x03 : URL(스트리밍)
- // 0x04 : 소통 이미지
- // 0x05 : 표출문구 이미지
- //////////////////////////////////////////////////////////////////////
- TCriticalSection *pCriticalSection;
- public:
- int FTotal;
- int FObjects;
- TItsMap<int, TVmsFormObj*> FLists;
- void Lock() { pCriticalSection->Enter(); }
- void UnLock() { pCriticalSection->Leave(); };
- int Count() { return FObjects; }
- int Total() { return FTotal; }
- void Clear();
- TVmsFormObj *GetItem(int AIdx);
- int AddFormObject(TVmsFormObj *AFormObj);
- TVmsFormObj *AddFormObject();
- void Init(int AWidth, int AHeight);
- void FormClear(TColor ABkColor);
- Graphics::TBitmap *pBitmap; /* 이미지데이터 */
- TMemoryStream *pStream; /* 이미지데이터 버퍼 */
- };
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- class TVmsFormManager
- {
- public:
- TVmsFormManager();
- ~TVmsFormManager();
- private:
- public:
- void Lock() { FLists.Lock(); }
- void UnLock() { FLists.UnLock(); }
- public:
- int FormWidth;
- int FormHeight;
- int FTotal;
- int FObjects;
- TItsMap<int, TVmsForm*> FLists;
- int Count() { return FObjects; }
- int Total() { return FTotal; }
- void Clear();
- TVmsForm *GetItem(int AIdx);
- int AddForm(TVmsForm *AForm);
- TVmsForm *AddForm();
- };
- //---------------------------------------------------------------------------
- //extern TVmsFormManager *VmsFormManager;
- //---------------------------------------------------------------------------
- #endif
|