123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- //---------------------------------------------------------------------------
- #ifndef AppGlobalFH
- #define AppGlobalFH
- //---------------------------------------------------------------------------
- #include <map.h>
- #include "ITSDbF.h"
- #include "ITSUtilF.h"
- #include "DataTypesF.h"
- #include "ITSLogF.h"
- #include "CenterCommF.h"
- #include "CDSCodeF.h"
- #include "FrmResourceF.h"
- /*
- ******************************************************************************
- * Defines
- ******************************************************************************
- */
- #define FORMSHOW(x) if (x) \
- { \
- try { \
- ShowWindow(x->Handle, SW_RESTORE); \
- x->BringToFront(); \
- } catch(...) {} \
- } \
- else \
- { \
- Application->CreateForm(__classid(T##x), &x); \
- if (x) x->Show(); \
- }
- /*
- ******************************************************************************
- * User Data Types
- ******************************************************************************
- */
- #define STR_DATETIME "YYYY-MM-DD HH:NN:SS"
- #define STR_HHNN "YYYY-MM-DD HH:NN"
- #define STR_DATEHOUR "YYYY-MM-DD HH"
- #define STR_DATE "YYYY-MM-DD"
- #define STR_MM "YYYY-MM"
- typedef enum
- {
- icon_n = 0,
- icon_e,
- icon_m,
- icon_r,
- icon_s,
- } facility_icon;
- typedef struct
- {
- String ICON[5];
- } FACILITY_ICON;
- typedef struct tag_AppConfig
- {
- String sConfigFile;
- bool bAppClose;
- long lMainWinHandle; /* Main Window Handle */
- String sTitle;
- String sProcessId; /* 프로세스 ID */
- String sSkinName;
- bool bSaveForm;
- bool bLoginPrompt;
- String sDefUseId;
- int nLogLevel;
- AnsiString sLogDay;
- bool bDebug;
- String sAppPath;
- String sLang;
- struct
- {
- bool Window;
- bool Enabled;
- int TimeOut;
- } Alarm;
- struct
- {
- bool Window;
- bool Enabled;
- int TimeOut;
- } Incident;
- struct
- {
- int AlarmValue;
- } Temp;
- struct
- {
- bool Enabled;
- int IntervalMin;
- bool LogoutExit;
- } AutoLogout;
- FACILITY_ICON vms;
- FACILITY_ICON vds;
- struct
- {
- TThread *pThread;
- DWORD dwThreadId;
- unsigned int nHandle;
- bool bRunning;
- } thr;
- struct
- {
- String sProvider;
- String sServerName;
- String sUserName;
- String sPassword;
- bool bSqlLog;
- } itsdb;
- struct
- {
- String sProvider;
- String sServerName;
- String sUserName;
- String sPassword;
- bool bSqlLog;
- } utisdb;
- struct
- {
- String sMainMap;
- String sLinkMap;
- } flashmap;
- struct
- {
- String sComModel;
- String sDevModel;
- } vmscam;
- struct
- {
- String saveDir;
- String viewer;
- String server;
- int port;
- String user;
- String pswd;
- String dir;
- } blackbox;
- bool bOnlyOneScreen;
- bool bTermChildProg;
- } APP_CONFIG;
- /*
- ******************************************************************************
- * Global variable definitions
- ******************************************************************************
- */
- extern ST_GISINFO g_GisInfo;
- extern ST_SELLINK g_SelLink;
- extern String CenterCd; // 지역센터 코드
- extern String CenterId; // 지역센터 아이디
- extern String CenterName; // 지역센터 명칭
- extern int g_nPid; // Application Process ID
- extern String g_sAppDir; // Application Directory
- extern String g_sAppName; // Program name
- extern String g_sCfgDir; // Config File Directory
- extern String g_sLogDir; // Program Log Directory
- extern String g_sTempDir; // Program Temp Directory
- extern String g_sFormsDir; // Program Forms Directory
- extern String g_sBlackBox;
- extern String g_sLangDir;
- extern String g_sImageDir;
- extern String g_sVideoDir;
- extern APP_CONFIG g_AppCfg;
- extern LOGININFO *g_pLOGIN;
- extern LOG_INFO g_LogCfg;
- extern TITSLog *ITSLog;
- extern TITSLog *FDbLog;
- //extern TLangTrans *LangTrans;
- /*
- ******************************************************************************
- * PlugIn Global variables
- ******************************************************************************
- */
- /*
- ******************************************************************************
- * Global function definitios
- ******************************************************************************
- */
- bool LoadDefaultConfigInfo(String ACfgFile="");
- int UserLogin();
- int UserLogout();
- bool WriteConfigInfo(String sCfgFile, String sTitle, String sItem, String sValue);
- bool ReadConfigInfo(String sCfgFile, String sTitle, String sItem, String &sValue);
- bool DeleteLogFiles(PTCHAR pszPath, int nDays, PTCHAR pszFile);
- void ShowErrorMsg(String ATitle, String AErrMsg);
- #include "cxControls.hpp"
- #include "cxDropDownEdit.hpp"
- TDateTime APP_StrToDateTime(String AStrDateTime);
- String APP_FillCode(TcxComboBox *ACombo, String ACode);
- String APP_GetCode(TcxComboBox *ACombo);
- String APP_GetCodeDesc(TcxComboBox *ACombo, String ACode);
- String APP_GetCodeName(TcxComboBox *ACombo, String ACode);
- String APP_GetCodeIdByName(TcxComboBox *ACombo, String AName);
- String APP_GetCodeDefCode(TcxComboBox *ACombo);
- String APP_GetCodeDefDesc(TcxComboBox *ACombo);
- int APP_SetCode(TcxComboBox *ACombo, String ACode);
- String ITSUtil_FormatStr(String AStrDateTime, String AFormat);
- //----------------------------------------------------------------------------
- #define MAX_DISPCOLOR 22
- extern TColor g_DispColor[MAX_DISPCOLOR];
- void APP_InitDisplayColor();
- TColor APP_GetDisplayColor(int ASeq);
- void APP_ImageClear(TCanvas *c, int offX, int offY, int w, int h, TColor color);
- //////////////////////////////////////////////////////////////////////////////////
- class TVmsSizeType : public TObject
- {
- public: // User declarations
- String TypeCd;
- String TypeNm;
- int Width;
- int Height;
- public: // User declarations
- __fastcall TVmsSizeType(String ATypeCd,
- String ATypeNm,
- int AWidth,
- int AHeight)
- {
- TypeCd = ATypeCd;
- TypeNm = ATypeNm;
- Width = AWidth;
- Height = AHeight;
- }
- };
- //////////////////////////////////////////////////////////////////////////////////
- //----------------------------------------------------------------------------
- ULONG ProcIDFromWnd(HWND hwnd);
- HWND GetWinHandle(ULONG pid);
- #endif
|