//--------------------------------------------------------------------------- #ifndef AppGlobalFH #define AppGlobalFH //--------------------------------------------------------------------------- #include #include "ITSDbF.h" #include "ITSSkinF.h" #include "ITSLogF.h" #include "FrmResourceF.h" /* ****************************************************************************** * Defines ****************************************************************************** */ #define SAFE_DELETE(p) {if (p != NULL) { delete p; p = NULL; }} #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 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; String sEmptyImg; 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; struct { TThread *pThread; DWORD dwThreadId; unsigned int nHandle; bool bRunning; } thr; struct { String sConnectStr; String sProvider; String sServerName; String sUserName; String sPassword; bool bSqlLog; } itsdb; struct { String sMainMap; String sLinkMap; } flashmap; struct { String sComModel; String sDevModel; } vmscam; } APP_CONFIG; /* ****************************************************************************** * Global variable definitions ****************************************************************************** */ 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_sLangDir; extern APP_CONFIG g_AppCfg; extern LOG_INFO g_LogCfg; extern TITSLog *ITSLog; /* ****************************************************************************** * PlugIn Global variables ****************************************************************************** */ /* ****************************************************************************** * Global function definitios ****************************************************************************** */ bool LoadDefaultConfigInfo(String ACfgFile=""); 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" //---------------------------------------------------------------------------- #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); //---------------------------------------------------------------------------- ULONG ProcIDFromWnd(HWND hwnd); HWND GetWinHandle(ULONG pid); #endif