| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574 |
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #include <OleCtrls.hpp>
- #include "ITSSkinF.h"
- #include "ITSUtilF.h"
- #include "CDSTrafficGradeF.h"
- #include "CDSFacilityF.h"
- #include "CDSIncidentF.h"
- #include "CDSTrafficF.h"
- #include "CDSParkingF.h"
- #pragma hdrstop
- //#define IPictureDisp Axvlc_tlb::IPictureDisp
- #include "ITS00MAPF.h"
- #include "ITS0000MF.h"
- #include "FrmCctvImgF.h"
- #include "FrmWebCamF.h"
- #include "FrmVmsMsgF.h"
- #include "FrmLinkInfoF.h"
- #include "FrmGisSearchF.h"
- #include "FrmMainF.h"
- #include "CommFlashF.h"
- #include "FrmCctvCamF.h"
- #include "FrmVmsCamF.h"
- #include "FrmIcsCamF.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma link "cxCheckBox"
- #pragma link "cxContainer"
- #pragma link "cxControls"
- #pragma link "cxEdit"
- #pragma link "cxGraphics"
- #pragma link "cxGroupBox"
- #pragma link "cxLabel"
- #pragma link "cxLookAndFeelPainters"
- #pragma link "cxLookAndFeels"
- #pragma link "cxMaskEdit"
- #pragma link "cxProgressBar"
- #pragma link "cxSpinEdit"
- #pragma link "cxTextEdit"
- #pragma link "dxGDIPlusClasses"
- #pragma link "dxSkinBlack"
- #pragma link "dxSkinBlue"
- #pragma link "dxSkinCaramel"
- #pragma link "dxSkinCoffee"
- #pragma link "dxSkinDarkRoom"
- #pragma link "dxSkinDarkSide"
- #pragma link "dxSkinFoggy"
- #pragma link "dxSkinGlassOceans"
- #pragma link "dxSkiniMaginary"
- #pragma link "dxSkinLilian"
- #pragma link "dxSkinLiquidSky"
- #pragma link "dxSkinLondonLiquidSky"
- #pragma link "dxSkinMcSkin"
- #pragma link "dxSkinMoneyTwins"
- #pragma link "dxSkinOffice2007Black"
- #pragma link "dxSkinOffice2007Blue"
- #pragma link "dxSkinOffice2007Green"
- #pragma link "dxSkinOffice2007Pink"
- #pragma link "dxSkinOffice2007Silver"
- #pragma link "dxSkinOffice2010Black"
- #pragma link "dxSkinOffice2010Blue"
- #pragma link "dxSkinOffice2010Silver"
- #pragma link "dxSkinsCore"
- #pragma link "dxSkinSeven"
- #pragma link "dxSkinSharp"
- #pragma link "dxSkinSilver"
- #pragma link "dxSkinStardust"
- #pragma link "ShockwaveEx"
- #pragma link "ShockwaveFlashObjects_TLB"
- #pragma resource "*.dfm"
- //---------------------------------------------------------------------------
- TITS00MAP *ITS00MAP = NULL;
- String g_sTrafficSql[MAX_LAYERS] = {
- "0************************************************************************\r\n",
- "1************************************************************************\r\n",
- "SELECT A.ROAD_ID AS LINKID, NVL(B.SPED, 0) AS SPEED, \r\n"
- " NVL(B.PRCN_DT, '19000101000000') AS REGDATE, \r\n"
- " NVL(B.DATA_NUM, 0) AS DATACNT, \r\n"
- " NVL(B.TRVL_HH, 0) AS TRVTM \r\n"
- " FROM TB_ROAD A, \r\n"
- " (SELECT * \r\n"
- " FROM TB_ROAD_TRAF \r\n"
- " WHERE PRCN_DT > TO_CHAR(SYSDATE - 5 / 1440, 'YYYYMMDDHH24MISS') \r\n"
- " ) B \r\n"
- " WHERE A.ROAD_ID = B.ROAD_ID(+) \r\n",
- "SELECT A.IFSC_ID AS LINKID, NVL(B.SPED, 0) AS SPEED, \r\n"
- " NVL(B.PRCN_DT, '19000101000000') AS REGDATE, \r\n"
- " NVL(B.DATA_NUM, 0) AS DATACNT, \r\n"
- " NVL(B.TRVL_HH, 0) AS TRVTM \r\n"
- " FROM TB_IFSC A, \r\n"
- " (SELECT * \r\n"
- " FROM TB_IFSC_TRAF \r\n"
- " WHERE PRCN_DT > TO_CHAR(SYSDATE - 5 / 1440, 'YYYYMMDDHH24MISS') \r\n"
- " ) B \r\n"
- " WHERE A.IFSC_ID = B.IFSC_ID(+) \r\n",
- "4************************************************************************\r\n",
- "SELECT A.LINK_ID AS LINKID, NVL(B.SPED, 0) AS SPEED, \r\n"
- " NVL(B.PRCN_DT, '19000101000000') AS REGDATE, \r\n"
- " NVL(B.DATA_NUM, 0) AS DATACNT, \r\n"
- " NVL(B.TRVL_HH, 0) AS TRVTM \r\n"
- " FROM TB_LINK A, \r\n"
- " (SELECT * \r\n"
- " FROM TB_LINK_TRAF \r\n"
- " WHERE PRCN_DT > TO_CHAR(SYSDATE - 5 / 1440, 'YYYYMMDDHH24MISS') \r\n"
- " ) B \r\n"
- " WHERE A.LINK_ID = B.LINK_ID(+) \r\n",
- "6************************************************************************\r\n",
- };
- //---------------------------------------------------------------------------
- __fastcall TITS00MAP::TITS00MAP(TComponent* Owner, TForm *ParentForm)
- : TForm(Owner)
- {
- ::CoInitialize(NULL);
- ITSSkin_Load(this);
- LoadLocalSkin();
- ShockwaveFlash1->Align = alClient;
- panRemark->Visible = false;
-
- m_nMapLevel = 1;
-
- //마우스 제어 플래그 초기화
- m_bMouseDown = false;
- m_bMoveCenter = false;
- m_bCalcMode = false;
- m_bCalcCont = false;
- m_ptDown.x = m_ptDown.y = 0;
- MapInit = false;
- MapStart = false;
- ModeSelect = false;
- LoadConfig();
- //LoadMap();
- }
- //---------------------------------------------------------------------------
- /*
- * 환경설정정보 로딩
- *
- * arguments
- *
- * return
- * void
- */
- void __fastcall TITS00MAP::LoadConfig()
- {
- #if 0
- TIniFile *pIniFile = NULL;
- String sIniFile = ChangeFileExt(ExtractFileName(Application->ExeName), ".ini");
- String sCfgFile = ExtractFilePath(Application->ExeName) + "\\cfg\\" + sIniFile;
- try
- {
- try
- {
- pIniFile = new TIniFile(sCfgFile);
- // 표출이미지 로딩
- //LoadImageFile(pIniFile->ReadString("IMAGE", "CENTER", ""), ImgOffice);
- LoadImageFile(pIniFile->ReadString("IMAGE", "RSE_N", ""), ImgRseN);
- LoadImageFile(pIniFile->ReadString("IMAGE", "RSE_C", ""), ImgRseC);
- LoadImageFile(pIniFile->ReadString("IMAGE", "CCTV_N", ""), ImgCctvN);
- LoadImageFile(pIniFile->ReadString("IMAGE", "CCTV_C", ""), ImgCctvC);
- LoadImageFile(pIniFile->ReadString("IMAGE", "CCTV_M", ""), ImgCctvM);
- LoadImageFile(pIniFile->ReadString("IMAGE", "VMS_N", ""), ImgVmsN);
- LoadImageFile(pIniFile->ReadString("IMAGE", "VMS_C", ""), ImgVmsC);
- LoadImageFile(pIniFile->ReadString("IMAGE", "VMS_M", ""), ImgVmsM);
- LoadImageFile(pIniFile->ReadString("IMAGE", "INC_01", ""), ImgInc01);
- LoadImageFile(pIniFile->ReadString("IMAGE", "INC_02", ""), ImgInc02);
- LoadImageFile(pIniFile->ReadString("IMAGE", "INC_03", ""), ImgInc03);
- LoadImageFile(pIniFile->ReadString("IMAGE", "INC_04", ""), ImgInc04);
- }
- __finally
- {
- if (pIniFile) delete pIniFile;
- pIniFile = NULL;
- }
- }
- catch(...)
- {
- }
- #endif
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::LoadImageFile(String sImgFile, TImage *pImage)
- {
- if (sImgFile.Trim() == "") return;
- try
- {
- ImgTemp->Picture->Assign(NULL);
- ImgTemp->Picture->LoadFromFile(sImgFile);
- pImage->Picture->Assign(pImage->Picture);
- ImgTemp->Picture->Assign(NULL);
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::LoadMap()
- {
- try {
- ShockwaveFlash1->Stop();
- String sFileName = g_AppCfg.flashmap.sMainMap;
- ShockwaveFlash1->Movie = sFileName;
- ShockwaveFlash1->Play();
- MapInit = true;
- } catch(...) {}
- }
- //---------------------------------------------------------------------------
- /*
- * 메인화면 FormDestroy시 호출되는 Method
- * Form의 자원이 해제 되기 이전에 반드시 이 Method가 호출된다.
- * 그러므로 최종적으로 자원을 해제 하고자 한다면 이곳에서 처리하는게 확실함.
- * parameter
- * Sender : Event를 보낸 객체
- * return
- * None
- */
- void __fastcall TITS00MAP::FormDestroy(TObject *Sender)
- {
- try
- {
- }
- catch (...)
- {
- }
- ::CoUninitialize();
- }
- //---------------------------------------------------------------------------
- /*
- * form을 보여줄때 호출되는 event 메서드이다.
- * arguments
- * Sender : event handler 객체
- * return
- * void
- */
- void __fastcall TITS00MAP::FormShow(TObject *Sender)
- {
- Refresh();
- FormInit();
- Application->ProcessMessages();
- TmrShow->Enabled = true;
- }
- //---------------------------------------------------------------------------
- /*
- * 닫기버튼 이나 x버튼 클릭시 공통으로 처리하는 로직이들어간다..
- * Form과 DataModule class를 delete시킨다.
- * arguments
- *
- * return
- * void
- */
- void __fastcall TITS00MAP::CommClose()
- {
- //ITS00MAP = NULL;
- //::CoUninitialize();
- }
- //---------------------------------------------------------------------------
- /*
- * Form의 초기화 작업을 수행한다.
- * arguments
- * void
- * return
- * void
- */
- bool __fastcall TITS00MAP::FormInit()
- {
- memset((char*)&m_PrevExt, 0x00, sizeof(m_PrevExt));
- memset((char*)&m_ExtQ, 0x00, sizeof(m_ExtQ));
- m_ExtQ.bExtent = true;
- m_ExtQ.userIdx = 0;
- m_ExtQ.currIdx = 0;
- return true;
- }
- //---------------------------------------------------------------------------
- /*
- * Form의 Skin 초기화 작업을 수행한다.
- * arguments
- * void
- * return
- * void
- */
- void __fastcall TITS00MAP::LoadLocalSkin()
- {
- //PnlMenu->ParentColor = false;
- //PnlMenu->Color = 0x00FF9D62;
- PnlTrf00->ParentColor = false;
- PnlTrf00->Color = clSilver;
- PnlTrf01->ParentColor = false;
- PnlTrf01->Color = clLime;
- PnlTrf02->ParentColor = false;
- PnlTrf02->Color = clYellow;
- PnlTrf03->ParentColor = false;
- PnlTrf03->Color = clRed;
- /*
- * GIS Command button skin
- */
- TImage *pImgZoomIn_n;
- TImage *pImgZoomIn_c;
- TImage *pImgCenter_n;
- TImage *pImgCenter_c;
- TImage *pImgPrev_c;
- TImage *pImgPrev_n;
- TImage *pImgSel_n;
- TImage *pImgSel_c;
- TImage *pImgDist_n;
- TImage *pImgCircle_c;
- TImage *pImgCircle_n;
- TImage *pImgDist_c;
- TImage *pImgStnd_n;
- TImage *pImgSave_c;
- TImage *pImgSave_n;
- TImage *pImgStnd_c;
- TImage *pImgZoomOut_n;
- TImage *pImgZoomOut_c;
- TImage *pImgPan_c;
- TImage *pImgPan_n;
- TImage *pImgNext_n;
- TImage *pImgNext_c;
- TImage *pImgBoundary_c;
- TImage *pImgBoundary_n;
- TImage *pImgSquare_n;
- TImage *pImgSquare_c;
- TImage *pImgFull_c;
- TImage *pImgFull_n;
- TImage *pImgRefresh_n;
- TImage *pImgRefresh_c;
- TImage *pImgPrint_c;
- TImage *pImgPrint_n;
- int nSkin = 1;
- switch (nSkin)
- {
- case 10:
- pImgZoomIn_n = ImgZoomIn_c;
- pImgZoomIn_c = ImgZoomIn_n;
- pImgZoomOut_n = ImgZoomOut_c;
- pImgZoomOut_c = ImgZoomOut_n;
- pImgCenter_n = ImgCenter_c;
- pImgCenter_c = ImgCenter_n;
- pImgPan_c = ImgPan_n;
- pImgPan_n = ImgPan_c;
- pImgPrev_c = ImgPrev_n;
- pImgPrev_n = ImgPrev_c;
- pImgNext_n = ImgNext_c;
- pImgNext_c = ImgNext_n;
- pImgBoundary_c = ImgBoundary_n;
- pImgBoundary_n = ImgBoundary_c;
- pImgSel_n = ImgSel_c;
- pImgSel_c = ImgSel_n;
- pImgDist_n = ImgDist_c;
- pImgDist_c = ImgDist_n;
- pImgSquare_n = ImgSquare_c;
- pImgSquare_c = ImgSquare_n;
- pImgCircle_c = ImgCircle_n;
- pImgCircle_n = ImgCircle_c;
- pImgFull_c = ImgFull_n;
- pImgFull_n = ImgFull_c;
- pImgStnd_n = ImgStnd_c;
- pImgStnd_c = ImgStnd_n;
- pImgRefresh_n = ImgRefresh_c;
- pImgRefresh_c = ImgRefresh_n;
- pImgPrint_c = ImgPrint_n;
- pImgPrint_n = ImgPrint_c;
- pImgSave_c = ImgSave_n;
- pImgSave_n = ImgSave_c;
- break;
- case 1: case 2: case 3: case 0:
- case 4: case 5: default:
- pImgZoomIn_n = ImgZoomIn_n;
- pImgZoomIn_c = ImgZoomIn_c;
- pImgZoomOut_n = ImgZoomOut_n;
- pImgZoomOut_c = ImgZoomOut_c;
- pImgCenter_n = ImgCenter_n;
- pImgCenter_c = ImgCenter_c;
- pImgPan_c = ImgPan_c;
- pImgPan_n = ImgPan_n;
- pImgPrev_c = ImgPrev_c;
- pImgPrev_n = ImgPrev_n;
- pImgNext_n = ImgNext_n;
- pImgNext_c = ImgNext_c;
- pImgBoundary_c = ImgBoundary_c;
- pImgBoundary_n = ImgBoundary_n;
- pImgSel_n = ImgSel_n;
- pImgSel_c = ImgSel_c;
- pImgDist_n = ImgDist_n;
- pImgDist_c = ImgDist_c;
- pImgSquare_n = ImgSquare_n;
- pImgSquare_c = ImgSquare_c;
- pImgCircle_c = ImgCircle_c;
- pImgCircle_n = ImgCircle_n;
- pImgFull_c = ImgFull_c;
- pImgFull_n = ImgFull_n;
- pImgStnd_n = ImgStnd_n;
- pImgStnd_c = ImgStnd_c;
- pImgRefresh_n = ImgRefresh_n;
- pImgRefresh_c = ImgRefresh_c;
- pImgPrint_c = ImgPrint_c;
- pImgPrint_n = ImgPrint_n;
- pImgSave_c = ImgSave_c;
- pImgSave_n = ImgSave_n;
- break;
- }
- try
- {
- ImgZoomIn->NormalPicture->Assign(pImgZoomIn_n->Picture);
- ImgZoomIn->Picture->Assign(pImgZoomIn_n->Picture);
- ImgZoomIn->TogglePicture->Assign(pImgZoomIn_c->Picture);
- ImgZoomIn->ClickedPicture->Assign(pImgZoomIn_n->Picture);
- ImgZoomOut->NormalPicture->Assign(pImgZoomOut_n->Picture);
- ImgZoomOut->Picture->Assign(pImgZoomOut_n->Picture);
- ImgZoomOut->TogglePicture->Assign(pImgZoomOut_c->Picture);
- ImgZoomOut->ClickedPicture->Assign(pImgZoomOut_n->Picture);
- ImgCenter->NormalPicture->Assign(pImgCenter_n->Picture);
- ImgCenter->Picture->Assign(pImgCenter_n->Picture);
- ImgCenter->TogglePicture->Assign(pImgCenter_c->Picture);
- ImgCenter->ClickedPicture->Assign(pImgCenter_n->Picture);
- #if 0
- ImgPan->NormalPicture->Assign(pImgPan_n->Picture);
- ImgPan->Picture->Assign(pImgPan_n->Picture);
- ImgPan->TogglePicture->Assign(pImgPan_c->Picture);
- ImgPan->ClickedPicture->Assign(pImgPan_n->Picture);
- #else
- ImgPan->NormalPicture->Assign(pImgPan_c->Picture);
- ImgPan->Picture->Assign(pImgPan_c->Picture);
- ImgPan->TogglePicture->Assign(pImgPan_n->Picture);
- ImgPan->ClickedPicture->Assign(pImgPan_n->Picture);
- #endif
- ImgPrev->NormalPicture->Assign(pImgPrev_n->Picture);
- ImgPrev->Picture->Assign(pImgPrev_n->Picture);
- ImgPrev->TogglePicture->Assign(pImgPrev_c->Picture);
- ImgPrev->ClickedPicture->Assign(pImgPrev_n->Picture);
-
- ImgNext->NormalPicture->Assign(pImgNext_n->Picture);
- ImgNext->Picture->Assign(pImgNext_n->Picture);
- ImgNext->TogglePicture->Assign(pImgNext_c->Picture);
- ImgNext->ClickedPicture->Assign(pImgNext_n->Picture);
- ImgPrev->Cursor = crHandPoint;
- ImgNext->Cursor = crHandPoint;
- ImgBoundary->NormalPicture->Assign(pImgBoundary_n->Picture);
- ImgBoundary->Picture->Assign(pImgBoundary_n->Picture);
- ImgBoundary->TogglePicture->Assign(pImgBoundary_c->Picture);
- ImgBoundary->ClickedPicture->Assign(pImgBoundary_n->Picture);
- ImgSel->NormalPicture->Assign(pImgSel_n->Picture);
- ImgSel->Picture->Assign(pImgSel_n->Picture);
- ImgSel->TogglePicture->Assign(pImgSel_c->Picture);
- ImgSel->ClickedPicture->Assign(ImgSel_c->Picture);
- ImgDist->NormalPicture->Assign(pImgDist_n->Picture);
- ImgDist->Picture->Assign(pImgDist_n->Picture);
- ImgDist->TogglePicture->Assign(pImgDist_c->Picture);
- ImgDist->ClickedPicture->Assign(pImgDist_n->Picture);
- ImgSquare->NormalPicture->Assign(pImgSquare_n->Picture);
- ImgSquare->Picture->Assign(pImgSquare_n->Picture);
- ImgSquare->TogglePicture->Assign(pImgSquare_c->Picture);
- ImgSquare->ClickedPicture->Assign(pImgSquare_n->Picture);
- ImgCircle->NormalPicture->Assign(pImgCircle_n->Picture);
- ImgCircle->Picture->Assign(pImgCircle_n->Picture);
- ImgCircle->TogglePicture->Assign(pImgCircle_c->Picture);
- ImgCircle->ClickedPicture->Assign(pImgCircle_n->Picture);
- ImgFull->NormalPicture->Assign(pImgFull_n->Picture);
- ImgFull->Picture->Assign(pImgFull_n->Picture);
- ImgFull->TogglePicture->Assign(pImgFull_c->Picture);
- ImgFull->ClickedPicture->Assign(pImgFull_n->Picture);
- ImgStnd->NormalPicture->Assign(pImgStnd_n->Picture);
- ImgStnd->Picture->Assign(pImgStnd_n->Picture);
- ImgStnd->TogglePicture->Assign(pImgStnd_c->Picture);
- ImgStnd->ClickedPicture->Assign(pImgStnd_n->Picture);
- ImgRefresh->NormalPicture->Assign(pImgRefresh_n->Picture);
- ImgRefresh->Picture->Assign(pImgRefresh_n->Picture);
- ImgRefresh->TogglePicture->Assign(pImgRefresh_c->Picture);
- ImgRefresh->ClickedPicture->Assign(pImgRefresh_n->Picture);
- ImgPrint->NormalPicture->Assign(pImgPrint_n->Picture);
- ImgPrint->Picture->Assign(pImgPrint_n->Picture);
- ImgPrint->TogglePicture->Assign(pImgPrint_c->Picture);
- ImgPrint->ClickedPicture->Assign(pImgPrint_n->Picture);
- ImgSave->NormalPicture->Assign(pImgSave_n->Picture);
- ImgSave->Picture->Assign(pImgSave_n->Picture);
- ImgSave->TogglePicture->Assign(pImgSave_c->Picture);
- ImgSave->ClickedPicture->Assign(pImgSave_n->Picture);
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::TmrShowTimer(TObject *Sender)
- {
- TmrShow->Enabled = false;
- Application->ProcessMessages();
- LoadGisMap();
- Application->ProcessMessages();
- //UpdateFacilityStatus();
- Application->ProcessMessages();
- //UpdateIncidentStatus();
- }
- //---------------------------------------------------------------------------
- /*
- * 지도데이터 로드 및 프로그램 초기화 작업 수행
- * arguments
- *
- * return
- *
- */
- void __fastcall TITS00MAP::LoadGisMap()
- {
- try
- {
- try
- {
- // 지도로딩 상태바 표출
- PnlProgress->Left = (this->Width - PnlProgress->Width) / 2;
- PnlProgress->Top = (this->Height - PnlProgress->Height) / 2;
- PnlProgress->Top -= 50;
- PnlProgress->Visible = true;
- PbLoadMap->Properties->Text = "지도 표출색상 정보 로딩 중...";
- Application->ProcessMessages();
- PbLoadMap->Position = 50;
- TUTISLinkGrade UtisLinkColor;
- GetGisTrafficColor(UtisLinkColor);
- PbLoadMap->Position = 100;
- PbLoadMap->Properties->Text = "지도 로딩 중...";
- Application->ProcessMessages();
- // start server
- LoadMap();
- pmuControlGisClick((TObject*)pmuMove); // 전자지도 마우스이벤트를 이동으로 설정
- }
- catch (...)
- {
- }
- }
- __finally
- {
- //PnlProgress->Visible = false;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::GetGisTrafficColor(TUTISLinkGrade &pUtisLinkColor)
- {
- //TJobTick job("GetGisTrafficColor");
- // 고속도로
- pUtisLinkColor.road101.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road101.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road101.GDLOW.MaxSpeed = 30;
- pUtisLinkColor.road101.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road101.GDMID.MinSpeed = 31;
- pUtisLinkColor.road101.GDMID.MaxSpeed = 70;
- pUtisLinkColor.road101.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road101.GDHIG.MinSpeed = 71;
- pUtisLinkColor.road101.GDHIG.MaxSpeed = 255;
- // 자동차전용도로
- pUtisLinkColor.road102.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road102.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road102.GDLOW.MaxSpeed = 30;
- pUtisLinkColor.road102.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road102.GDMID.MinSpeed = 31;
- pUtisLinkColor.road102.GDMID.MaxSpeed = 50;
- pUtisLinkColor.road102.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road102.GDHIG.MinSpeed = 51;
- pUtisLinkColor.road102.GDHIG.MaxSpeed = 255;
- // 일반국도
- pUtisLinkColor.road103.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road103.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road103.GDLOW.MaxSpeed = 10;
- pUtisLinkColor.road103.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road103.GDMID.MinSpeed = 11;
- pUtisLinkColor.road103.GDMID.MaxSpeed = 20;
- pUtisLinkColor.road103.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road103.GDHIG.MinSpeed = 21;
- pUtisLinkColor.road103.GDHIG.MaxSpeed = 255;
- // 특별, 광역시도
- pUtisLinkColor.road104.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road104.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road104.GDLOW.MaxSpeed = 10;
- pUtisLinkColor.road104.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road104.GDMID.MinSpeed = 11;
- pUtisLinkColor.road104.GDMID.MaxSpeed = 20;
- pUtisLinkColor.road104.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road104.GDHIG.MinSpeed = 21;
- pUtisLinkColor.road104.GDHIG.MaxSpeed = 255;
- // 국가지원지방도
- pUtisLinkColor.road105.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road105.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road105.GDLOW.MaxSpeed = 10;
- pUtisLinkColor.road105.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road105.GDMID.MinSpeed = 11;
- pUtisLinkColor.road105.GDMID.MaxSpeed = 20;
- pUtisLinkColor.road105.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road105.GDHIG.MinSpeed = 21;
- pUtisLinkColor.road105.GDHIG.MaxSpeed = 255;
- // 지방도
- pUtisLinkColor.road106.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road106.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road106.GDLOW.MaxSpeed = 10;
- pUtisLinkColor.road106.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road106.GDMID.MinSpeed = 11;
- pUtisLinkColor.road106.GDMID.MaxSpeed = 20;
- pUtisLinkColor.road106.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road106.GDHIG.MinSpeed = 21;
- pUtisLinkColor.road106.GDHIG.MaxSpeed = 255;
- // 시군도
- pUtisLinkColor.road107.GDLOW.SpdCOLOR = clRed;
- pUtisLinkColor.road107.GDLOW.MinSpeed = 0;
- pUtisLinkColor.road107.GDLOW.MaxSpeed = 10;
- pUtisLinkColor.road107.GDMID.SpdCOLOR = clYellow;
- pUtisLinkColor.road107.GDMID.MinSpeed = 11;
- pUtisLinkColor.road107.GDMID.MaxSpeed = 20;
- pUtisLinkColor.road107.GDHIG.SpdCOLOR = clLime;
- pUtisLinkColor.road107.GDHIG.MinSpeed = 21;
- pUtisLinkColor.road107.GDHIG.MaxSpeed = 255;
- TDBLinkColor *pLinkColor = NULL;
- TLinkTrfGrd *pTrgGrd = NULL;
- FOR_STL(TItsTrafficGrade *, pGrade, ItsTrafficGradeManager->FLists)
- {
- FOR_STL(TItsTrafficSubGrade *, pSubGrade, pGrade->FSubLists)
- {
- if (pGrade->SECT_GRAD_CD == "SRT1") //101.고속국도
- pLinkColor = &pUtisLinkColor.road101;
- else
- if (pGrade->SECT_GRAD_CD == "SRT2") //102.도시고속국도
- pLinkColor = &pUtisLinkColor.road102;
- else
- if (pGrade->SECT_GRAD_CD == "SRT3") //103.일반국도
- pLinkColor = &pUtisLinkColor.road103;
- else
- if (pGrade->SECT_GRAD_CD == "SRT4") //104.특별·광역시도
- pLinkColor = &pUtisLinkColor.road104;
- else
- if (pGrade->SECT_GRAD_CD == "SRT5") //105.국가지원지방도
- pLinkColor = &pUtisLinkColor.road105;
- else
- if (pGrade->SECT_GRAD_CD == "SRT6") //106.지방도
- pLinkColor = &pUtisLinkColor.road106;
- else
- if (pGrade->SECT_GRAD_CD == "SRT7") //107.시·군도
- pLinkColor = &pUtisLinkColor.road107;
- else
- continue;
- TColor trfColor;
- if (pSubGrade->CMTR_GRAD_CD == "LTC1")
- {
- pTrgGrd = &pLinkColor->GDHIG;
- trfColor = clLime;
- }
- else
- if (pSubGrade->CMTR_GRAD_CD == "LTC2")
- {
- pTrgGrd = &pLinkColor->GDMID;
- trfColor = clYellow;
- }
- else
- if (pSubGrade->CMTR_GRAD_CD == "LTC3")
- {
- pTrgGrd = &pLinkColor->GDLOW;
- trfColor = clRed;
- }
- else
- continue;
- pTrgGrd->SpdCOLOR = trfColor;
- if (pSubGrade->CMTR_GRAD_CD == "LTC3")
- pTrgGrd->MinSpeed = 0;
- else
- pTrgGrd->MinSpeed = StrToInt(pSubGrade->LWST_TRVL_SPED);
- pTrgGrd->MaxSpeed = StrToInt(pSubGrade->HGHS_TRVL_SPED);
- }
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::SetGisTrafficColor()
- {
- #if 0
- //TODO
- //소통등급별 색상을 플래시로 던지는 것을 여기에 추가한다.
- TUTISLinkGrade UtisLinkColor;
- GetGisTrafficColor(UtisLinkColor);
- // 소통정보를 표출할 스레드 생성
- for (int ii = 0; ii < MAX_LAYERS; ii++)
- {
- if (m_pLinkSpeedUpdate[ii] == NULL) continue;
- m_pLinkSpeedUpdate[ii]->SetUTISLinkColor(UtisLinkColor);
- }
- #endif
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::GisMenuCheckClear()
- {
- pmuZoomIn->Checked = false;
- pmuZoomOut->Checked = false;
- pmuMove->Checked = false;
- pmuIconSel->Checked = false;
- pmuCalLen->Checked = false;
- pmuCalArea->Checked = false;
- pmuRadius->Checked = false;
- pmuMoveCenter->Checked = false;
- pmuGisDefault->Checked = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::pmuGisCalcClick(TObject *Sender)
- {
- //TODO TMenuItem *pMenu = (TMenuItem *)Sender;
- //TODO SetMapOperation((TXiMapOperation)pMenu->Tag);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::pmuControlGisClick(TObject *Sender)
- {
- TMenuItem *pMenu = (TMenuItem*)Sender;
-
- SetMapOperation((TXiMapOperation)pMenu->Tag);
- }
- //---------------------------------------------------------------------------
- /*
- * 지도제어 설정
- * arguments
- *
- * return
- *
- */
- void __fastcall TITS00MAP::SetMapOperation(TXiMapOperation nMapOper)
- {
- //enum TXiMapOperation { Nothing, OnZoomIn, OnZoomOut, OnPanSt, OnDistance, OnSelect, OnGeoQuery, OnEditting, OnCircle, OnShortPath, OnArea, OnInsert, OnFindEvent, OnNearFind, OnUserDefine };
- if (!MapStart) return;
- GisMenuCheckClear();
- m_bMoveCenter = false;
- m_bCalcMode = false;
- m_bCalcCont = false;
- if (OnSelect == nMapOper)
- {
- GrpPos->Visible = true;
- }
- else
- {
- GrpPos->Visible = false;
- }
-
- switch(nMapOper)
- {
- case OnPanSt: //pan
- TCommFlash::CallFunc(ShockwaveFlash1, "SelectMode", "0");
- ShockwaveFlash1->Cursor = crDefault;//Drag;
- ModeSelect = false;
- try
- {
- ImgPan->NormalPicture->Assign(ImgPan_c->Picture);
- ImgPan->Picture->Assign(ImgPan_c->Picture);
- ImgPan->TogglePicture->Assign(ImgPan_n->Picture);
- ImgPan->ClickedPicture->Assign(ImgPan_n->Picture);
- ImgSel->NormalPicture->Assign(ImgSel_n->Picture);
- ImgSel->Picture->Assign(ImgSel_n->Picture);
- ImgSel->TogglePicture->Assign(ImgSel_c->Picture);
- ImgSel->ClickedPicture->Assign(ImgSel_c->Picture);
- } catch(Exception &e) {}
- break;
- case OnZoomIn: //zoomin
- TCommFlash::CallFunc(ShockwaveFlash1, "ZoomIn", "");
- break;
- case OnZoomOut: //zoomout
- TCommFlash::CallFunc(ShockwaveFlash1, "ZoomOut", "");
- break;
- case OnSelect: //select
- TCommFlash::CallFunc(ShockwaveFlash1, "SelectMode", "1");
- ShockwaveFlash1->Cursor = crHelp;
- ModeSelect = true;
- try
- {
- ImgPan->NormalPicture->Assign(ImgPan_n->Picture);
- ImgPan->Picture->Assign(ImgPan_n->Picture);
- ImgPan->TogglePicture->Assign(ImgPan_c->Picture);
- ImgPan->ClickedPicture->Assign(ImgPan_n->Picture);
- ImgSel->NormalPicture->Assign(ImgSel_c->Picture);
- ImgSel->Picture->Assign(ImgSel_c->Picture);
- ImgSel->TogglePicture->Assign(ImgSel_n->Picture);
- ImgSel->ClickedPicture->Assign(ImgSel_n->Picture);
- } catch(Exception &e) {}
- break;
- }
- }
- //---------------------------------------------------------------------------
- /*
- * 전자지도의 영역을 설정한다.
- * arguments
- * double : left 영역
- * double : top 영역
- * double : right 영역
- * double : bottom 영역
- * return
- * void
- */
- void __fastcall TITS00MAP::SetExtent(TDDRect &curRc)
- {
- //TODO if (xclntMap->Active)
- //TODO {
- //TODO xclntMap->ExtentDraw(curRc);
- //TODO }
- }
- //---------------------------------------------------------------------------
- /*
- * 지도 영역 이동 함수. 현재 영역을 영역이동 큐에 추가한다.
- * 다음 버튼을 비활성 시킨다.
- * arguments
- * return
- * void
- */
- bool __fastcall TITS00MAP::AddExtentQ(TDDRect &curRc)
- {
- TDDRect *pExt = &m_ExtQ.extent[m_ExtQ.userIdx];
- memcpy((char*)pExt, (char*)&curRc, sizeof(curRc));
- if (m_PrevExt.MinX == pExt->MinX &&
- m_PrevExt.MinY == pExt->MinY &&
- m_PrevExt.MaxX == pExt->MaxX &&
- m_PrevExt.MaxY == pExt->MaxY)
- {
- return false;
- }
- memcpy((char*)&m_PrevExt, pExt, sizeof(m_PrevExt));
- if (m_ExtQ.userIdx >= D_EXT_QUEUE_SIZE)
- {
- m_ExtQ.userIdx = D_EXT_QUEUE_SIZE;
- memcpy((char *)&m_ExtQ.extent[0], (char *)&m_ExtQ.extent[1], sizeof(TDDRect)*D_EXT_QUEUE_SIZE);
- }
- else
- {
- m_ExtQ.userIdx++;
- }
- m_ExtQ.currIdx = m_ExtQ.userIdx-1;
- return true;
- }
- //---------------------------------------------------------------------------
- /*
- * 지도 영역 이동 함수. 이전 영역으로 이동
- * 이동 범위에 따라 이전/다음 버튼을 활성/비활성 시킨다.
- * arguments
- * return
- * void
- */
- bool __fastcall TITS00MAP::PrevExtentQ()
- {
- m_ExtQ.bExtent = false;
- if (m_ExtQ.currIdx <= 0)
- {
- m_ExtQ.currIdx = 0;
- return false;
- }
- m_ExtQ.currIdx--;
- TDDRect *pExt = &m_ExtQ.extent[m_ExtQ.currIdx];
- SetExtent(*pExt);
- return true;
- }
- //---------------------------------------------------------------------------
- /*
- * 지도 영역 이동 함수. 다음 영역으로 이동
- * 이동 범위에 따라 이전/다음 버튼을 활성/비활성 시킨다.
- * arguments
- * return
- * void
- */
- bool __fastcall TITS00MAP::NextExtentQ()
- {
- m_ExtQ.bExtent = false;
- if (m_ExtQ.currIdx >= m_ExtQ.userIdx-1)
- {
- m_ExtQ.currIdx = m_ExtQ.userIdx-1;
- return false;
- }
- m_ExtQ.currIdx++;
- TDDRect *pExt = &m_ExtQ.extent[m_ExtQ.currIdx];
- SetExtent(*pExt);
- return true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ImgPrevClick(TObject *Sender)
- {
- PrevExtentQ();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ImgNextClick(TObject *Sender)
- {
- NextExtentQ();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ImgFullClick(TObject *Sender)
- {
- //TODO if (xclntMap->Active)
- //TODO {
- //TODO xclntMap->ExtentDraw(xclntMap->GetFullExtent());
- //TODO }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ImgStndClick(TObject *Sender)
- {
- if (MapStart)
- {
- TCommFlash::CallFunc(ShockwaveFlash1, "StdExtent", "");
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ImgRefreshClick(TObject *Sender)
- {
- if (MapStart)
- {
- // 시설물상태정보
- FrmMain->FPollStatus01.Reset();
- // 프로세스상태정보
- FrmMain->FPollStatus02.Reset();
- ItsTrafficManager->Init();
- FrmMain->FPollTraffic00.Reset(); // 링크소통정보(전체)
- FrmMain->FPollTraffic01.Reset(); // 링크소통정보
- FrmMain->FPollTraffic02.Reset(); // 서비스링크소통정보
- FrmMain->FPollTraffic03.Reset(); // 도로소통정보
- FrmMain->FPollTraffic04.Reset(); // 반복정체구간
- ImgRefresh->Enabled = false;
- TmrRefresh->Enabled = true;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::TmrRefreshTimer(TObject *Sender)
- {
- TmrRefresh->Enabled = false;
- ImgRefresh->Enabled = true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ChkTrafficLayerClick(TObject *Sender)
- {
- if (!MapStart) return;
- String sTraffic = ChkTrafficLayer->Checked ? "1" : "0";
- String sTooltip = ChkToolTip->Checked ? "1" : "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowTraffic", sTraffic + "|" + sTooltip);
- ShockwaveFlash1->SetFocus();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::TmrSelectTimer(TObject *Sender)
- {
- TmrSelect->Enabled = false;
- ImgSelect->Visible = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::SelectObjectByPos(double dPosX, double dPosY, bool bArrow/*=false*/)
- {
- m_ptSelect.X = dPosX;
- m_ptSelect.Y = dPosY;
- if (!MapStart) return;
- TCommFlash::CallFunc(ShockwaveFlash1, "SelectPoint", String(dPosX) + "," + String(dPosY) + "|3");
- ShockwaveFlash1->SetFocus();
- }
- //---------------------------------------------------------------------------
- bool __fastcall TITS00MAP::SelectLinkById(int ALinkLevel, String sId, bool bHide/*=false*/)
- {
- try
- {
- if (!MapStart) return false;
- if (m_nMapLevel != ALinkLevel)
- {
- int nZoomLevel = 1;
- if (ALinkLevel == 2)
- {
- nZoomLevel = 2;
- }
- else
- if (ALinkLevel == 3)
- {
- nZoomLevel = 5;
- }
- TCommFlash::CallFunc(ShockwaveFlash1, "SetZoom", String(nZoomLevel));
- Application->ProcessMessages();
- //Sleep(1000);
- Application->ProcessMessages();
- }
- #if 0
- var zoom = _mainMap.map.getZoom();
- switch(zoom)
- {
- case 1: levl = 1; break; //LINK
- case 2: levl = 2; break; //IFSC
- case 3: levl = 3; break; //IFSC
- case 4: levl = 4; break; //IFSC
- case 5: levl = 5; break; //ROAD
- default: levl = 6; break; //ROAD
- }
- #endif
- TCommFlash::CallFunc(ShockwaveFlash1, "FindLink", sId);
- }
- catch(...)
- {
- }
- return true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::TmrLinkSelectTimer(TObject *Sender)
- {
- TmrLinkSelect->Enabled = false;
- //TODO xclntMap->ClearUserDrawPolyGon();
- //TODO xclntMap->ClearPathInfo();
- //TODO xclntMap->ReDraw();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::MnuSetStdAreaClick(TObject *Sender)
- {
- #if 0
- //TODO
- if (!MapStart) return;
- Application->ProcessMessages();
- if (Application->MessageBox(L"현재 영역을 표준영역으로 지정하시겠습니까?", L"확인",
- MB_YESNO|MB_ICONQUESTION) != IDYES)
- {
- return;
- }
- TIniFile *pIniFile = NULL;
- String sIniFile = ChangeFileExt(ExtractFileName(Application->ExeName), ".ini");
- String sCfgFile = ExtractFilePath(Application->ExeName) + "\\cfg\\" + sIniFile;
- try
- {
- try
- {
- pIniFile = new TIniFile(sCfgFile);
- TDDRect rc = xclntMap->GetViewExtent();
- pIniFile->WriteString("MAP", "LEFTTOPX", String(rc.MaxX));
- pIniFile->WriteString("MAP", "LEFTTOPY", String(rc.MaxY));
- pIniFile->WriteString("MAP", "RIGHTBOTTOMX", String(rc.MinX));
- pIniFile->WriteString("MAP", "RIGHTBOTTOMY", String(rc.MinY));
-
- g_GisInfo.dLeftTopX = rc.MaxX;
- g_GisInfo.dLeftTopY = rc.MaxY;
- g_GisInfo.dRightBottomX = rc.MinX;
- g_GisInfo.dRightBottomY = rc.MinY;
- }
- __finally
- {
- if (pIniFile) delete pIniFile;
- pIniFile = NULL;
- }
- }
- catch(...)
- {
- }
- #endif
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::MnuMoveStdAreaClick(TObject *Sender)
- {
- ImgStndClick((TObject*)ImgStnd);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::RefreshMapTraffic()
- {
- try {
- TmrRefresh->Enabled = false;
- ImgRefresh->Enabled = true;
- } catch(...) {}
- if (!MapStart) return;
- //LblTraffic->Visible = true;
- //TmrLblTraffic->Enabled = true;
- String sObjList = "";
- try
- {
- try
- {
- ItsTrafficManager->FLists.Lock();
- FOR_STL(TItsTraffic*, pTraffic, ItsTrafficManager->FLists)
- {
- if (pTraffic->TRF_GRADE == "0") continue;
- sObjList += String(pTraffic->LEVL) + "," +
- pTraffic->LINKID + "," +
- pTraffic->TRF_GRADE + "," +
- String(pTraffic->SPEED) + "," +
- String(pTraffic->TRVTM) + "|";
- }
- }
- catch(Exception &exception)
- {
- throw Exception(String(exception.ClassName()) + exception.Message);
- }
- }
- __finally
- {
- ItsTrafficManager->FLists.UnLock();
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "UpdateTraffic", sObjList);
- }
- }
- TCommFlash::CallFunc(ShockwaveFlash1, "RefreshMap", "");
- try
- {
- if (FrmLinkInfo)
- {
- FrmLinkInfo->RefreshLinkInfo();
- }
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ChkDrawGisClick(TObject *Sender)
- {
- ShowHideFacility();
- ShockwaveFlash1->SetFocus();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowLinkDetailInfo(String sLinkId, int nLinkLevel)
- {
- try
- {
- if (FrmLinkInfo == NULL)
- {
- FrmLinkInfo = new TFrmLinkInfo(Application);
- }
- FrmLinkInfo->Show();
- FrmLinkInfo->ShowLinkInfo(sLinkId, nLinkLevel);
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ChkGisSearchClick(TObject *Sender)
- {
- try
- {
- if (ChkGisSearch->Checked)
- {
- if (FrmGisSearch == NULL)
- {
- FrmGisSearch = new TFrmGisSearch(this);
- //FrmGisSearch->Parent = this;
- }
- FrmGisSearch->Show();
- }
- else
- {
- if (FrmGisSearch)
- {
- if (FrmGisSearch->m_bClose == false)
- {
- FrmGisSearch->Close();
- }
- }
- }
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::FormClose(TObject *Sender, TCloseAction &Action)
- {
- CommClose();
- //ITS00MAP = NULL;
- Action = caFree;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::panRemarkMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
- {
- TcxGroupBox *pGroup = (TcxGroupBox*)Sender;
- ReleaseCapture();
- pGroup->Perform(WM_SYSCOMMAND, 0xf012, 0);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ChkViewExamplePropertiesChange(TObject *Sender)
- {
- panRemark->Visible = ChkViewExample->Checked;
- }
- //---------------------------------------------------------------------------
- /*
- * 시설물의 상태에 따라 이미지를 전자지도에 표출한다.(XiClient->CCTVIconList)
- * arguments
- *
- * return
- * void
- */
- void __fastcall TITS00MAP::UpdateFacilityStatus()
- {
- String sFacility;
- String sShowIcon;
- String sShowInfo;
- String sObjList;
- String sStatus;
- TItsFacility *pFacility;
- sStatus = "0";
- try
- {
- ItsFacilityManager->FCctvLists.Lock();
- FOR_STL(TItsCctv *, pObj, ItsFacilityManager->FCctvLists)
- {
- if (pObj->DEL_YN == "Y") continue;
- //if (pObj->LOCAL_YN != "Y") continue; //지역CCTV정보만 위치에 표출
- pFacility = ItsFacilityManager->FLists.Find(pObj->CCTV_CTLR_ID);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- String sLoc = TCommFlash::ReplaceName(pObj->ISTL_LCTN_NM);
- sObjList += (pObj->CCTV_CTLR_ID + "," + sStatus + "," + sLoc + "," + pObj->X_CRDN + "," + pObj->Y_CRDN + "," + pObj->CCTV_CTLR_ID + ",0,|");
- }
- }
- __finally
- {
- ItsFacilityManager->FCctvLists.UnLock();
- sFacility = FAC_CCTV;
- sShowIcon = ChkDrawCtv->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- sObjList = "";
- try
- {
- ItsFacilityManager->FVmsLists.Lock();
- FOR_STL(TItsVms *, pObj, ItsFacilityManager->FVmsLists)
- {
- if (pObj->DEL_YN == "Y") continue;
- pFacility = ItsFacilityManager->FLists.Find(pObj->VMS_CTLR_ID);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- String sSubType = pObj->VMS_USAG_TYPE_CD == "VUTN" ? "T" : "P";
- String sLoc = TCommFlash::ReplaceName(pObj->VMS_NM);
- sObjList += (pObj->VMS_CTLR_ID + "," + sStatus + "," + sLoc + "," + pObj->X_CRDN + "," + pObj->Y_CRDN + "," + pObj->VMS_CTLR_ID + "," + sSubType + "|");
- }
- }
- __finally
- {
- ItsFacilityManager->FVmsLists.UnLock();
- sFacility = FAC_VMS;
- sShowIcon = ChkDrawVms->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- sObjList = "";
- try
- {
- ItsFacilityManager->FRseLists.Lock();
- FOR_STL(TItsRse *, pObj, ItsFacilityManager->FRseLists)
- {
- //if (pObj->DEL_YN == "Y") continue;
- pFacility = ItsFacilityManager->FLists.Find(pObj->RSEID);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- if (sStatus == "2") sStatus = "1";
- String sLoc = TCommFlash::ReplaceName(pObj->LOCATION);
- sObjList += (pObj->RSEID + "," + sStatus + "," + sLoc + "," + pObj->COORDX + "," + pObj->COORDY + "," + pObj->RSEID + ",0,|");
- }
- }
- __finally
- {
- ItsFacilityManager->FRseLists.UnLock();
- sFacility = FAC_RSE;
- sShowIcon = ChkDrawRse->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- #if 0
- sObjList = "";
- try
- {
- ItsFacilityManager->FWebCamLists.Lock();
- FOR_STL(TItsWebCam *, pObj, ItsFacilityManager->FWebCamLists)
- {
- //if (pObj->DEL_YN == "Y") continue;
- pFacility = ItsFacilityManager->FLists.Find(pObj->WEB_CMRA_ID);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- if (sStatus == "2") sStatus = "1";
- String sLoc = TCommFlash::ReplaceName(pObj->ISTL_LCTN_NM);
- sObjList += (pObj->WEB_CMRA_ID + "," + sStatus + "," + sLoc + "," + pObj->X_CRDN + "," + pObj->Y_CRDN + "," + pObj->WEB_CMRA_ID + ",0,|");
- }
- }
- __finally
- {
- ItsFacilityManager->FWebCamLists.UnLock();
- sFacility = FAC_WCAM;
- sShowIcon = ChkWebCam->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- #endif
- sObjList = "";
- try
- {
- ItsFacilityManager->FVdsLists.Lock();
- FOR_STL(TItsVds *, pObj, ItsFacilityManager->FVdsLists)
- {
- if (pObj->DEL_YN == "Y") continue;
- pFacility = ItsFacilityManager->FLists.Find(pObj->VDS_CTLR_ID);//CTLR_MNGM_NMBR);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- String sLoc = TCommFlash::ReplaceName(pObj->LCTN);
- sObjList += (pObj->VDS_CTLR_ID + "," + sStatus + "," + sLoc + "," + pObj->X_CRDN + "," + pObj->Y_CRDN + "," + pObj->VDS_CTLR_ID + ",0,|");
- }
- }
- __finally
- {
- ItsFacilityManager->FVdsLists.UnLock();
- sFacility = FAC_VDS;
- sShowIcon = ChkDrawVds->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- sObjList = "";
- try
- {
- ItsFacilityManager->FAviLists.Lock();
- FOR_STL(TItsAvi *, pObj, ItsFacilityManager->FAviLists)
- {
- if (pObj->DEL_YN == "Y") continue;
- pFacility = ItsFacilityManager->FLists.Find(pObj->AVI_ID);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- String sLoc = TCommFlash::ReplaceName(pObj->AVI_LCTN_NM);
- sObjList += (pObj->AVI_ID + "," + sStatus + "," + sLoc + "," + pObj->X_CRDN + "," + pObj->Y_CRDN + "," + pObj->AVI_ID + ",0,|");
- }
- }
- __finally
- {
- ItsFacilityManager->FAviLists.UnLock();
- sFacility = FAC_AVI;
- sShowIcon = ChkDrawAvi->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- #if 0
- sObjList = "";
- try
- {
- ItsFacilityManager->FDsrcLists.Lock();
- FOR_STL(TItsDsrc *, pObj, ItsFacilityManager->FDsrcLists)
- {
- if (pObj->DEL_YN == "Y") continue;
- pFacility = ItsFacilityManager->FLists.Find(pObj->RSE_ID);
- if (!pFacility) continue;
- sStatus = pFacility->FComm;
- String sLoc = TCommFlash::ReplaceName(pObj->ISTL_LCTN_NM);
- sObjList += (pObj->RSE_ID + "," + sStatus + "," + sLoc + "," + pObj->LCTN_X + "," + pObj->LCTN_Y + "," + pObj->RSE_ID + ",0,|");
- }
- }
- __finally
- {
- ItsFacilityManager->FDsrcLists.UnLock();
- sFacility = FAC_DSRC;
- sShowIcon = ChkDrawDsrc->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- #endif
- sObjList = "";
- try
- {
- ItsParkingManager->FLists.Lock();
- FOR_STL(TItsParking *, pObj, ItsParkingManager->FLists)
- {
- if (pObj->DEL_YN == "Y") continue;
- sStatus = "0";
- String sLoc = TCommFlash::ReplaceName(pObj->PARKINGNAME);
- sObjList += (pObj->PARKINGID + "," + sStatus + "," + sLoc + "," + pObj->COORDX + "," + pObj->COORDY + "," + pObj->PARKINGCNT + ",0,|");
- }
- }
- __finally
- {
- ItsParkingManager->FLists.UnLock();
- sFacility = FAC_PARK;
- sShowIcon = ChkDrawPark->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- //시설물 재설정 후 시설물 정보만 다시 그리도록 한다.
- //TCommFlash::CallFunc(ShockwaveFlash1, "RefreshMap", "");
- }
- //---------------------------------------------------------------------------
- /*
- * 돌발 상태에 따라 이미지를 전자지도에 표출한다.(XiClient->ADDAccEvent)
- * arguments
- *
- * return
- * void
- */
- void __fastcall TITS00MAP::UpdateIncidentStatus()
- {
- static String sStatusMsg[6] = { "", "사고", "공사", "행사", "기상", "기타", };
- if (!MapStart) return;
- String sFacility;
- String sShowIcon;
- String sShowInfo;
- String sObjList;
- int nStatus = 0;
- sObjList = "";
- try
- {
- ItsIncidentManager->FLists.Lock();
- FOR_STL(TItsIncident *, pObj, ItsIncidentManager->FLists)
- {
- if (pObj->DISP_INCD == "N") continue;
- if (pObj->INCD_PRGR_STEP_CD == "ISS2")
- {
- nStatus = pObj->INCD_TYPE_CLSF_CD.ToIntDef(1);
- if (nStatus > 4 || nStatus < 1) nStatus = 1;
- //돌발유형이 사고,기상인 경우는 돌발종료시각을 표출하지 않도록 함. 돌발유형이 공사,행사인 경우만 돌발종료시각 표출함
- //String sTitle = "▶▶돌발 정보◀◀|돌발 ID : " + pObj->INCD_OCRR_ID + "|제목 : " + pObj->INCD_TITL + "|유형 : " + sStatusMsg[nStatus];
- //sTitle += "|돌발등록시각: " + ITSUtil_StrToTime(pObj->RGST_DT) + "|돌발시작시각: " + ITSUtil_StrToTime(pObj->FINCD_STRT_DT);
- String sTitle = TCommFlash::ReplaceName(pObj->INCD_TITL);
- String sInfo = pObj->INCD_OCRR_ID + "$" + sTitle + "$" + sStatusMsg[nStatus];
- sInfo += "$" + ITSUtil_StrToTime(pObj->RGST_DT) + "$" + ITSUtil_StrToTime(pObj->FINCD_STRT_DT);
- if (nStatus == 1 || nStatus == 2)
- {
- sInfo += "$" + ITSUtil_StrToTime(pObj->INCD_END_PRAR_DT); //돌발종료시각
- }
- else sInfo+= "$-";
- sObjList += (pObj->INCD_OCRR_ID + "," + String(nStatus) + "," + sTitle + "," + pObj->X_CRDN + "," + pObj->Y_CRDN + "," + sInfo + "|");
- }
- }
- }
- __finally
- {
- ItsIncidentManager->FLists.UnLock();
- sFacility = FAC_INCD;
- sShowIcon = ChkDrawIncident->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "RemoveFacility", sFacility);
- if (sObjList != "")
- {
- sObjList = sObjList.SubString(1, sObjList.Length()-1);
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo + "|" + sObjList);
- }
- }
- //TCommFlash::CallFunc(ShockwaveFlash1, "RefreshMap", "");
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::pmuFacilityPopup(TObject *Sender)
- {
- String sLoc = " ";
- TPopupMenu *pMenu = (TPopupMenu*)Sender;
- if (pMenu->Tag == 0)
- {
- TItsCctv *pObj = ItsFacilityManager->FCctvLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->ISTL_LCTN_NM);
- //MnuCctvId->Caption = "[CCTV] " + FSelId + " " + sLoc;
- MnuCctvId->Caption = "[CCTV] " + sLoc;
- }
- else
- if (pMenu->Tag == 1)
- {
- TItsVms *pObj = ItsFacilityManager->FVmsLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->VMS_NM);
- //MnuVmsId->Caption = "[VMS] " + FSelId + " " + sLoc;
- MnuVmsId->Caption = "[VMS] " + sLoc;
- }
- else
- if (pMenu->Tag == 2)
- {
- TItsRse *pObj = ItsFacilityManager->FRseLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->LOCATION);
- //MnuRseId->Caption = "[RSE] " + FSelId + " " + sLoc;
- MnuRseId->Caption = "[RSE] " + sLoc;
- }
- else
- if (pMenu->Tag == 3)
- {
- TItsWebCam *pObj = ItsFacilityManager->FWebCamLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->ISTL_LCTN_NM);
- //MnuWebCamId->Caption = "[웹카메라] " + FSelId + " " + sLoc;
- MnuWebCamId->Caption = "[웹카메라] " + sLoc;
- }
- else
- if (pMenu->Tag == 4)
- {
- TItsVds *pObj = ItsFacilityManager->FVdsLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->LCTN);
- //MnuVdsId->Caption = "[VDS] " + FSelId + " " + sLoc;
- MnuVdsId->Caption = "[VDS] " + sLoc;
- }
- else
- if (pMenu->Tag == 5)
- {
- TItsAvi *pObj = ItsFacilityManager->FAviLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->AVI_LCTN_NM);
- //MnuAviId->Caption = "[AVI] " + FSelId + " " + sLoc;
- MnuAviId->Caption = "[AVI] " + sLoc;
- }
- else
- if (pMenu->Tag == 6)
- {
- TItsDsrc *pObj = ItsFacilityManager->FDsrcLists.Find(FSelId);
- if (pObj) sLoc = TCommFlash::ReplaceName(pObj->ISTL_LCTN_NM);
- //MnuDsrcId->Caption = "[DSRC] " + FSelId + " " + sLoc;
- MnuDsrcId->Caption = "[DSRC] " + sLoc;
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::mnuFacilityPingClick(TObject *Sender)
- {
- TMenuItem *pMenu = (TMenuItem*)Sender;
- String sIp;
- Application->ProcessMessages();
- if (pMenu->Tag >= 11 && 15 >= pMenu->Tag)
- {
- TItsCctv *pObj = ItsFacilityManager->FCctvLists.Find(FSelId);
- if (pObj)
- {
- switch(pMenu->Tag)
- {
- case 12: sIp = pObj->CCTV_CAPT_IP.Trim(); break;
- case 13: sIp = pObj->CCTV_ENCD_IP.Trim(); break;
- case 14: sIp = pObj->STRM_SVR_IP.Trim(); break;
- case 15: sIp = pObj->CCTV_FIBR_IP.Trim(); break;
- case 11:
- default: sIp = pObj->CCTV_CTLR_IP.Trim(); break;
- }
- }
- }
- else
- if (pMenu->Tag >= 21 && 22 >= pMenu->Tag)
- {
- TItsVms *pObj = ItsFacilityManager->FVmsLists.Find(FSelId);
- if (pObj)
- {
- switch(pMenu->Tag)
- {
- case 22: sIp = pObj->WEB_CMRA_IP.Trim(); break;
- case 21:
- default: sIp = pObj->VMS_CTLR_IP.Trim(); break;
- }
- }
- }
- else
- if (pMenu->Tag == 2)
- {
- TItsRse *pObj = ItsFacilityManager->FRseLists.Find(FSelId);
- if (pObj) sIp = pObj->RSEIP.Trim();
- }
- else
- if (pMenu->Tag == 4)
- {
- TItsVds *pObj = ItsFacilityManager->FVdsLists.Find(FSelId);
- if (pObj) sIp = pObj->TRMN_IP.Trim();
- }
- else
- if (pMenu->Tag == 5)
- {
- TItsAvi *pObj = ItsFacilityManager->FAviLists.Find(FSelId);
- if (pObj) sIp = pObj->AVI_CTLR_IP.Trim();
- }
- else
- if (pMenu->Tag == 6)
- {
- TItsDsrc *pObj = ItsFacilityManager->FDsrcLists.Find(FSelId);
- if (pObj) sIp = pObj->IP.Trim();
- }
- else
- if (pMenu->Tag == 99)
- {
- TItsWebCam *pObj = ItsFacilityManager->FWebCamLists.Find(FSelId);
- if (pObj) sIp = pObj->CMRA_IP.Trim();
- }
- if (sIp.IsEmpty())
- {
- Application->MessageBox(L"IP Address 정보가 없습니다.\r\nIP Address 정보를 확인하세요.",
- L"네크워크 연결확인", MB_OK|MB_ICONERROR|MB_APPLMODAL);
- return;
- }
- if (sIp != "")
- {
- ITSUtil_NetworkPing(sIp);
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::mnuStopImageClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TPoint pt;
- GetCursorPos(&pt);
- pt = ITS0000M->ScreenToClient(pt);
- ShowCctvStopImage(FSelId, pt);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::mnuCctvCamClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TPoint pt;
- GetCursorPos(&pt);
- pt = ITS0000M->ScreenToClient(pt);
- ShowCctvCamera(FSelId, pt);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::mnuVmsMsgClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TPoint pt;
- GetCursorPos(&pt);
- pt = ITS0000M->ScreenToClient(pt);
- ShowVmsMessage(FSelId, pt);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::mnuVmsCamClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TPoint pt;
- GetCursorPos(&pt);
- pt = ITS0000M->ScreenToClient(pt);
- ShowVmsCamera(FSelId, pt);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowCctvStopImage(String AId, TPoint pt)
- {
- TItsCctv *pObj = ItsFacilityManager->FCctvLists.Find(AId);
- if (!pObj) return;
- try {
- if (pObj->FData1)
- {
- TFrmCctvImg *pForm = (TFrmCctvImg *)pObj->FData1;
- pForm->SetFocus();
- pForm->LoadStopImage();
- }
- else
- {
- TFrmCctvImg *pForm = new TFrmCctvImg(ITS0000M);
- pForm->Parent = ITS0000M;
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pForm->FObj = pObj;
- pObj->FData1 = (void*)pForm;
- pForm->Show();
- }
- } catch(...) {}
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowCctvCamera(String AId, TPoint pt)
- {
- TItsCctv *pObj = ItsFacilityManager->FCctvLists.Find(AId);
- if (!pObj) return;
- try {
- if (pObj->FData2)
- {
- TFrmCctvCam *pForm = (TFrmCctvCam *)pObj->FData2;
- pForm->SetFocus();
- //pForm->RefreshCctv();
- }
- else
- {
- TFrmCctvCam *pForm = new TFrmCctvCam(ITS0000M);
- pForm->Parent = ITS0000M;
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pForm->FObj = pObj;
- pObj->FData2 = (void*)pForm;
- pForm->Show();
- }
- } catch(...) {}
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowVmsMessage(String AId, TPoint pt)
- {
- TItsVms *pObj = ItsFacilityManager->FVmsLists.Find(FSelId);
- if (!pObj) return;
- try {
- if (pObj->FData1)
- {
- TFrmVmsMsg *pForm = (TFrmVmsMsg *)pObj->FData1;
- pForm->SetFocus();
- }
- else
- {
- TFrmVmsMsg *pForm = new TFrmVmsMsg(ITS0000M, pObj);
- pForm->Parent = ITS0000M;
- int nHG = pForm->ClientHeight - pForm->PnlVmsMsgDisp->Height;
- int nWG = pForm->ClientWidth - pForm->PnlVmsMsgDisp->Width;
- #if 0
- pForm->ClientHeight = nHG + pObj->Height;
- pForm->ClientWidth = nWG + pObj->Width;
- #endif
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pObj->FData1 = (void*)pForm;
- pForm->Show();
- }
- } catch(...) {}
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowVmsCamera(String AId, TPoint pt)
- {
- TItsVms *pObj = ItsFacilityManager->FVmsLists.Find(FSelId);
- if (!pObj) return;
- try {
- if (pObj->FData2)
- {
- if (pObj->STRM_SESN_NM.Trim() == "icsview")
- {
- TFrmIcsCam *pForm = (TFrmIcsCam *)pObj->FData2;
- pForm->SetFocus();
- //pForm->RefreshVms();
- }
- else
- {
- TFrmVmsCam *pForm = (TFrmVmsCam *)pObj->FData2;
- pForm->SetFocus();
- //pForm->RefreshVms();
- }
- }
- else
- {
- if (pObj->STRM_SESN_NM.Trim() == "icsview")
- {
- TFrmIcsCam *pForm = new TFrmIcsCam(ITS0000M);
- pForm->Parent = ITS0000M;
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pForm->FObj = pObj;
- pObj->FData2 = (void*)pForm;
- pForm->Show();
- }
- else
- {
- TFrmVmsCam *pForm = new TFrmVmsCam(ITS0000M);
- pForm->Parent = ITS0000M;
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pForm->FObj = pObj;
- pObj->FData2 = (void*)pForm;
- pForm->Show();
- }
- #if 0
- TFrmVmsCam *pForm = new TFrmVmsCam(ITS0000M);
- pForm->Parent = ITS0000M;
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pForm->FObj = pObj;
- pObj->FData2 = (void*)pForm;
- pForm->Show();
- #endif
- }
- } catch(...) {}
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::RefreshGisLink()
- {
- SelectLinkById(g_SelLink.Level, g_SelLink.Id, true);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::MnuWebCamClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TPoint pt;
- GetCursorPos(&pt);
- pt = ITS0000M->ScreenToClient(pt);
- ShowWebCamera(FSelId, pt);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowWebCamera(String AId, TPoint pt)
- {
- TItsWebCam *pObj = ItsFacilityManager->FWebCamLists.Find(FSelId);
- if (!pObj) return;
- try {
- if (pObj->FData2)
- {
- TFrmWebCam *pForm = (TFrmWebCam *)pObj->FData2;
- #if 0
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- #endif
- pForm->SetFocus();
- }
- else
- {
- TFrmWebCam *pForm = new TFrmWebCam(ITS0000M, pObj);
- pForm->Parent = ITS0000M;
- if ((pt.x + pForm->Width + 5) > this->Width)
- {
- pt.x = this->Width - pForm->Width - 5;
- }
- if ((pt.y + pForm->Height + 5) > this->Height)
- {
- pt.y = this->Height - pForm->Height - 5;
- }
- pForm->Left = Left + pt.x;
- pForm->Top = Top + pt.y;
- pObj->FData2 = (void*)pForm;
- pForm->Show();
- }
- } catch(...) {}
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::TmrLblTrafficTimer(TObject *Sender)
- {
- TmrLblTraffic->Enabled = false;
- LblTraffic->Visible = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::FormResize(TObject *Sender)
- {
- ShockwaveFlash1->Align = alClient;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowHideFacility()
- {
- if (!MapStart) return;
- String sFacility;
- String sShowIcon;
- String sShowInfo;
- sFacility = FAC_CCTV;
- sShowIcon = ChkDrawCtv->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_VMS;
- sShowIcon = ChkDrawVms->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_RSE;
- sShowIcon = ChkDrawRse->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_WCAM;
- sShowIcon = ChkWebCam->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_VDS;
- sShowIcon = ChkDrawVds->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_AVI;
- sShowIcon = ChkDrawAvi->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_DSRC;
- sShowIcon = ChkDrawDsrc->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_PARK;
- sShowIcon = ChkDrawPark->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- sFacility = FAC_INCD;
- sShowIcon = ChkDrawIncident->Checked ? "1" : "0";
- sShowInfo = "0";
- TCommFlash::CallFunc(ShockwaveFlash1, "ShowFacility", sFacility + "|" + sShowIcon + "|" + sShowInfo);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShockwaveFlash1FlashCall(TObject *ASender, const WideString request)
- {
- try
- {
- String sTemp;
- String sFunc;
- String sArgs;
- //<invoke name="Debug" returntype="xml"><arguments><string>KKK|LinkMap 1</string></arguments></invoke>
- sTemp = request;
- int nFuncStrIdx = sTemp.Pos("\"");
- int nFuncEndIdx = sTemp.Pos("\" returntype");
- int nArgsStrIdx = sTemp.Pos("string>");
- int nArgsEndIdx = sTemp.Pos("</string");
- sFunc = sTemp.SubString(nFuncStrIdx + 1, nFuncEndIdx - (nFuncStrIdx + 1));
- sArgs = sTemp.SubString(nArgsStrIdx + 7, nArgsEndIdx - (nArgsStrIdx + 7));
- //Memo1->Lines->Add("[" + sFunc + "] [" + sArgs + "]");
- if (sFunc == "OnMapStart")
- {
- MapStart = true;
- LblZoomLevel->Caption = sArgs;
- TCommFlash::CallFunc(ShockwaveFlash1, "MultiSelect", "0");
- String sFacility = "";
- sFacility += FAC_CCTV + "|";
- sFacility += FAC_VMS + "|";
- sFacility += FAC_RSE + "|";
- sFacility += FAC_WCAM + "|";
- sFacility += FAC_VDS + "|";
- sFacility += FAC_AVI + "|";
- sFacility += FAC_DSRC + "|";
- sFacility += FAC_PARK + "|";
- sFacility += FAC_INCD + "|";
- TCommFlash::CallFunc(ShockwaveFlash1, "AddFacilityKind", sFacility);
- ChkTrafficLayerClick(NULL); //소통정보/힌트표출여부
- PbLoadMap->Position = 20;
- PbLoadMap->Properties->Text = "노드정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadNode", "1");
- }
- else
- if (sFunc == "OnZoomChanged")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sZoom = pStringList->Strings[0];
- delete pStringList;
- LblZoomLevel->Caption = sZoom;
- switch(sZoom.ToIntDef(0))
- {
- case 1: m_nMapLevel = 1; break; //LINK
- case 2: m_nMapLevel = 2; break; //IFSC
- case 3: m_nMapLevel = 2; break; //IFSC
- case 4: m_nMapLevel = 2; break; //IFSC
- case 5: m_nMapLevel = 3; break; //ROAD
- default: m_nMapLevel = 3; break; //ROAD
- }
- LblLinkLevel->Caption = String(m_nMapLevel);
- }
- else
- if (sFunc == "OnMousePos")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sMapX = pStringList->Strings[0]; //lat
- String sMapY = pStringList->Strings[1]; //lng
- delete pStringList;
- try {
- SePosX->Value = sMapX.ToDouble();
- SePosY->Value = sMapY.ToDouble();
- } catch(...) {}
- }
- else
- if (sFunc == "OnNodeLoad")
- {
- PbLoadMap->Position = 30;
- PbLoadMap->Properties->Text = "링크정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadLink", "1");
- }
- else
- if (sFunc == "OnLinkLoad")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sResult = pStringList->Strings[0];
- String sLevel = pStringList->Strings[1];
- delete pStringList;
- if (sLevel == "1")
- {
- PbLoadMap->Position = 40;
- PbLoadMap->Properties->Text = "정보제공구간정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadLink", "2");
- }
- else
- if (sLevel == "2")
- {
- PbLoadMap->Position = 50;
- PbLoadMap->Properties->Text = "도로정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadLink", "3");
- }
- else
- if (sLevel == "3")
- {
- PbLoadMap->Position = 60;
- PbLoadMap->Properties->Text = "링크버텍스정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadLinkVertex", "1");
- }
- }
- else
- if (sFunc == "OnLinkVertexLoad")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sResult = pStringList->Strings[0];
- String sLevel = pStringList->Strings[1];
- delete pStringList;
- if (sLevel == "1")
- {
- PbLoadMap->Position = 70;
- PbLoadMap->Properties->Text = "정보제공구간버텍스정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadLinkVertex", "2");
- }
- else
- if (sLevel == "2")
- {
- PbLoadMap->Position = 80;
- PbLoadMap->Properties->Text = "도로버텍스정보 로딩 중...";
- Application->ProcessMessages();
- TCommFlash::CallFunc(ShockwaveFlash1, "LoadLinkVertex", "3");
- }
- else
- if (sLevel == "3")
- {
- PbLoadMap->Position = 90;
- PbLoadMap->Properties->Text = "시설물정보 로딩 중...";
- Application->ProcessMessages();
- UpdateFacilityStatus(); //시설물 추가
- UpdateIncidentStatus(); //돌발추가
- RefreshMapTraffic(); //소통정보 업데이트
- //TCommFlash::CallFunc(ShockwaveFlash1, "RefreshMap", "1");
- PnlProgress->Visible = false;
- }
- }
- else
- if (sFunc == "OnFindLink")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sResult = pStringList->Strings[0]; //Find resule
- String sLinkId = pStringList->Strings[1]; //Link Id
- delete pStringList;
- }
- else
- if (sFunc == "OnSelLink")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sLevl = pStringList->Strings[0]; //링크레벨
- String sId = pStringList->Strings[1]; //링크아이디
- String sZoom = pStringList->Strings[2]; //줌레벨
- String sPosX = pStringList->Strings[3]; //x
- String sPosY = pStringList->Strings[4]; //y
- String sMapX = pStringList->Strings[5]; //lat
- String sMapY = pStringList->Strings[6]; //lng
- delete pStringList;
- try {
- SePosX->Value = sMapX.ToDouble();
- SePosY->Value = sMapY.ToDouble();
- ShowLinkDetailInfo(sId, sLevl.ToIntDef(1));
- } catch(...) {}
- }
- else
- if (sFunc == "OnMousePouup")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sType = pStringList->Strings[0]; //유형
- String sId = pStringList->Strings[1]; //아이디
- String sPosX = pStringList->Strings[2]; //x
- String sPosY = pStringList->Strings[3]; //y
- String sInfo = pStringList->Strings[4]; //정보
- delete pStringList;
- //if (ModeSelect)
- {
- OnMapPopupMenu(sType, sId, sPosX, sPosY, sInfo);
- }
- }
- else
- if (sFunc == "OnFacilityMenu")
- {
- TStringList *pStringList = new TStringList;
- pStringList->CommaText = sArgs;
- String sType = pStringList->Strings[0]; //시설물유형
- String sId = pStringList->Strings[1]; //시설물아이디
- String sPosX = pStringList->Strings[2]; //x
- String sPosY = pStringList->Strings[3]; //y
- delete pStringList;
- //Memo1->Lines->Add(sType + " : " + sId + " " + sPosX + " : " + sPosY);
- FSelId = sId;
- POINT p;
- GetCursorPos(&p);
- if (sType == "CCTV")
- {
- pmuCctv->Popup(p.x, p.y);
- }
- else
- if (sType == "VMS")
- {
- pmuVms->Popup(p.x, p.y);
- }
- else
- if (sType == "RSE")
- {
- pmuRse->Popup(p.x, p.y);
- }
- else
- if (sType == "WCAM")
- {
- pmuWebCam->Popup(p.x, p.y);
- }
- else
- if (sType == "VDS")
- {
- pmuVds->Popup(p.x, p.y);
- }
- else
- if (sType == "AVI")
- {
- pmuAvi->Popup(p.x, p.y);
- }
- else
- if (sType == "DSRC")
- {
- pmuDsrc->Popup(p.x, p.y);
- }
- }
- }
- catch(Exception &exception)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::OnMapPopupMenu(String AType, String AId, String APosX, String APosY, String AInfo)
- {
- FSelId = AId;
- POINT p;
- GetCursorPos(&p);
- if (AType == "CCTV")
- {
- pmuCctv->Popup(p.x, p.y);
- }
- else
- if (AType == "VMS")
- {
- pmuVms->Popup(p.x, p.y);
- }
- else
- if (AType == "RSE")
- {
- pmuRse->Popup(p.x, p.y);
- }
- else
- if (AType == "WCAM")
- {
- pmuWebCam->Popup(p.x, p.y);
- }
- else
- if (AType == "VDS")
- {
- pmuVds->Popup(p.x, p.y);
- }
- else
- if (AType == "AVI")
- {
- pmuAvi->Popup(p.x, p.y);
- }
- else
- if (AType == "DSRC")
- {
- pmuDsrc->Popup(p.x, p.y);
- }
- else
- if (AType == "MAP")
- {
- pmuGis->Popup(p.x, p.y);
- }
- else
- if (AType == "LINK")
- {
- //AInfo == LinkId
- //pmuGis->Popup(p.x, p.y);
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::SelGisItem(int AType, String AId)
- {
- try
- {
- if (!MapStart) return;
- switch(AType)
- {
- case 0: TCommFlash::CallFunc(ShockwaveFlash1, "MoveNode", AId); break;
- case 1: TCommFlash::CallFunc(ShockwaveFlash1, "FindLink", AId); break;
- case 2: TCommFlash::CallFunc(ShockwaveFlash1, "FindLink", AId); break;
- case 3: TCommFlash::CallFunc(ShockwaveFlash1, "FindLink", AId); break;
- default: return;
- }
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::PnlToolBarDblClick(TObject *Sender)
- {
- Memo1->Visible = !Memo1->Visible;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS00MAP::ShowLayerEditForm()
- {
- }
- //---------------------------------------------------------------------------
|