123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493 |
- //---------------------------------------------------------------------------
- #ifndef ITS00MAPFH
- #define ITS00MAPFH
- //---------------------------------------------------------------------------
- #include <Classes.hpp>
- #include <Controls.hpp>
- #include <StdCtrls.hpp>
- #include <Forms.hpp>
- #include <DB.hpp>
- #include <DBClient.hpp>
- #include <Provider.hpp>
- #include <ADODB.hpp>
- #include <ExtCtrls.hpp>
- #include <Graphics.hpp>
- #include <ImgList.hpp>
- #include <Menus.hpp>
- #include <pngimage.hpp>
- #include <map.h>
- #include <vector.h>
- #include "ImageBtn.h"
- //---------------------------------------------------------------------------
- //---------------------------------------------------------------------------
- #include "XiC_IndexMap.hpp"
- #include "XiC_LinkSpeedUpdate.hpp"
- #include "XiClient.hpp"
- #include "XiServer.hpp"
- //---------------------------------------------------------------------------
- #include "DataTypesF.h"
- #include "WindowMsgF.h"
- #include "cxCheckBox.hpp"
- #include "cxContainer.hpp"
- #include "cxControls.hpp"
- #include "cxEdit.hpp"
- #include "cxGraphics.hpp"
- #include "cxGroupBox.hpp"
- #include "cxLabel.hpp"
- #include "cxLookAndFeelPainters.hpp"
- #include "cxLookAndFeels.hpp"
- #include "cxMaskEdit.hpp"
- #include "cxProgressBar.hpp"
- #include "cxSpinEdit.hpp"
- #include "cxTextEdit.hpp"
- #include "dxGDIPlusClasses.hpp"
- #include "dxSkinBlack.hpp"
- #include "dxSkinBlue.hpp"
- #include "dxSkinCaramel.hpp"
- #include "dxSkinCoffee.hpp"
- #include "dxSkinDarkRoom.hpp"
- #include "dxSkinDarkSide.hpp"
- #include "dxSkinFoggy.hpp"
- #include "dxSkinGlassOceans.hpp"
- #include "dxSkiniMaginary.hpp"
- #include "dxSkinLilian.hpp"
- #include "dxSkinLiquidSky.hpp"
- #include "dxSkinLondonLiquidSky.hpp"
- #include "dxSkinMcSkin.hpp"
- #include "dxSkinMoneyTwins.hpp"
- #include "dxSkinOffice2007Black.hpp"
- #include "dxSkinOffice2007Blue.hpp"
- #include "dxSkinOffice2007Green.hpp"
- #include "dxSkinOffice2007Pink.hpp"
- #include "dxSkinOffice2007Silver.hpp"
- #include "dxSkinOffice2010Black.hpp"
- #include "dxSkinOffice2010Blue.hpp"
- #include "dxSkinOffice2010Silver.hpp"
- #include "dxSkinsCore.hpp"
- #include "dxSkinSeven.hpp"
- #include "dxSkinSharp.hpp"
- #include "dxSkinSilver.hpp"
- #include "dxSkinStardust.hpp"
- //---------------------------------------------------------------------------
- /*
- ******************************************************************************
- * Define constant
- ******************************************************************************
- */
- /*
- * 소통정보 레이어 최대갯수
- */
- #define MAX_LAYERS 7
- /*
- * 이전/다음 구현을 위한 구조체 선언(정적 이중링크로 구현)
- */
- #define D_EXT_QUEUE_SIZE 256 //512//1024/2048
- #define D_EXT_QUEUE_MASK (D_EXT_QUEUE_SIZE-1)
- /*
- * 레이어 Extent 정보
- */
- typedef struct
- {
- bool bExtent;
- short userIdx;
- short currIdx;
- TDDRect extent[D_EXT_QUEUE_SIZE+1];
- } EXTENT_LIST_QUEUE;
- //---------------------------------------------------------------------------
- class TITS00MAP : public TForm
- {
- __published: // IDE-managed Components
- TImageList *ilstRSE;
- TImageList *ImgGis;
- TImageList *ilstTurnInfo;
- TImageList *ilstCCTV;
- TImageList *ilstObe;
- TXiServer *xsrvrMap;
- TXiClient *xclntMap;
- TImageList *ilstIncident;
- TTimer *TmrShow;
- TPanel *PnlProgress;
- TcxProgressBar *PbLoadMap;
- TPanel *Panel5;
- TImage *ImgBoundary_n;
- TImage *ImgPrint_n;
- TImage *ImgPrint_c;
- TImage *ImgRefresh_c;
- TImage *ImgRefresh_n;
- TImage *ImgFull_n;
- TImage *ImgFull_c;
- TImage *ImgSquare_c;
- TImage *ImgSquare_n;
- TImage *ImgBoundary_c;
- TImage *ImgNext_c;
- TImage *ImgNext_n;
- TImage *ImgPan_n;
- TImage *ImgPan_c;
- TImage *ImgZoomOut_c;
- TImage *ImgZoomOut_n;
- TImage *ImgStnd_c;
- TImage *ImgSave_n;
- TImage *ImgSave_c;
- TImage *ImgStnd_n;
- TImage *ImgDist_c;
- TImage *ImgCircle_n;
- TImage *ImgCircle_c;
- TImage *ImgDist_n;
- TImage *ImgSel_c;
- TImage *ImgSel_n;
- TImage *ImgPrev_n;
- TImage *ImgPrev_c;
- TImage *ImgCenter_c;
- TImage *ImgCenter_n;
- TImage *ImgZoomIn_c;
- TImage *ImgZoomIn_n;
- TImageBtn *ImgBoundary;
- TImageBtn *ImgPrint;
- TImageBtn *ImgDist;
- TImageBtn *ImgSquare;
- TImageBtn *ImgCircle;
- TImageBtn *ImgSave;
- TImage *ImgSelect_old;
- TTimer *TmrSelect;
- TTimer *TmrLinkSelect;
- TImage *ImgSelect;
- TPanel *PnlToolBar;
- TGroupBox *GroupBox1;
- TImageBtn *ImgPan;
- TImageBtn *ImgZoomIn;
- TImageBtn *ImgZoomOut;
- TImageBtn *ImgSel;
- TImageBtn *ImgCenter;
- TImageBtn *ImgPrev;
- TImageBtn *ImgNext;
- TImageBtn *ImgFull;
- TImageBtn *ImgStnd;
- TImageBtn *ImgRefresh;
- TGroupBox *GroupBox2;
- TGroupBox *GrpFacility;
- TcxCheckBox *ChkDrawCtv;
- TcxCheckBox *ChkDrawVms;
- TcxCheckBox *ChkDrawRse;
- TcxCheckBox *ChkViewExample;
- TcxCheckBox *ChkTrafficLayer;
- TcxCheckBox *ChkDrawIncident;
- TcxCheckBox *ChkGisSearch;
- TcxCheckBox *ChkToolTip;
- TGroupBox *GrpPos;
- TLabel *Label11;
- TLabel *Label12;
- TcxSpinEdit *SePosY;
- TcxSpinEdit *SePosX;
- TcxCheckBox *ChkDrawCenter;
- TcxGroupBox *panRemark;
- TGroupBox *GrpRse;
- TGroupBox *GroupBox7;
- TGroupBox *GroupBox8;
- TGroupBox *GroupBox9;
- TGroupBox *GroupBox10;
- TImage *ImgRseN;
- TImage *ImgRseC;
- TcxLabel *cxLabel1;
- TcxLabel *cxLabel2;
- TImage *ImgCctvN;
- TImage *ImgCctvC;
- TImage *ImgCctvM;
- TcxLabel *cxLabel3;
- TcxLabel *cxLabel4;
- TcxLabel *cxLabel5;
- TImage *ImgVmsN;
- TImage *ImgVmsC;
- TImage *ImgVmsM;
- TcxLabel *cxLabel6;
- TcxLabel *cxLabel7;
- TcxLabel *cxLabel8;
- TImage *ImgInc01;
- TImage *ImgInc02;
- TImage *ImgInc03;
- TImage *ImgInc04;
- TcxLabel *cxLabel9;
- TcxLabel *cxLabel10;
- TcxLabel *cxLabel11;
- TcxLabel *cxLabel12;
- TPanel *PnlTrf01;
- TPanel *PnlTrf02;
- TPanel *PnlTrf03;
- TPanel *PnlTrf00;
- TcxLabel *cxLabel13;
- TcxLabel *cxLabel14;
- TcxLabel *cxLabel15;
- TcxLabel *cxLabel16;
- TImage *ImgOffice;
- TImage *ImgTemp;
- TImage *ImgTurn001;
- TImage *ImgTurn002;
- TImage *ImgTurn003;
- TImage *ImgTurn011;
- TImage *ImgTurn012;
- TImage *ImgTurn101;
- TImage *ImgTurn102;
- TImage *ImgTurn103;
- TPopupMenu *pmuGis;
- TMenuItem *N1;
- TMenuItem *pmuGisDefault;
- TMenuItem *pmuMove;
- TMenuItem *pmuZoomIn;
- TMenuItem *pmuZoomOut;
- TMenuItem *pmuIconSel;
- TMenuItem *pmuMoveCenter;
- TMenuItem *N2;
- TMenuItem *pmuCalLen;
- TMenuItem *pmuCalArea;
- TMenuItem *pmuRadius;
- TMenuItem *N7;
- TMenuItem *MnuSetStdArea;
- TMenuItem *MnuDrawAntiAlias;
- TMenuItem *MnuViewGray;
- TMenuItem *MnuLayerSetting;
- TMenuItem *MnuMoveStdArea;
- TPopupMenu *pmuCctv;
- TMenuItem *MnuCctvId;
- TMenuItem *N6;
- TMenuItem *mnuStopImage;
- TMenuItem *mnuCctvCam;
- TMenuItem *mnuCctvPingCtrl;
- TPopupMenu *pmuVms;
- TMenuItem *mnuVmsMsg;
- TMenuItem *mnuVmsCam;
- TMenuItem *mnuVmsPingCtrl;
- TPopupMenu *pmuRse;
- TMenuItem *pmuRsePing;
- TPanel *PnlMapInfo;
- TImage *ImgDesc27;
- TImage *ImgDesc37;
- TLabel *Label16;
- TLabel *Label3;
- TLabel *LblZoomLevel;
- TLabel *LblLinkLevel;
- TImageList *ImgFacility2;
- TImage *Image1;
- TcxLabel *cxLabel17;
- TMenuItem *MnuVmsId;
- TMenuItem *N3;
- TMenuItem *MnuRseId;
- TMenuItem *N4;
- TMenuItem *NetworkPing1;
- TMenuItem *mnuCctvPingCapt;
- TMenuItem *mnuCctvPingEncd;
- TMenuItem *mnuCctvPingStrm;
- TMenuItem *NetworkPing2;
- TMenuItem *mnuVmsPingWeb;
- TGroupBox *GroupBox4;
- TImage *ImgCurrent;
- TcxLabel *LblCurrTemp;
- TGroupBox *GroupBox5;
- TImage *ImgForecast;
- TcxLabel *LblMaxFore;
- TcxLabel *LblMinFore;
- TcxCheckBox *ChkDrawVds;
- TcxCheckBox *ChkDrawAvi;
- TcxCheckBox *ChkDrawDsrc;
- TImageList *ImgGisBackup;
- TGroupBox *GrpWeb;
- TImage *Image2;
- TImage *Image3;
- TImage *Image4;
- TcxLabel *cxLabel18;
- TcxLabel *cxLabel19;
- TcxLabel *cxLabel20;
- TGroupBox *GrpDsrc;
- TImage *Image5;
- TImage *Image6;
- TImage *Image7;
- TcxLabel *cxLabel21;
- TcxLabel *cxLabel22;
- TcxLabel *cxLabel23;
- TGroupBox *GrpAvi;
- TImage *Image8;
- TImage *Image9;
- TImage *Image10;
- TcxLabel *cxLabel24;
- TcxLabel *cxLabel25;
- TcxLabel *cxLabel26;
- TcxCheckBox *ChkWebCam;
- TGroupBox *GrpVds;
- TImage *Image11;
- TImage *Image12;
- TImage *Image13;
- TcxLabel *cxLabel27;
- TcxLabel *cxLabel28;
- TcxLabel *cxLabel29;
- TPopupMenu *pmuWebCam;
- TMenuItem *MnuWebCamId;
- TMenuItem *MenuItem2;
- TMenuItem *MnuWebCam;
- TMenuItem *MenuItem5;
- TMenuItem *MnuWebCamPing;
- TPopupMenu *pmuVds;
- TMenuItem *MnuVdsId;
- TMenuItem *MenuItem3;
- TMenuItem *MenuItem4;
- TPopupMenu *pmuAvi;
- TMenuItem *MnuAviId;
- TMenuItem *MenuItem7;
- TMenuItem *MenuItem8;
- TPopupMenu *pmuDsrc;
- TMenuItem *MnuDsrcId;
- TMenuItem *MenuItem10;
- TMenuItem *MenuItem11;
- TcxLabel *LblTraffic;
- TTimer *TmrLblTraffic;
- TImage *Image14;
- TImage *Image15;
- void __fastcall FormDestroy(TObject *Sender);
- void __fastcall FormShow(TObject *Sender);
- void __fastcall TmrShowTimer(TObject *Sender);
- void __fastcall xclntMapMapChange(TObject *Sender, TPacket &ChangePacket, bool PreImage, bool NextImage);
- void __fastcall xclntMapMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
- void __fastcall MnuLayerSettingClick(TObject *Sender);
- void __fastcall xclntMapMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
- void __fastcall pmuGisCalcClick(TObject *Sender);
- void __fastcall xclntMapExit(TObject *Sender);
- void __fastcall xclntMapMouseLeave(TMessage &Msg);
- void __fastcall xclntMapMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
- void __fastcall MnuViewGrayClick(TObject *Sender);
- void __fastcall pmuControlGisClick(TObject *Sender);
- void __fastcall ImgPrevClick(TObject *Sender);
- void __fastcall ImgNextClick(TObject *Sender);
- void __fastcall ImgFullClick(TObject *Sender);
- void __fastcall ImgStndClick(TObject *Sender);
- void __fastcall ImgRefreshClick(TObject *Sender);
- void __fastcall ChkTrafficLayerClick(TObject *Sender);
- void __fastcall ChkDrawGisClick(TObject *Sender);
- void __fastcall ChkToolTipClick(TObject *Sender);
- void __fastcall TmrSelectTimer(TObject *Sender);
- void __fastcall TmrLinkSelectTimer(TObject *Sender);
- void __fastcall MnuSetStdAreaClick(TObject *Sender);
- void __fastcall MnuMoveStdAreaClick(TObject *Sender);
- void __fastcall xsrvrMapEntityAdd(TObject *Sender, AnsiString EntityName, int TotalCnt, int CurCnt);
- void __fastcall mnuStopImageClick(TObject *Sender);
- void __fastcall mnuFacilityPingClick(TObject *Sender);
- void __fastcall pmuFacilityPopup(TObject *Sender);
- void __fastcall mnuCctvCamClick(TObject *Sender);
- void __fastcall mnuVmsMsgClick(TObject *Sender);
- void __fastcall mnuVmsCamClick(TObject *Sender);
- void __fastcall ChkDrawIncidentClick(TObject *Sender);
- void __fastcall xclntMapAccClick(TMouseButton Button, TShiftState Shift, int CNT, TArr_Accdt_Rec INFO);
- void __fastcall ChkGisSearchClick(TObject *Sender);
- void __fastcall MnuDrawAntiAliasClick(TObject *Sender);
- void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
- void __fastcall panRemarkMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
- void __fastcall ChkViewExamplePropertiesChange(TObject *Sender);
- void __fastcall xclntMapCCTVClick(TMouseButton Button, TShiftState Shift, int CNT, TArr_CCTV_Rec INFO);
- void __fastcall MnuWebCamClick(TObject *Sender);
- void __fastcall TmrLblTrafficTimer(TObject *Sender);
- private: // User declarations
- public:
- TXiLinkSpeedUpdate *m_pLinkSpeedUpdate[MAX_LAYERS];
- //TXiValueRender *m_pLinkValueUpdate[MAX_LAYERS];
- // For Map
- TDDRect m_drtViewExtent;
- int m_nMapLevel;
- //마우스 제어 플래그
- TPoint m_ptDown;
- bool m_bMouseDown;
- bool m_bMoveCenter;
- bool m_bCalcMode;
- bool m_bCalcCont;
- // For Hint
- TzHintWindow *m_objToolTip;
- TStringList *m_slToolTip;
- TStringList *m_slFldName;
- TStringList *m_slFldValue;
- TStringList *m_slLinkFldName;
- TStringList *m_slLinkFldValue;
-
- public:
- /*
- * 지도 이전/이후 보기 핸들러, 전자지도엔진에서 함수지원은 하나 기능이 수행안됨
- */
- EXTENT_LIST_QUEUE m_ExtQ; // 이전/다음 정보를 저장할 전역변수
- TDDRect m_PrevExt;
- bool __fastcall PrevExtentQ();
- bool __fastcall NextExtentQ();
- bool __fastcall AddExtentQ(TDDRect &curRc);
- void __fastcall SetExtent(TDDRect &curRc);
-
- public: // User declarations
- __fastcall TITS00MAP(TComponent* Owner, TForm *ParentForm);
- void __fastcall LoadConfig();
- void __fastcall LoadImageFile(String sImgFile, TImage *pImage);
-
- void __fastcall LoadLocalSkin();
- void __fastcall CommClose();
- bool __fastcall FormInit();
- void __fastcall LoadGisMap();
- void __fastcall GetGisTrafficColor(TUTISLinkGrade &pUtisLinkColor);
- void __fastcall SetGisTrafficColor();
- void __fastcall SetMapOperation(TXiMapOperation nMapOper);
-
- void __fastcall GisMenuCheckClear();
- void __fastcall ShowLayerEditForm();
- void __fastcall SetTrafficInfo(bool bFlag);
- void __fastcall RefreshMapTraffic();
- void __fastcall UpdateGisRoadRank();
- void __fastcall UpdateGisRoadRank(int ALinkLevel, int ALyrIdx);
- #pragma pack(push,1)
- TMemoryStream *FGisStream;
- #pragma pack(pop)
- /*
- * 툴팁
- */
- void __fastcall CreateToolTip();
- void __fastcall ClearToolTip();
- void __fastcall ShowToolTipInfo(TPoint ptLocation, TStringList *slToolTip);
- void __fastcall ShowToolTipInfo(TzHintWindow *pTTipWin, TStringList *slToolTip);
- void __fastcall SetTrfLayerShow(bool bShow);
- // Hint Object
- bool __fastcall HintLinkLyr(TShiftState Shift, int X, int Y);
- // Object Select
- TDDPoint m_ptSelect;
- void __fastcall SelectObjectByPos(double dPosX, double dPosY, bool bArrow=false);
- void __fastcall SelectObjectByPos();
- void __fastcall RefreshGisLink();
- String __fastcall GetLinkLayerName();
- bool __fastcall GetLevelLinkId(int ALinkLevel, String &sLinkId, int X, int Y);
- bool __fastcall SelectLinkById(int ALinkLevel, String sId, bool bHide=false);
- bool __fastcall SelectLinkById2(int ALinkLevel, String sId, bool bHide=false);
- bool __fastcall SelectLinkByPos(int X, int Y);
- void __fastcall ShowCctvStopImage(String AId, TPoint pt);
- void __fastcall ShowCctvCamera(String AId, TPoint pt);
- void __fastcall ShowVmsMessage(String AId, TPoint pt);
- void __fastcall ShowVmsCamera(String AId, TPoint pt);
- void __fastcall ShowWebCamera(String AId, TPoint pt);
- void __fastcall ShowLinkDetailInfo(String sLinkId, int nLinkLevel);
- void __fastcall UpdateFacilityStatus();
- void __fastcall UpdateIncidentStatus();
- String FSelId;
- };
- //---------------------------------------------------------------------------
- extern PACKAGE TITS00MAP *ITS00MAP;
- //---------------------------------------------------------------------------
- #endif
|