VMS0000MF.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include "AppGlobalF.h"
  4. #include "ITSSkinF.h"
  5. #include "ITSUtilF.h"
  6. #include "CommFlashF.h"
  7. #include "CDSVmsIfscF.h"
  8. #include "CDSIfsc_VMSF.h"
  9. #include "FrmVmsOprMainF.h"
  10. #include "ITSLangTransF.h"
  11. #pragma hdrstop
  12. #include "VMS0000MF.h"
  13. //---------------------------------------------------------------------------
  14. #pragma package(smart_init)
  15. #pragma link "cxContainer"
  16. #pragma link "cxControls"
  17. #pragma link "cxEdit"
  18. #pragma link "cxGraphics"
  19. #pragma link "cxGroupBox"
  20. #pragma link "cxLabel"
  21. #pragma link "cxLookAndFeelPainters"
  22. #pragma link "cxLookAndFeels"
  23. #pragma link "cxPC"
  24. #pragma link "cxPCdxBarPopupMenu"
  25. #pragma link "cxSplitter"
  26. #pragma link "dxSkinBlack"
  27. #pragma link "dxSkinBlue"
  28. #pragma link "dxSkinCaramel"
  29. #pragma link "dxSkinCoffee"
  30. #pragma link "dxSkinDarkRoom"
  31. #pragma link "dxSkinDarkSide"
  32. #pragma link "dxSkinFoggy"
  33. #pragma link "dxSkinGlassOceans"
  34. #pragma link "dxSkiniMaginary"
  35. #pragma link "dxSkinLilian"
  36. #pragma link "dxSkinLiquidSky"
  37. #pragma link "dxSkinLondonLiquidSky"
  38. #pragma link "dxSkinMcSkin"
  39. #pragma link "dxSkinMoneyTwins"
  40. #pragma link "dxSkinOffice2007Black"
  41. #pragma link "dxSkinOffice2007Blue"
  42. #pragma link "dxSkinOffice2007Green"
  43. #pragma link "dxSkinOffice2007Pink"
  44. #pragma link "dxSkinOffice2007Silver"
  45. #pragma link "dxSkinOffice2010Black"
  46. #pragma link "dxSkinOffice2010Blue"
  47. #pragma link "dxSkinOffice2010Silver"
  48. #pragma link "dxSkinsCore"
  49. #pragma link "dxSkinscxPCPainter"
  50. #pragma link "dxSkinSeven"
  51. #pragma link "dxSkinSharp"
  52. #pragma link "dxSkinSilver"
  53. #pragma link "dxSkinStardust"
  54. #pragma link "cxClasses"
  55. #pragma link "cxCustomData"
  56. #pragma link "cxData"
  57. #pragma link "cxDataStorage"
  58. #pragma link "cxFilter"
  59. #pragma link "cxGrid"
  60. #pragma link "cxGridCustomTableView"
  61. #pragma link "cxGridCustomView"
  62. #pragma link "cxGridLevel"
  63. #pragma link "cxGridTableView"
  64. #pragma link "cxStyles"
  65. #pragma link "cxTextEdit"
  66. #pragma link "cxGridCardView"
  67. #pragma link "cxGridCustomLayoutView"
  68. #pragma link "cxCheckBox"
  69. #pragma link "FRAME_VmsStateF"
  70. #pragma link "cxCalc"
  71. #pragma link "cxGridBandedTableView"
  72. #pragma link "FRAME_FacilityStatusListF"
  73. #pragma resource "*.dfm"
  74. TVMS0000M *VMS0000M = NULL;
  75. //---------------------------------------------------------------------------
  76. __fastcall TVMS0000M::TVMS0000M(TComponent* Owner)
  77. : TForm(Owner)
  78. {
  79. LangTrans->Translate(this, ITSDb_GetConnection());
  80. ITSSkin_Load(this);
  81. LoadLocalSkin();
  82. //if (FormStyle != fsMDIChild)
  83. CMM_LoadForm(g_sFormsDir, this);
  84. PgVmsMonitoring->Properties->ActivePage = TabVmsString;
  85. //FrmVmsOprMain->dxStatusBar->Panels->Items[isbGisPos]->Visible = true;
  86. VMS00MAP = new TVMS00MAP(PnlMapBack, (TForm*)this);
  87. PnlInfoLeft->Width = VmsManager->FMaxWidth + 12/*폼여백*/ + 34/*기타여백*/;
  88. FListForm = new TList;
  89. FSelVmsObj= NULL;
  90. FSelForm = NULL;
  91. FReady = false;
  92. FMonitoringType = enMonitoringPhase;
  93. }
  94. //---------------------------------------------------------------------------
  95. void __fastcall TVMS0000M::CommClose()
  96. {
  97. try
  98. {
  99. if (FrmVmsOprMain->dxStatusBar->Panels->Items[isbGisPos]->Visible)
  100. FrmVmsOprMain->dxStatusBar->Panels->Items[isbGisPos]->Visible = false;
  101. SAFE_DELETE(VMS00MAP);
  102. ClearFormList();
  103. SAFE_DELETE(FListForm);
  104. //if (FormStyle != fsMDIChild)
  105. CMM_SaveForm(g_sFormsDir, this);
  106. }
  107. catch(...)
  108. {
  109. }
  110. }
  111. //---------------------------------------------------------------------------
  112. void __fastcall TVMS0000M::ClearFormList()
  113. {
  114. try
  115. {
  116. LockWindowUpdate(Handle);
  117. for(int ii = 0; ii < FListForm->Count; ii++)
  118. {
  119. TVMSBACKM *pForm = (TVMSBACKM*)FListForm->Items[ii];
  120. pForm->Hide();
  121. SAFE_DELETE(pForm);
  122. }
  123. FListForm->Clear();
  124. }
  125. __finally
  126. {
  127. LockWindowUpdate(0);
  128. }
  129. }
  130. //---------------------------------------------------------------------------
  131. void __fastcall TVMS0000M::FormCreate(TObject *Sender)
  132. {
  133. if (VMS00MAP)
  134. {
  135. VMS00MAP->Parent = PnlMapBack;
  136. VMS00MAP->Show();
  137. }
  138. CreateVmsMsgForm(VmsManager->FMaxWidth);
  139. FRAMEFacilityStatusList1->UpdateList();
  140. }
  141. //---------------------------------------------------------------------------
  142. void __fastcall TVMS0000M::ChkWidthClick(TObject *Sender)
  143. {
  144. int nStringW(0), nStringH(0), nFigureW(0), nFigureH(0);
  145. int nWidth, nPnlWidth;
  146. if (ChkWidth->Checked)
  147. {
  148. nWidth = VmsManager->FMinWidth;
  149. }
  150. else
  151. {
  152. nWidth = VmsManager->FMaxWidth;
  153. }
  154. nPnlWidth = nWidth;
  155. try
  156. {
  157. LockWindowUpdate(Handle);
  158. for(int ii = 0; ii < FListForm->Count; ii++)
  159. {
  160. TVMSBACKM *pForm = (TVMSBACKM*)FListForm->Items[ii];
  161. pForm->SetFormSize(nWidth);
  162. nPnlWidth = pForm->FViewWidth;
  163. }
  164. }
  165. __finally
  166. {
  167. PnlInfoLeft->Width = nPnlWidth + 12/*폼여백*/ + 14/*기타여백*/;
  168. LockWindowUpdate(0);
  169. }
  170. }
  171. //---------------------------------------------------------------------------
  172. void __fastcall TVMS0000M::CreateVmsMsgForm(int AWidth)
  173. {
  174. FReady = false;
  175. ClearFormList();
  176. TVMSBACKM *pStringForm = NULL;
  177. TVMSBACKM *pFigureForm = NULL;
  178. try
  179. {
  180. LockWindowUpdate(Handle);
  181. TVMSFORM0 *pForm = NULL;
  182. VmsManager->FLists.Lock();
  183. FOR_STL(TVmsCtlr*, pObj, VmsManager->FLists)
  184. {
  185. if (pObj->DEL_YN == "Y") continue;
  186. pForm = NULL;
  187. if (pObj->VMS_USAG_TYPE_CD == "VUTN") //문자식
  188. {
  189. if (!pStringForm)
  190. {
  191. pStringForm = new TVMSBACKM(this, Handle, TabVmsString->Caption.Trim(), 1);
  192. pStringForm->FMonitoringType = FMonitoringType;
  193. pStringForm->Parent = TabVmsString;
  194. pStringForm->Show();
  195. FListForm->Add(pStringForm);
  196. }
  197. if (pStringForm) pStringForm->AddVmsForm(String(pObj->VMS_CTLR_NMBR));
  198. }
  199. else
  200. if (pObj->VMS_USAG_TYPE_CD == "VUTP") //도형식
  201. {
  202. if (!pFigureForm)
  203. {
  204. pFigureForm = new TVMSBACKM(this, Handle, TabVmsFigure->Caption.Trim(), 1);
  205. pFigureForm->FMonitoringType = FMonitoringType;
  206. pFigureForm->Parent = TabVmsFigure;
  207. pFigureForm->Show();
  208. FListForm->Add(pFigureForm);
  209. }
  210. if (pFigureForm) pFigureForm->AddVmsForm(String(pObj->VMS_CTLR_NMBR));
  211. }
  212. }
  213. }
  214. __finally
  215. {
  216. VmsManager->FLists.UnLock();
  217. PnlInfoLeft->Width = AWidth + 12/*폼여백*/ + 34/*기타여백*/;
  218. LockWindowUpdate(0);
  219. ChkWidthClick((TObject*)ChkWidth);
  220. }
  221. FReady = true;
  222. }
  223. //---------------------------------------------------------------------------
  224. void __fastcall TVMS0000M::FormShow(TObject *Sender)
  225. {
  226. Refresh();
  227. Application->ProcessMessages();
  228. TmrShow->Enabled = true;
  229. }
  230. //---------------------------------------------------------------------------
  231. void __fastcall TVMS0000M::FormActivate(TObject *Sender)
  232. {
  233. ActivateForm(true);
  234. }
  235. //---------------------------------------------------------------------------
  236. void __fastcall TVMS0000M::FormDeactivate(TObject *Sender)
  237. {
  238. ActivateForm(false);
  239. }
  240. //---------------------------------------------------------------------------
  241. void __fastcall TVMS0000M::LoadLocalSkin()
  242. {
  243. }
  244. //---------------------------------------------------------------------------
  245. void __fastcall TVMS0000M::TmrShowTimer(TObject *Sender)
  246. {
  247. TmrShow->Enabled = false;
  248. }
  249. //---------------------------------------------------------------------------
  250. void __fastcall TVMS0000M::FormClose(TObject *Sender, TCloseAction &Action)
  251. {
  252. try {
  253. CommClose();
  254. VMS0000M = NULL;
  255. Action = caFree;
  256. } catch(...) {}
  257. }
  258. //---------------------------------------------------------------------------
  259. void __fastcall TVMS0000M::OnMainFormMessage(TMessage &Msg)
  260. {
  261. }
  262. //---------------------------------------------------------------------------
  263. void __fastcall TVMS0000M::OnVmsStateRefreshMessage(TMessage &Msg)
  264. {
  265. FRAMEFacilityStatusList1->RefreshList();
  266. for(int ii = 0; ii < FListForm->Count; ii++)
  267. {
  268. TVMSBACKM *pForm = (TVMSBACKM*)FListForm->Items[ii];
  269. pForm->RefreshVmsStatus();
  270. }
  271. FRAMEVmsState1->SelVmsObj = FSelVmsObj;
  272. if (VMS00MAP) VMS00MAP->UpdateFacilityStatus();
  273. }
  274. //---------------------------------------------------------------------------
  275. void __fastcall TVMS0000M::OnVmsFormRefreshMessage(TMessage &Msg)
  276. {
  277. for(int ii = 0; ii < FListForm->Count; ii++)
  278. {
  279. TVMSBACKM *pForm = (TVMSBACKM*)FListForm->Items[ii];
  280. pForm->RefreshVmsMessage();
  281. }
  282. }
  283. //---------------------------------------------------------------------------
  284. void __fastcall TVMS0000M::OnVmsIncidentRefreshMessage(TMessage &Msg)
  285. {
  286. if (VMS00MAP) VMS00MAP->UpdateIncidentStatus();
  287. }
  288. //---------------------------------------------------------------------------
  289. void __fastcall TVMS0000M::OnVmsSelectMessage(TMessage &Msg)
  290. {
  291. try {
  292. FSelVmsObj = (TVmsCtlr*)Msg.WParam;
  293. FRAMEVmsState1->SelVmsObj = FSelVmsObj;
  294. if (!FSelVmsObj) return;
  295. TVMSFORM0 *pSelForm = (TVMSFORM0*)Msg.LParam;
  296. if (pSelForm == FSelForm) return;
  297. if (FSelForm) FSelForm->SelectForm(false);
  298. FSelForm = pSelForm;
  299. if (FSelForm) FSelForm->SelectForm(true);
  300. //VMS정보제공구간 소통정보 업데이트
  301. LoadVmsIfscInfo(String(FSelVmsObj->VMS_CTLR_NMBR));
  302. } catch(...) {};
  303. }
  304. //---------------------------------------------------------------------------
  305. void __fastcall TVMS0000M::OnVmsSelectDblClickMessage(TMessage &Msg)
  306. {
  307. try {
  308. FSelVmsObj = (TVmsCtlr*)Msg.WParam;
  309. FRAMEVmsState1->SelVmsObj = FSelVmsObj;
  310. if (!FSelVmsObj) return;
  311. TVMSFORM0 *pSelForm = (TVMSFORM0*)Msg.LParam;
  312. if (FSelForm) FSelForm->SelectForm(false);
  313. FSelForm = pSelForm;
  314. if (FSelForm) FSelForm->SelectForm(true);
  315. //VMS정보제공구간 소통정보 업데이트
  316. LoadVmsIfscInfo(String(FSelVmsObj->VMS_CTLR_NMBR));
  317. if (VMS00MAP) VMS00MAP->SelectObjectByPos(FSelVmsObj->X_CRDN, FSelVmsObj->Y_CRDN, true);
  318. } catch(...) {};
  319. }
  320. //---------------------------------------------------------------------------
  321. void __fastcall TVMS0000M::FRAMEFacilityStatusList1TvListCellDblClick(TcxCustomGridTableView *Sender,
  322. TcxGridTableDataCellViewInfo *ACellViewInfo, TMouseButton AButton,
  323. TShiftState AShift, bool &AHandled)
  324. {
  325. if (!ACellViewInfo) return;
  326. try {
  327. TcxDataController *pGDC = FRAMEFacilityStatusList1->TvList->DataController;
  328. int nRow = pGDC->FocusedRecordIndex;
  329. if (nRow < 0) return;
  330. int nMemIdx = pGDC->Values[nRow][FRAMEFacilityStatusList1->Column99->Index];
  331. TVmsCtlr *pObj = (TVmsCtlr*)nMemIdx;
  332. if (!pObj) return;
  333. FSelVmsObj = pObj;
  334. FRAMEVmsState1->SelVmsObj = FSelVmsObj;
  335. LoadVmsIfscInfo(String(FSelVmsObj->VMS_CTLR_NMBR));
  336. if (VMS00MAP) VMS00MAP->SelectObjectByPos(pObj->X_CRDN, pObj->Y_CRDN, true);
  337. } catch(...) {}
  338. }
  339. //---------------------------------------------------------------------------
  340. void __fastcall TVMS0000M::LoadVmsIfscInfo(String AVmsNmbr)
  341. {
  342. CMM_ClearGridTableView(TvList);
  343. CMM_ClearGridTableView(TvIfsc);
  344. TcxDataController *pGDC = TvList->DataController;
  345. TVmsCtlr *pObj = VmsManager->FLists.Find(AVmsNmbr);
  346. if (!pObj) return;
  347. try
  348. {
  349. int nRow;
  350. TvList->BeginUpdate();
  351. pGDC->BeginUpdate();
  352. FOR_STL(TVmsIfscRltn*, pIfscRltn, pObj->FIfscRltn)
  353. {
  354. TVmsIfsc *pVmsIfsc = VmsIfscManager->FLists.Find(pIfscRltn->VMS_IFSC_ID);
  355. if (!pVmsIfsc) continue;
  356. nRow = pGDC->AppendRecord();
  357. String sDsplPrrt = String(pIfscRltn->DSPL_PRRT);
  358. pGDC->Values[nRow][Column01->Index] = sDsplPrrt;
  359. pGDC->Values[nRow][Column02->Index] = String(pIfscRltn->VMS_IFSC_ID);
  360. pGDC->Values[nRow][Column03->Index] = pVmsIfsc->VMS_IFSC_NM;
  361. pGDC->Values[nRow][Column04->Index] = pVmsIfsc->DSPL_STRT_NODE_NM + " -> " + pVmsIfsc->DSPL_END_NODE_NM;
  362. pGDC->Values[nRow][Column05->Index] = ITSUtil_FormatStr(pVmsIfsc->RGST_DT, STR_DATETIME);
  363. String sVmsGrad = pVmsIfsc->CMTR_GRAD_CD;
  364. if (sVmsGrad == "1") sVmsGrad = "원활";
  365. else if (sVmsGrad == "2") sVmsGrad = "지체";
  366. else if (sVmsGrad == "3") sVmsGrad = "정체";
  367. else sVmsGrad = "정보없음";
  368. pGDC->Values[nRow][Column06->Index] = sVmsGrad;
  369. pGDC->Values[nRow][Column07->Index] = String(pVmsIfsc->SPED);
  370. pGDC->Values[nRow][Column08->Index] = String(pVmsIfsc->TRVL_HH);
  371. pGDC->Values[nRow][Column99->Index] = (int)pVmsIfsc;
  372. }
  373. }
  374. __finally
  375. {
  376. pGDC->EndUpdate();
  377. TvList->EndUpdate();
  378. }
  379. }
  380. //---------------------------------------------------------------------------
  381. void __fastcall TVMS0000M::LoadIfscInfo()
  382. {
  383. CMM_ClearGridTableView(TvIfsc);
  384. TcxDataController *pGDC = TvIfsc->DataController;
  385. int nSelIdx = CMM_GetRecordIndex(TvList);
  386. if (nSelIdx < 0) return;
  387. pGDC = TvList->DataController;
  388. int nMemPtr = pGDC->Values[nSelIdx][Column99->Index];
  389. TVmsIfsc *pVmsIfsc = (TVmsIfsc*)nMemPtr;
  390. if (!pVmsIfsc) return;
  391. pGDC = TvIfsc->DataController;
  392. try
  393. {
  394. int nRow;
  395. TvIfsc->BeginUpdate();
  396. pGDC->BeginUpdate();
  397. FOR_STL(TVmsLinkIfsc*, pLinkIfsc, pVmsIfsc->FLists)
  398. {
  399. nRow = pGDC->AppendRecord();
  400. TIfsc *pIfsc = IfscManager->FLists.Find(pLinkIfsc->IFSC_ID);
  401. if (!pIfsc) continue;
  402. pGDC->Values[nRow][cxGridColumn1->Index] = String(pLinkIfsc->ORD);
  403. pGDC->Values[nRow][cxGridColumn2->Index] = pIfsc->IFSC_ID;
  404. pGDC->Values[nRow][cxGridColumn3->Index] = pIfsc->IFSC_NM;
  405. pGDC->Values[nRow][cxGridColumn4->Index] = pIfsc->STRT_NM + " -> " + pIfsc->END_NM;
  406. pGDC->Values[nRow][cxGridColumn5->Index] = ITSUtil_FormatStr(pIfsc->PRCN_DT, STR_DATETIME);
  407. String sGrad = pIfsc->CMTR_GRAD_CD;
  408. if (sGrad == "1") sGrad = "원활";
  409. else if (sGrad == "2") sGrad = "지체";
  410. else if (sGrad == "3") sGrad = "정체";
  411. else sGrad = "정보없음";
  412. pGDC->Values[nRow][cxGridColumn6->Index] = sGrad;
  413. pGDC->Values[nRow][cxGridColumn7->Index] = String(pIfsc->SPED);
  414. pGDC->Values[nRow][cxGridColumn8->Index] = String(pIfsc->TRVL_HH);
  415. pGDC->Values[nRow][cxGridColumn9->Index] = String(pIfsc->SECT_LNGT);
  416. }
  417. }
  418. __finally
  419. {
  420. pGDC->EndUpdate();
  421. TvIfsc->EndUpdate();
  422. }
  423. }
  424. //---------------------------------------------------------------------------
  425. void __fastcall TVMS0000M::TvListFocusedRecordChanged(TcxCustomGridTableView *Sender,
  426. TcxCustomGridRecord *APrevFocusedRecord, TcxCustomGridRecord *AFocusedRecord,
  427. bool ANewItemRecordFocusingChanged)
  428. {
  429. if (!AFocusedRecord) return;
  430. LoadIfscInfo();
  431. }
  432. //---------------------------------------------------------------------------
  433. void __fastcall TVMS0000M::cxGridColumn6CustomDrawCell(TcxCustomGridTableView *Sender,
  434. TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
  435. bool &ADone)
  436. {
  437. try
  438. {
  439. TColor tColor = ACanvas->Brush->Color;
  440. String sGrade = AViewInfo->GridRecord->DisplayTexts[AViewInfo->Item->Index];
  441. if (sGrade.Pos("원활")) tColor = clLime;
  442. else if (sGrade.Pos("지체")) tColor = clYellow;
  443. else if (sGrade.Pos("정체")) tColor = clRed;
  444. else tColor = clGray;
  445. ACanvas->SetBrushColor(tColor);
  446. }
  447. catch(Exception &e)
  448. {
  449. }
  450. }
  451. //---------------------------------------------------------------------------
  452. void __fastcall TVMS0000M::MoveGisFacility(String AType, String AId)
  453. {
  454. }
  455. //---------------------------------------------------------------------------
  456. void __fastcall TVMS0000M::ScrollBoxMouseWheel(TObject *Sender, TShiftState Shift,
  457. int WheelDelta, TPoint &MousePos, bool &Handled)
  458. {
  459. TScrollBox *pScrollBox = (TScrollBox*)Sender;
  460. pScrollBox->VertScrollBar->Position -= WheelDelta;
  461. }
  462. //---------------------------------------------------------------------------
  463. void __fastcall TVMS0000M::ActivateForm(bool AActivate)
  464. {
  465. try
  466. {
  467. int nTabIndex = PgVmsMonitoring->ActivePageIndex;
  468. for(int ii = 0; ii < FListForm->Count; ii++)
  469. {
  470. TVMSBACKM *pForm = (TVMSBACKM*)FListForm->Items[ii];
  471. if (AActivate)
  472. {
  473. if (nTabIndex == ii) pForm->Play = true;
  474. else pForm->Play = false;
  475. }
  476. else
  477. pForm->Play = false;
  478. }
  479. }
  480. catch(Exception &e)
  481. {
  482. }
  483. }
  484. //---------------------------------------------------------------------------
  485. void __fastcall TVMS0000M::PgVmsMonitoringPageChanging(TObject *Sender, TcxTabSheet *NewPage,
  486. bool &AllowChange)
  487. {
  488. if (!FReady) return;
  489. try
  490. {
  491. int nTabIndex = NewPage->TabIndex;
  492. for(int ii = 0; ii < FListForm->Count; ii++)
  493. {
  494. TVMSBACKM *pForm = (TVMSBACKM*)FListForm->Items[ii];
  495. if (nTabIndex == ii) pForm->Play = true;
  496. else pForm->Play = false;
  497. }
  498. }
  499. catch(Exception &e)
  500. {
  501. }
  502. }
  503. //---------------------------------------------------------------------------
  504. void __fastcall TVMS0000M::TvIfscCellDblClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  505. TMouseButton AButton, TShiftState AShift,
  506. bool &AHandled)
  507. {
  508. if (!ACellViewInfo) return;
  509. TcxGridDataController *pDc = TvIfsc->DataController;
  510. int nRow = pDc->FocusedRecordIndex;
  511. if( nRow <= -1 )
  512. return;
  513. String sIfscIf = VarToStr(pDc->Values[nRow][cxGridColumn2->Index]);
  514. if (VMS00MAP) VMS00MAP->SelectLinkById(2, sIfscIf, true);
  515. }
  516. //---------------------------------------------------------------------------