123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646 |
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #include "ITSSkinF.h"
- #include "ITSUtilF.h"
- #include "ITSDbF.h"
- #include "AppGlobalF.h"
- #include "CDSNodeF.h"
- #include "CDSLinkF.h"
- #include "CDSIfscF.h"
- #include "CDSRoadF.h"
- #include "ITSLangTransF.h"
- #include "ITSMapF.h"
- #include "ITS_OPLibF.h"
- #pragma hdrstop
- #include "EVSPH10MF.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma link "cxButtons"
- #pragma link "cxCalc"
- #pragma link "cxCalendar"
- #pragma link "cxClasses"
- #pragma link "cxContainer"
- #pragma link "cxControls"
- #pragma link "cxCustomData"
- #pragma link "cxData"
- #pragma link "cxDataStorage"
- #pragma link "cxDropDownEdit"
- #pragma link "cxEdit"
- #pragma link "cxFilter"
- #pragma link "cxGraphics"
- #pragma link "cxGrid"
- #pragma link "cxGridCustomTableView"
- #pragma link "cxGridCustomView"
- #pragma link "cxGridLevel"
- #pragma link "cxGridTableView"
- #pragma link "cxGroupBox"
- #pragma link "cxLabel"
- #pragma link "cxLookAndFeelPainters"
- #pragma link "cxLookAndFeels"
- #pragma link "cxMaskEdit"
- #pragma link "cxSpinEdit"
- #pragma link "cxSplitter"
- #pragma link "cxStyles"
- #pragma link "cxTextEdit"
- #pragma link "cxTimeEdit"
- #pragma link "cxTrackBar"
- #pragma link "dxSkinBlack"
- #pragma link "dxSkinBlue"
- #pragma link "dxSkinsCore"
- #pragma link "dxSkinscxPCPainter"
- #pragma link "FRAME_OpenMapF"
- #pragma link "dxSkinMcSkin"
- #pragma resource "*.dfm"
- TEVSPH10M *EVSPH10M = NULL;
- //---------------------------------------------------------------------------
- void TEVSPH10M_MapCallback(TObject *ASender, const String AFunc, const String AArgs, const bool AFirst)
- {
- try
- {
- if (!EVSPH10M) return;
- EVSPH10M->OpenMapCallback(ASender, AFunc, AArgs, AFirst);
- }
- catch(Exception &exception)
- {
- }
- }
- //---------------------------------------------------------------------------
- __fastcall TEVSPH10M::TEVSPH10M(TComponent* Owner)
- : TForm(Owner)
- {
- LangTrans->Translate(this, ITSDb_GetConnection());
- ITSSkin_Load(this);
- //CMM_LoadForm(g_sFormsDir, this);
- FTitle = Caption;//"소통정보 이력분석";
- FLinkMngr = new TTrafficValManager();
- FIfscMngr = new TTrafficValManager();
- FRoadMngr = new TTrafficValManager();
- FLinkLevel = 2;
- FLayerIdx = LyrTp_CarPos;
- FRAMEOpenMap1->LayerIdx = FLayerIdx;
- FRAMEOpenMap1->ChkShowNmbr->Visible = false;
- FRAMEOpenMap1->BtnMoveMapToFit->Visible = false;
- FRAMEOpenMap1->MapCallbackFunc = TEVSPH10M_MapCallback;
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::CommClose()
- {
- try
- {
- delete FLinkMngr;
- delete FIfscMngr;
- delete FRoadMngr;
- CMM_SaveForm(g_sFormsDir, this);
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::FormShow(TObject *Sender)
- {
- Refresh();
- FRAMEOpenMap1->OpenMap();
- FormInit();
- TmrShow->Enabled = true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::FormInit()
- {
- ADOQry->Connection = ITSDb_GetConnection();
- ADOSta->Connection = ITSDb_GetConnection();
- m_pGDC = TvList->DataController;
- TDateTime dtNow = Now() - ((double)3 / (double)24);
- DtStDate->Date = dtNow;
- DtEdDate->Date = Now();
- //DtStTime->EditValue = "00:00";
- //dtNow = Now() - ((double)2 / (double)24);
- //DtEdTime->EditValue = dtNow.FormatString("hh") + ":59";
- //DtStTime->Time = StrToDateTime(dtNow.FormatString("hh") + ":00");
- //DtEdTime->Time = StrToDateTime(dtNow.FormatString("hh") + ":59");
- DtStTime->Time = StrToDateTime("00:00");
- DtEdTime->Time = StrToDateTime(Now().FormatString("hh") + ":59");
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::TmrShowTimer(TObject *Sender)
- {
- TmrShow->Enabled = false;
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::InitGisLink()
- {
- if (!FRAMEOpenMap1->MapStart) return;
- return;
- TItsNode* pNode;
- String STRT_NM;
- String END_NM;
- try
- {
- if (FLinkLevel == 1)
- {
- ItsLinkManager->FLists.Lock();
- try
- {
- FOR_STL(TItsLink*, pLink, ItsLinkManager->FLists)
- {
- if (pLink->DEL_YN == "Y") continue;
- if (pLink->IsVertex)
- {
- TTrafficVal* pTraf = new TTrafficVal();
- pTraf->ID = pLink->LINK_ID;
- pTraf->IsUpdate = true;
- pTraf->GRADE_VAL = 0;
- FLinkMngr->FLists.Push(pTraf->ID, pTraf);
- pNode = ItsNodeManager->FLists.Find(pLink->F_NODE_ID);
- if (pNode) STRT_NM = pNode->NODE_NAME; else STRT_NM = " ";
- pNode = ItsNodeManager->FLists.Find(pLink->T_NODE_ID);
- if (pNode) END_NM = pNode->NODE_NAME; else END_NM = " ";
- sJs.printf(L"addEditLink('%s', '%s', '%s', '%s', '%s', '%s')",
- pLink->LINK_ID.c_str(),
- pLink->ROAD_NAME.c_str(),
- STRT_NM.c_str(),
- END_NM.c_str(),
- pLink->X_CRDN_ARR.c_str(),
- pLink->Y_CRDN_ARR.c_str());
- FRAMEOpenMap1->ExecScript(sJs);
- }
- }
- }
- __finally
- {
- ItsLinkManager->FLists.UnLock();
- }
- FRAMEOpenMap1->ExecScript("makeEditLinkLayer()");
- }
- else
- if (FLinkLevel == 2)
- {
- ItsIfscManager->FLists.Lock();
- try
- {
- FOR_STL(TItsIfsc*, pIfsc, ItsIfscManager->FLists)
- {
- if (pIfsc->DEL_YN == "Y") continue;
- if (pIfsc->IsVertex)
- {
- TTrafficVal* pTraf = new TTrafficVal();
- pTraf->ID = pIfsc->IFSC_ID;
- pTraf->IsUpdate = true;
- pTraf->GRADE_VAL = 0;
- FIfscMngr->FLists.Push(pTraf->ID, pTraf);
- sJs.printf(L"addEditLink('%s', '%s', '%s', '%s', '%s', '%s')",
- pIfsc->IFSC_ID.c_str(),
- pIfsc->IFSC_NM.c_str(),
- pIfsc->STRT_NM.c_str(),
- pIfsc->END_NM.c_str(),
- pIfsc->X_CRDN_ARR.c_str(),
- pIfsc->Y_CRDN_ARR.c_str());
- FRAMEOpenMap1->ExecScript(sJs);
- }
- }
- }
- __finally
- {
- ItsIfscManager->FLists.UnLock();
- }
- FRAMEOpenMap1->ExecScript("makeEditLinkLayer()");
- }
- else
- if (FLinkLevel == 3)
- {
- ItsRoadManager->FLists.Lock();
- try
- {
- FOR_STL(TItsRoad*, pRoad, ItsRoadManager->FLists)
- {
- if (pRoad->DEL_YN == "Y") continue;
- if (pRoad->IsVertex)
- {
- TTrafficVal* pTraf = new TTrafficVal();
- pTraf->ID = pRoad->ROAD_ID;
- pTraf->IsUpdate = true;
- pTraf->GRADE_VAL = 0;
- FRoadMngr->FLists.Push(pTraf->ID, pTraf);
- sJs.printf(L"addEditLink('%s', '%s', '%s', '%s', '%s', '%s')",
- pRoad->ROAD_ID.c_str(),
- pRoad->ROAD_NM.c_str(),
- pRoad->STRT_NM.c_str(),
- pRoad->END_NM.c_str(),
- pRoad->X_CRDN_ARR.c_str(),
- pRoad->Y_CRDN_ARR.c_str());
- FRAMEOpenMap1->ExecScript(sJs);
- }
- }
- }
- __finally
- {
- ItsRoadManager->FLists.UnLock();
- }
- FRAMEOpenMap1->ExecScript("makeEditLinkLayer()");
- }
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::BtnSearchClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TSqlCursor sqlCrs((TControl*)BtnSearch);
- #if 0
- FStDateTime = DtStDate->Date.FormatString("yyyymmdd") + DtStTime->Time.FormatString("hh");
- FEdDateTime = DtEdDate->Date.FormatString("yyyymmdd") + DtEdTime->Time.FormatString("hh");
- #else
- FStDateTime = DtStDate->Date.FormatString("yyyymmdd") + DtStTime->Time.FormatString("hhnn");
- FEdDateTime = DtEdDate->Date.FormatString("yyyymmdd") + DtEdTime->Time.FormatString("hhnn");
- #endif
- if (FStDateTime > FEdDateTime)
- {
- Application->MessageBox(FrmLang->lblQryDtErr->Caption.c_str(),//L"검색 시작시각이 검색 종료시각 보다 큽니다.",
- FTitle.c_str(), MB_OK|MB_ICONWARNING|MB_APPLMODAL);
- ActiveControl = DtStDate;
- return;
- }
- #if 0
- if ( StrToInt(DtEdTime->Time.FormatString("hh")) - StrToInt(DtStTime->Time.FormatString("hh")) >= 3)
- {
- Application->MessageBox(lblText2->Caption.c_str(),//L"3시간 이상의 정보를 조회할 수 없습니다.",
- FTitle.c_str(), MB_OK|MB_ICONWARNING|MB_APPLMODAL);
- ActiveControl = DtStDate;
- return;
- }
- #endif
- #if 0
- FStDateTime = FStDateTime + "0000";
- FEdDateTime = FEdDateTime + "5959";
- #else
- FStDateTime = FStDateTime + "00";
- FEdDateTime = FEdDateTime + "59";
- #endif
- FLinkLevel = 2;
- ClearGis();
- SelHistorySummary();
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::BtnCloseClick(TObject *Sender)
- {
- Close();
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::FormClose(TObject *Sender, TCloseAction &Action)
- {
- CommClose();
- EVSPH10M = NULL;
- Action = caFree;
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::DtStDatePropertiesValidate(TObject *Sender, Variant &DisplayValue, TCaption &ErrorText, bool &Error)
- {
- DtEdDate->Date = DtStDate->Date;
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::SelHistorySummary()
- {
- TSqlCursor sqlCrs;
- String sQry;
- TADOQuery *pADO = ADOQry;
- sQry = "SELECT A.SRVC_ID, A.EMRG_VHCL_ID, TO_CHAR(MIN(A.CLCT_DT), 'YYYY-MM-DD HH24:MI:SS') AS CLCT_DT, \r\n"
- " COUNT(1) AS DATA_CNT \r\n"
- " FROM EMRG_VHCL_OPER_HS A \r\n"
- " WHERE A.CLCT_DT BETWEEN TO_DATE(:p01, 'YYYYMMDDHH24MISS') AND TO_DATE(:p02, 'YYYYMMDDHH24MISS') \r\n"
- " GROUP BY A.SRVC_ID, A.EMRG_VHCL_ID \r\n"
- " ORDER BY MIN(A.CLCT_DT) \r\n";
- try
- {
- ITSDb_SQLText(pADO, sQry);
- ITSDb_SQLBind(pADO, "p01", FStDateTime);
- ITSDb_SQLBind(pADO, "p02", FEdDateTime);
- ITSDb_SQLOpen(pADO);
- DspHistorySummary();
- }
- catch(EDatabaseError &E)
- {
- ::PostMessage(Application->MainForm->Handle, (UINT)(WM_USER+0xF4), (WPARAM)0xB2, (LPARAM)0xB2);
- DBERRORMSG(Caption, String(E.ClassName()), E.Message, sQry);
- throw Exception(String(E.ClassName()) + E.Message);
- }
- catch(Exception &exception)
- {
- ::PostMessage(Application->MainForm->Handle, (UINT)(WM_USER+0xF4), (WPARAM)0xB2, (LPARAM)0xB2);
- DBERRORMSG(Caption, String(exception.ClassName()), exception.Message, sQry);
- throw Exception(String(exception.ClassName()) + exception.Message);
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::DspHistorySummary()
- {
- TADOQuery *pADO = ADOQry;
- try
- {
- CMM_ClearGridTableView(TvList);
- int nRow = 0;
- try
- {
- TvList->BeginUpdate();
- m_pGDC->RecordCount = pADO->RecordCount;
- for( ; !pADO->Eof; pADO->Next(), nRow++)
- {
- m_pGDC->Values[nRow][Column01->Index] = nRow+1;
- m_pGDC->Values[nRow][Column02->Index] = ITSUtil_StrToTime(pADO->FieldByName("CLCT_DT")->AsString); //수집시각
- m_pGDC->Values[nRow][Column03->Index] = pADO->FieldByName("DATA_CNT")->AsInteger;
- m_pGDC->Values[nRow][Column04->Index] = pADO->FieldByName("SRVC_ID")->AsString;
- m_pGDC->Values[nRow][Column05->Index] = pADO->FieldByName("EMRG_VHCL_ID")->AsString;
- }
- }
- __finally
- {
- if (pADO)
- {
- pADO->Close();
- }
- TvList->EndUpdate();
- CxList->SetFocus();
- LblRecords->Caption = FormatFloat("##,##0", m_pGDC->RecordCount) + FrmLang->lblEA->Caption;//" 건";
- String sEnd = FrmLang->lblQrySel->Caption + " [" + LblRecords->Caption + "]";//"데이터 " + LblRecords->Caption + " 이 조회 되었습니다.";
- Application->MessageBox(sEnd.c_str(),
- FrmLang->lblQryEnd->Caption.c_str(),//L"데이터 조회 완료",
- MB_OK|MB_ICONINFORMATION|MB_APPLMODAL);
- }
- }
- catch(EDatabaseError &E)
- {
- throw Exception(String(E.ClassName()) + E.Message);
- }
- catch(...)
- {
- throw Exception(FrmLang->lblDbErr->Caption);//"알수없는 오류가 발생하였습니다.");
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::SelHistory(String AServiceId, String AVehicleId)
- {
- TSqlCursor sqlCrs;
- String sQry;
- TADOQuery *pADO = ADOQry;
- sQry = "SELECT A.SRVC_ID, TO_CHAR(A.CLCT_DT, 'YYYY-MM-DD HH24:MI:SS') AS CLCT_DT, A.CLCT_NMBR, \r\n"
- " A.X_CRDN/1000000 AS X_CRDN, A.Y_CRDN/1000000 AS Y_CRDN, A.EMRG_VHCL_ID \r\n"
- " FROM EMRG_VHCL_OPER_HS A \r\n"
- " WHERE A.CLCT_DT BETWEEN TO_DATE(:p01, 'YYYYMMDDHH24MISS') AND TO_DATE(:p02, 'YYYYMMDDHH24MISS') \r\n"
- " AND A.SRVC_ID = :p03 \r\n"
- " AND A.EMRG_VHCL_ID = :p04 \r\n"
- " ORDER BY A.CLCT_NMBR, A.CLCT_DT \r\n";
- try
- {
- ITSDb_SQLText(pADO, sQry);
- ITSDb_SQLBind(pADO, "p01", FStDateTime);
- ITSDb_SQLBind(pADO, "p02", FEdDateTime);
- ITSDb_SQLBind(pADO, "p03", AServiceId);
- ITSDb_SQLBind(pADO, "p04", AVehicleId);
- ITSDb_SQLOpen(pADO);
- DspHistory();
- }
- catch(EDatabaseError &E)
- {
- ::PostMessage(Application->MainForm->Handle, (UINT)(WM_USER+0xF4), (WPARAM)0xB2, (LPARAM)0xB2);
- DBERRORMSG(Caption, String(E.ClassName()), E.Message, sQry);
- throw Exception(String(E.ClassName()) + E.Message);
- }
- catch(Exception &exception)
- {
- ::PostMessage(Application->MainForm->Handle, (UINT)(WM_USER+0xF4), (WPARAM)0xB2, (LPARAM)0xB2);
- DBERRORMSG(Caption, String(exception.ClassName()), exception.Message, sQry);
- throw Exception(String(exception.ClassName()) + exception.Message);
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::DspHistory()
- {
- TADOQuery *pADO = ADOQry;
- bool isMapStart = FRAMEOpenMap1->MapStart;
- if (isMapStart) {
- sJs.printf(L"removeLayerObject(%d)", FLayerIdx);
- FRAMEOpenMap1->ExecScript(sJs);
- }
- String arrObj = "";
- String sTemp;
- try
- {
- CMM_ClearGridTableView(TvHist);
- TcxDataController *pGDC = TvHist->DataController;
- int nRow = 0;
- try
- {
- TvHist->BeginUpdate();
- pGDC->RecordCount = pADO->RecordCount;
- for( ; !pADO->Eof; pADO->Next(), nRow++)
- {
- pGDC->Values[nRow][ColHist01->Index] = nRow+1;
- String CLCT_DT = pADO->FieldByName("CLCT_DT")->AsString;
- String SRVC_ID = pADO->FieldByName("SRVC_ID")->AsString;
- String CLCT_NMBR = pADO->FieldByName("CLCT_NMBR")->AsString;
- float X_CRDN = pADO->FieldByName("X_CRDN")->AsFloat;
- float Y_CRDN = pADO->FieldByName("Y_CRDN")->AsFloat;
- pGDC->Values[nRow][ColHist02->Index] = SRVC_ID;
- pGDC->Values[nRow][ColHist03->Index] = CLCT_DT;
- pGDC->Values[nRow][ColHist04->Index] = CLCT_NMBR;
- pGDC->Values[nRow][ColHist05->Index] = X_CRDN;
- pGDC->Values[nRow][ColHist06->Index] = Y_CRDN;
- if (arrObj != "") arrObj += "|";
- #if 0
- if (nRow == 0) {
- sTemp.printf(L"%s,%s,%s,%.6f,%.6f,3,0,0,0", CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), X_CRDN, Y_CRDN);
- }
- else if (nRow == pGDC->RecordCount-1) {
- sTemp.printf(L"%s,%s,%s,%.6f,%.6f,4,0,0,0", CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), X_CRDN, Y_CRDN);
- }
- else {
- sTemp.printf(L"%s,%s,%s,%.6f,%.6f,1,0,0,0", CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), X_CRDN, Y_CRDN);
- }
- #else
- sTemp.printf(L"%s,%s,%s,%.6f,%.6f,1,0,0,0", CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), CLCT_NMBR.c_str(), X_CRDN, Y_CRDN);
- #endif
- arrObj += sTemp;
- }
- }
- __finally
- {
- if (pADO)
- {
- pADO->Close();
- }
- TvHist->EndUpdate();
- CxHist->SetFocus();
- LblRecords->Caption = FormatFloat("##,##0", pGDC->RecordCount) + FrmLang->lblEA->Caption;//" 건";
- if (isMapStart && arrObj != "")
- {
- sJs.printf(L"addFacility(%d, '%s')", FLayerIdx, arrObj.c_str());
- FRAMEOpenMap1->ExecScript(sJs);
- }
- String sEnd = FrmLang->lblQrySel->Caption + " [" + LblRecords->Caption + "]";//"데이터 " + LblRecords->Caption + " 이 조회 되었습니다.";
- Application->MessageBox(sEnd.c_str(),
- FrmLang->lblQryEnd->Caption.c_str(),//L"데이터 조회 완료",
- MB_OK|MB_ICONINFORMATION|MB_APPLMODAL);
- }
- }
- catch(EDatabaseError &E)
- {
- throw Exception(String(E.ClassName()) + E.Message);
- }
- catch(...)
- {
- throw Exception(FrmLang->lblDbErr->Caption);//"알수없는 오류가 발생하였습니다.");
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::ClearGis()
- {
- cxGroupBox1->Caption = lblText1->Caption;
- CMM_ClearGridTableView(TvHist);
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::TvListCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
- TMouseButton AButton, TShiftState AShift, bool &AHandled)
- {
- int nRow = m_pGDC->FocusedRecordIndex;
- if( nRow <= -1 )
- return;
- FServiceId = VarToStr(m_pGDC->Values[nRow][Column04->Index]);
- FVehicleId = VarToStr(m_pGDC->Values[nRow][Column05->Index]);
- cxGroupBox1->Caption = lblText1->Caption + " - " + FServiceId + " (" + FVehicleId + ")";
- SelHistory(FServiceId, FVehicleId);
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::OpenMapCallback(TObject *ASender, const String AFunc, const String AArgs, const bool AFirst)
- {
- try
- {
- if (AFirst)
- {
- //지도를 편집모드로 변경
- sJs.printf(L"setEditMode(%d, 1)", FLayerIdx);
- FRAMEOpenMap1->ExecScript(sJs);
- //편집레이어 생성
- FRAMEOpenMap1->ExecScript("initEditLayer()");
- FRAMEOpenMap1->ExecScript("setEditArrow(0)");
- FRAMEOpenMap1->ExecScript("setEditColor()");
- //배경링크레이어 생성
- InitGisLink();
- return;
- }
- }
- catch(Exception &exception)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::FormCloseQuery(TObject *Sender, bool &CanClose)
- {
- FRAMEOpenMap1->OnCloseQuery(CanClose);
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::DtStDateChange(TObject *Sender)
- {
- //DtEdDate->Date = DtStDate->Date;
- }
- //---------------------------------------------------------------------------
- void __fastcall TEVSPH10M::TvHistCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
- TMouseButton AButton, TShiftState AShift, bool &AHandled)
- {
- TcxDataController *pGDC = TvHist->DataController;
- int nRow = pGDC->FocusedRecordIndex;
- if( nRow <= -1 )
- return;
- String xCrdn = VarToStr(pGDC->Values[nRow][ColHist05->Index]);
- String yCrdn = VarToStr(pGDC->Values[nRow][ColHist06->Index]);
- FRAMEOpenMap1->SelectObjectByPos(StrToFloat(xCrdn), StrToFloat(yCrdn), true);
- }
- //---------------------------------------------------------------------------
|