FRAME_VmsStateListF.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include "AppGlobalF.h"
  4. #include "ITSSkinF.h"
  5. #include "ITSUtilF.h"
  6. #include "ITSLangTransF.h"
  7. #pragma hdrstop
  8. #include "FRAME_VmsStateListF.h"
  9. //---------------------------------------------------------------------------
  10. #pragma package(smart_init)
  11. #pragma link "cxButtons"
  12. #pragma link "cxCalc"
  13. #pragma link "cxCheckBox"
  14. #pragma link "cxClasses"
  15. #pragma link "cxContainer"
  16. #pragma link "cxControls"
  17. #pragma link "cxCustomData"
  18. #pragma link "cxData"
  19. #pragma link "cxDataStorage"
  20. #pragma link "cxEdit"
  21. #pragma link "cxFilter"
  22. #pragma link "cxGraphics"
  23. #pragma link "cxGrid"
  24. #pragma link "cxGridCustomTableView"
  25. #pragma link "cxGridCustomView"
  26. #pragma link "cxGridLevel"
  27. #pragma link "cxGridTableView"
  28. #pragma link "cxLookAndFeelPainters"
  29. #pragma link "cxLookAndFeels"
  30. #pragma link "cxStyles"
  31. #pragma link "cxTextEdit"
  32. #pragma link "dxSkinBlack"
  33. #pragma link "dxSkinBlue"
  34. #pragma link "dxSkinCaramel"
  35. #pragma link "dxSkinCoffee"
  36. #pragma link "dxSkinDarkRoom"
  37. #pragma link "dxSkinDarkSide"
  38. #pragma link "dxSkinFoggy"
  39. #pragma link "dxSkinGlassOceans"
  40. #pragma link "dxSkiniMaginary"
  41. #pragma link "dxSkinLilian"
  42. #pragma link "dxSkinLiquidSky"
  43. #pragma link "dxSkinLondonLiquidSky"
  44. #pragma link "dxSkinMcSkin"
  45. #pragma link "dxSkinMoneyTwins"
  46. #pragma link "dxSkinOffice2007Black"
  47. #pragma link "dxSkinOffice2007Blue"
  48. #pragma link "dxSkinOffice2007Green"
  49. #pragma link "dxSkinOffice2007Pink"
  50. #pragma link "dxSkinOffice2007Silver"
  51. #pragma link "dxSkinOffice2010Black"
  52. #pragma link "dxSkinOffice2010Blue"
  53. #pragma link "dxSkinOffice2010Silver"
  54. #pragma link "dxSkinsCore"
  55. #pragma link "dxSkinscxPCPainter"
  56. #pragma link "dxSkinSeven"
  57. #pragma link "dxSkinSharp"
  58. #pragma link "dxSkinSilver"
  59. #pragma link "dxSkinStardust"
  60. #pragma link "cxGridBandedTableView"
  61. #pragma link "cxSpinEdit"
  62. #pragma link "cxLabel"
  63. #pragma resource "*.dfm"
  64. //TFRAMEVmsStateList *FRAMEVmsStateList;
  65. //---------------------------------------------------------------------------
  66. __fastcall TFRAMEVmsStateList::TFRAMEVmsStateList(TComponent* Owner)
  67. : TFrame(Owner)
  68. {
  69. LangTrans->Translate(this, ITSDb_GetConnection());
  70. m_pGDC = TvList->DataController;
  71. //TvList->OptionsView->NoDataToDisplayInfoText = "<VMS 정보가 없습니다>";
  72. FTitle = lblTitle->Caption;
  73. }
  74. //---------------------------------------------------------------------------
  75. void __fastcall TFRAMEVmsStateList::UpdateList()
  76. {
  77. CMM_ClearGridTableView(TvList);
  78. int ii, jj;
  79. int nCols = 0;
  80. TcxDataController *pGDC = TvList->DataController;
  81. try
  82. {
  83. int nRow;
  84. TvList->BeginUpdate();
  85. pGDC->BeginUpdate();
  86. VmsManager->FLists.Lock();
  87. FOR_STL(TVmsCtlr*, pObj, VmsManager->FLists)
  88. {
  89. if (pObj->DEL_YN == "Y") continue;
  90. nRow = pGDC->AppendRecord();
  91. pGDC->Values[nRow][ColumnSel->Index] = false;
  92. pGDC->Values[nRow][Col01->Index] = String(pObj->VMS_CTLR_NMBR);
  93. pGDC->Values[nRow][Col02->Index] = pObj->VMS_CTLR_ID;
  94. pGDC->Values[nRow][Col03->Index] = pObj->VMS_NM;
  95. pGDC->Values[nRow][Col04->Index] = VmsModuleType(pObj);
  96. TVmsSize *pSize = VmsManager->FVmsSize.Find(pObj->VMS_TYPE_CD);
  97. if (pSize) pGDC->Values[nRow][Col05->Index] = pSize->TypeNm+" ";
  98. else pGDC->Values[nRow][Col05->Index] = "--?-- ";
  99. pGDC->Values[nRow][Col06->Index] = VmsOperMode(pObj);
  100. pGDC->Values[nRow][Col33->Index] = pObj->VMS_PHSE_CHNG_CYCL;
  101. pGDC->Values[nRow][Col07->Index] = ITSUtil_FormatStr(pObj->VmsMsg->OFFER_DT, STR_DATETIME);
  102. pGDC->Values[nRow][Col08->Index] = String(pObj->VmsMsg->Total);
  103. pGDC->Values[nRow][Col09->Index] = pObj->VmsMsg->OFFER_YN ? "Y" : "N";
  104. pGDC->Values[nRow][Col10->Index] = VmsComm(pObj); //통신상태
  105. pGDC->Values[nRow][Col11->Index] = VmsModuleState(pObj); //모듈상태
  106. pGDC->Values[nRow][Col12->Index] = VmsModulePower(pObj); //전원상태
  107. pGDC->Values[nRow][Col13->Index] = VmsModuleLuminance(pObj); //휘도
  108. pGDC->Values[nRow][Col14->Index] = VmsModuleDoor(pObj); //도어
  109. pGDC->Values[nRow][Col15->Index] = VmsModuleFan(pObj); //팬
  110. pGDC->Values[nRow][Col16->Index] = VmsModuleHeater(pObj); //히터
  111. pGDC->Values[nRow][Col17->Index] = VmsModuleTemp(pObj); //온도
  112. pGDC->Values[nRow][Col18->Index] = String(pObj->WSTATE.ModuleOperatingTemperature); //모듈정지온도
  113. pGDC->Values[nRow][Col19->Index] = String(pObj->WSTATE.FanOperatingTemperature); //팬동작온도
  114. pGDC->Values[nRow][Col20->Index] = String(pObj->WSTATE.HeaterOperatingTemperature); //히터동작온도
  115. pGDC->Values[nRow][Col21->Index] = String(pObj->WSTATE.ModuleBasicFailureRate); //모듈장애율
  116. pGDC->Values[nRow][Col28->Index] = String(pObj->WSTATE.ScheduledMessageOperatingTime); //계획된 메시지의 동작시간(초)
  117. pGDC->Values[nRow][Col22->Index] = String(pObj->FormCnt[enFormTraffic][1]) + "/" + String(pObj->FormCnt[enFormTraffic][0]);
  118. pGDC->Values[nRow][Col23->Index] = String(pObj->FormCnt[enFormDolbal][1]) + "/" + String(pObj->FormCnt[enFormDolbal][0]);
  119. pGDC->Values[nRow][Col24->Index] = String(pObj->FormCnt[enFormGongsa][1]) + "/" + String(pObj->FormCnt[enFormGongsa][0]);
  120. pGDC->Values[nRow][Col25->Index] = String(pObj->FormCnt[enFormHongbo][1]) + "/" + String(pObj->FormCnt[enFormHongbo][0]);
  121. pGDC->Values[nRow][Col26->Index] = String(pObj->FormCnt[enFormFixed][1]) + "/" + String(pObj->FormCnt[enFormFixed][0]);
  122. pGDC->Values[nRow][Col31->Index] = String(pObj->FormCnt[enFormBase][1]) + "/" + String(pObj->FormCnt[enFormBase][0]);
  123. pGDC->Values[nRow][Col32->Index] = String(pObj->FormCnt[enFormCongest][1]) + "/" + String(pObj->FormCnt[enFormCongest][0]);
  124. //우회로는 화면에 없음
  125. //pGDC->Values[nRow][Col27->Index] = String(pObj->FormCnt[enFormDeture][1]) + "/" + String(pObj->FormCnt[enFormDeture][0]);
  126. int nAutoTot = pObj->FormCnt[0][0] + pObj->FormCnt[1][0] + pObj->FormCnt[2][0] + pObj->FormCnt[3][0] + pObj->FormCnt[4][0] + pObj->FormCnt[7][0];
  127. int nAutoUse = pObj->FormCnt[0][1] + pObj->FormCnt[1][1] + pObj->FormCnt[2][1] + pObj->FormCnt[3][1] + pObj->FormCnt[4][1] + pObj->FormCnt[7][1];
  128. pGDC->Values[nRow][Col27->Index] = String(nAutoUse) + "/" + String(nAutoTot);
  129. pGDC->Values[nRow][Col29->Index] = pObj->PANL_ON_TIME; //전광판 ON
  130. pGDC->Values[nRow][Col30->Index] = pObj->PANL_OFF_TIME; //전광판 OFF
  131. pGDC->Values[nRow][Col99->Index] = (int)pObj;
  132. }
  133. }
  134. __finally
  135. {
  136. VmsManager->FLists.UnLock();
  137. pGDC->EndUpdate();
  138. TvList->EndUpdate();
  139. //RefreshStatus();
  140. }
  141. }
  142. //---------------------------------------------------------------------------
  143. void __fastcall TFRAMEVmsStateList::RefreshStatus()
  144. {
  145. TcxDataController *pGDC = TvList->DataController;
  146. try
  147. {
  148. TvList->BeginUpdate();
  149. pGDC->BeginUpdate();
  150. int nRows = pGDC->RecordCount;
  151. for(int nRow = 0; nRow < nRows; nRow++)
  152. {
  153. int nMemPtr = TvList->DataController->Values[nRow][Col99->Index];
  154. TVmsCtlr *pObj = (TVmsCtlr*)nMemPtr;
  155. if (!pObj) continue;
  156. pGDC->Values[nRow][Col06->Index] = VmsOperMode(pObj);
  157. pGDC->Values[nRow][Col33->Index] = pObj->VMS_PHSE_CHNG_CYCL;
  158. pGDC->Values[nRow][Col07->Index] = ITSUtil_FormatStr(pObj->VmsMsg->OFFER_DT, STR_DATETIME);
  159. pGDC->Values[nRow][Col08->Index] = String(pObj->VmsMsg->Total);
  160. pGDC->Values[nRow][Col09->Index] = pObj->VmsMsg->OFFER_YN ? "Y" : "N";
  161. pGDC->Values[nRow][Col10->Index] = VmsComm(pObj); //통신상태
  162. pGDC->Values[nRow][Col11->Index] = VmsModuleState(pObj); //모듈상태
  163. pGDC->Values[nRow][Col12->Index] = VmsModulePower(pObj); //전원상태
  164. pGDC->Values[nRow][Col13->Index] = VmsModuleLuminance(pObj); //휘도
  165. pGDC->Values[nRow][Col14->Index] = VmsModuleDoor(pObj); //도어
  166. pGDC->Values[nRow][Col15->Index] = VmsModuleFan(pObj); //팬
  167. pGDC->Values[nRow][Col16->Index] = VmsModuleHeater(pObj); //히터
  168. pGDC->Values[nRow][Col17->Index] = VmsModuleTemp(pObj); //온도
  169. pGDC->Values[nRow][Col18->Index] = String(pObj->WSTATE.ModuleOperatingTemperature); //모듈정지온도
  170. pGDC->Values[nRow][Col19->Index] = String(pObj->WSTATE.FanOperatingTemperature); //팬동작온도
  171. pGDC->Values[nRow][Col20->Index] = String(pObj->WSTATE.HeaterOperatingTemperature); //히터동작온도
  172. pGDC->Values[nRow][Col21->Index] = String(pObj->WSTATE.ModuleBasicFailureRate); //모듈장애율
  173. pGDC->Values[nRow][Col28->Index] = String(pObj->WSTATE.ScheduledMessageOperatingTime); //계획된 메시지의 동작시간(초)
  174. pGDC->Values[nRow][Col22->Index] = String(pObj->FormCnt[enFormTraffic][1]) + "/" + String(pObj->FormCnt[enFormTraffic][0]);
  175. pGDC->Values[nRow][Col23->Index] = String(pObj->FormCnt[enFormDolbal][1]) + "/" + String(pObj->FormCnt[enFormDolbal][0]);
  176. pGDC->Values[nRow][Col24->Index] = String(pObj->FormCnt[enFormGongsa][1]) + "/" + String(pObj->FormCnt[enFormGongsa][0]);
  177. pGDC->Values[nRow][Col25->Index] = String(pObj->FormCnt[enFormHongbo][1]) + "/" + String(pObj->FormCnt[enFormHongbo][0]);
  178. pGDC->Values[nRow][Col26->Index] = String(pObj->FormCnt[enFormFixed][1]) + "/" + String(pObj->FormCnt[enFormFixed][0]);
  179. pGDC->Values[nRow][Col31->Index] = String(pObj->FormCnt[enFormBase][1]) + "/" + String(pObj->FormCnt[enFormBase][0]);
  180. pGDC->Values[nRow][Col32->Index] = String(pObj->FormCnt[enFormCongest][1]) + "/" + String(pObj->FormCnt[enFormCongest][0]);
  181. //우회로는 화면에 없음
  182. //pGDC->Values[nRow][Col27->Index] = String(pObj->FormCnt[enFormDeture][1]) + "/" + String(pObj->FormCnt[enFormDeture][0]);
  183. int nAutoTot = pObj->FormCnt[0][0] + pObj->FormCnt[1][0] + pObj->FormCnt[2][0] + pObj->FormCnt[3][0] + pObj->FormCnt[4][0] + pObj->FormCnt[7][0];
  184. int nAutoUse = pObj->FormCnt[0][1] + pObj->FormCnt[1][1] + pObj->FormCnt[2][1] + pObj->FormCnt[3][1] + pObj->FormCnt[4][1] + pObj->FormCnt[7][1];
  185. pGDC->Values[nRow][Col27->Index] = String(nAutoUse) + "/" + String(nAutoTot);
  186. pGDC->Values[nRow][Col29->Index] = pObj->PANL_ON_TIME; //전광판 ON
  187. pGDC->Values[nRow][Col30->Index] = pObj->PANL_OFF_TIME; //전광판 OFF
  188. }
  189. }
  190. __finally
  191. {
  192. pGDC->EndUpdate();
  193. TvList->EndUpdate();
  194. //CxList->LayoutChanged();
  195. }
  196. #if 0
  197. if (ARecordIndex < 0) return;
  198. int nMemPtr = TvList->DataController->Values[ARecordIndex][Col99->Index];
  199. TVmsCtlr *pObj = (TVmsCtlr*)nMemPtr;
  200. if (!pObj) return;
  201. switch(Sender->Tag)
  202. {
  203. case 0: AText = VmsOperMode(pObj); break;
  204. case 1: AText = ITSUtil_FormatStr(pObj->VmsMsg->OFFER_DT, STR_DATETIME); break;
  205. case 2: AText = String(pObj->VmsMsg->Total); break;
  206. case 3: AText = pObj->VmsMsg->OFFER_YN ? "Y" : "N"; break;
  207. }
  208. #endif
  209. }
  210. //---------------------------------------------------------------------------
  211. void __fastcall TFRAMEVmsStateList::BtnAllSelectClick(TObject *Sender)
  212. {
  213. TcxButton *pBtn = (TcxButton*)Sender;
  214. CMM_CheckAllListItem(TvList, ColumnSel->Index, pBtn->Tag);
  215. }
  216. //---------------------------------------------------------------------------
  217. int __fastcall TFRAMEVmsStateList::GetSelIds(String &ALinkIds)
  218. {
  219. ALinkIds = "";
  220. if (TvList->ViewData->RecordCount <= 0) return 0;
  221. int nIndex = m_pGDC->FocusedRecordIndex;
  222. if( nIndex < 0 )
  223. return 0;
  224. String sLinkId = VarToStr(m_pGDC->Values[nIndex][Col01->Index]);
  225. ALinkIds = sLinkId;
  226. return 1;
  227. }
  228. //---------------------------------------------------------------------------
  229. int __fastcall TFRAMEVmsStateList::GetSelIds(TStringList *AStringList)
  230. {
  231. int nSelCnt = 0;
  232. try
  233. {
  234. TvList->BeginUpdate();
  235. int nRowCnt = TvList->ViewData->RecordCount;
  236. for (int ii = 0; ii < nRowCnt; ii++)
  237. {
  238. TcxCustomGridRow* ARow = TvList->ViewData->Rows[ii];
  239. if (((bool)ARow->Values[ColumnSel->Index]))
  240. {
  241. AStringList->Add(ARow->Values[Col01->Index]);
  242. nSelCnt++;
  243. }
  244. }
  245. }
  246. __finally
  247. {
  248. TvList->EndUpdate();
  249. }
  250. return nSelCnt;
  251. }
  252. //---------------------------------------------------------------------------
  253. void __fastcall TFRAMEVmsStateList::TvListDataControllerFilterChanged(TObject *Sender)
  254. {
  255. LblRecords->Caption = "("+FormatFloat("##,##0", m_pGDC->FilteredRecordCount) +"/"+FormatFloat("##,##0", m_pGDC->RecordCount) + ")";
  256. }
  257. //---------------------------------------------------------------------------
  258. void __fastcall TFRAMEVmsStateList::BtnExlSaveClick(TObject *Sender)
  259. {
  260. TcxGrid *pGrid = CxList;
  261. TcxGridTableView *pView = TvList;
  262. String sTitle= FTitle;//"VMS상태정보";
  263. CMM_ExportToExcelFile(sTitle, pGrid, pView, (TForm*)this);
  264. }
  265. //---------------------------------------------------------------------------
  266. void __fastcall TFRAMEVmsStateList::OnCloseQuery(bool &CanClose)
  267. {
  268. }
  269. //---------------------------------------------------------------------------
  270. void __fastcall TFRAMEVmsStateList::Col06CustomDrawCell(TcxCustomGridTableView *Sender,
  271. TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
  272. bool &ADone)
  273. {
  274. try
  275. {
  276. TColor tColor;
  277. String sVmsMode = AViewInfo->GridRecord->DisplayTexts[AViewInfo->Item->Index];
  278. tColor = ACanvas->Brush->Color;
  279. #if 0
  280. if (sVmsMode == "자동") tColor = clLime;
  281. else if (sVmsMode == "고정") tColor = clFuchsia;
  282. else tColor = clYellow;
  283. #else
  284. if (sVmsMode == FrmLang->lblOperA->Caption.Trim()) tColor = clLime;
  285. else if (sVmsMode == FrmLang->lblOperF->Caption.Trim()) tColor = clFuchsia;
  286. else tColor = clYellow;
  287. #endif
  288. ACanvas->SetBrushColor(tColor);
  289. ACanvas->Font->Color = clBlack;
  290. }
  291. catch(Exception &e)
  292. {
  293. }
  294. #if 0
  295. int nRecordIdx = AViewInfo->GridRecord->RecordIndex;
  296. if (nRecordIdx >= 0)
  297. {
  298. int nIdx = AViewInfo->Item->Index;
  299. String sVmsMode = AViewInfo->GridRecord->DisplayTexts[nIdx];
  300. if (sVmsMode == "고정") ACanvas->Canvas->Brush->Color = clLime;
  301. }
  302. #endif
  303. }
  304. //---------------------------------------------------------------------------
  305. void __fastcall TFRAMEVmsStateList::Col07CustomDrawCell(TcxCustomGridTableView *Sender,
  306. TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
  307. bool &ADone)
  308. {
  309. try
  310. {
  311. if (AViewInfo->GridRecord->RecordIndex < 0) return;
  312. String sResult = AViewInfo->GridRecord->DisplayTexts[Col09->Index];
  313. if (sResult == "N")
  314. {
  315. ACanvas->Canvas->Brush->Color = clRed;
  316. }
  317. }
  318. catch(Exception &e)
  319. {
  320. }
  321. }
  322. //---------------------------------------------------------------------------
  323. void __fastcall TFRAMEVmsStateList::Col10CustomDrawCell(TcxCustomGridTableView *Sender,
  324. TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
  325. bool &ADone)
  326. {
  327. try
  328. {
  329. TColor tColor;
  330. String sStatus = AViewInfo->GridRecord->DisplayTexts[AViewInfo->Item->Index];
  331. tColor = ACanvas->Brush->Color;
  332. #if 0
  333. if (sStatus.Pos("-")) tColor = clGray;
  334. else if (sStatus.Pos("장애")) tColor = clRed;
  335. else if (sStatus.Pos("켜짐")) tColor = clYellow;
  336. else if (sStatus.Pos("열림")) tColor = clRed;
  337. else if (sStatus.Pos("동작")) tColor = clYellow;
  338. else if (sStatus.Pos("가동")) tColor = clYellow;
  339. else tColor = clLime;
  340. #else
  341. if (sStatus.Pos("-")) tColor = clGray;
  342. else if (sStatus.Pos(FrmLang->lblState1->Caption.Trim())) tColor = clRed;
  343. else if (sStatus.Pos(FrmLang->lblPOWER0->Caption.Trim())) tColor = clYellow;
  344. else if (sStatus.Pos(FrmLang->lblCDS1->Caption.Trim())) tColor = clRed;
  345. else if (sStatus.Pos(FrmLang->lblFAN0->Caption.Trim())) tColor = clYellow;
  346. //else if (sStatus.Pos(frmLang->lblHEAT0->Caption.Trim())) tColor = clYellow;
  347. else tColor = clLime;
  348. #endif
  349. ACanvas->SetBrushColor(tColor);
  350. ACanvas->Font->Color = clBlack;
  351. /*if (AViewInfo->GridRecord->Selected)
  352. {
  353. ACanvas->Font->Color = clBlack;
  354. }*/
  355. }
  356. catch(Exception &e)
  357. {
  358. }
  359. }
  360. //---------------------------------------------------------------------------
  361. void __fastcall TFRAMEVmsStateList::Col12CustomDrawCell(TcxCustomGridTableView *Sender,
  362. TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
  363. bool &ADone)
  364. {
  365. try
  366. {
  367. TColor tColor;
  368. String sStatus = AViewInfo->GridRecord->DisplayTexts[AViewInfo->Item->Index];
  369. tColor = ACanvas->Brush->Color;
  370. #if 0
  371. if (sStatus.Pos("-")) tColor = clGray;
  372. else if (sStatus.Pos("장애")) tColor = clRed;
  373. else if (sStatus.Pos("켜짐")) tColor = clYellow;
  374. else if (sStatus.Pos("열림")) tColor = clRed;
  375. else if (sStatus.Pos("동작")) tColor = clYellow;
  376. else if (sStatus.Pos("가동")) tColor = clYellow;
  377. else tColor = clLime;
  378. #else
  379. if (sStatus.Pos("-")) tColor = clGray;
  380. else if (sStatus.Pos(FrmLang->lblState1->Caption.Trim())) tColor = clRed;
  381. else if (sStatus.Pos(FrmLang->lblPOWER1->Caption.Trim())) tColor = clRed;
  382. else tColor = clLime;
  383. #if 0
  384. if (sStatus.Pos("-")) tColor = clGray;
  385. else if (sStatus.Pos("Error")) tColor = clRed;
  386. else if (sStatus.Pos("Off")) tColor = clRed;
  387. else tColor = clLime;
  388. #endif
  389. #endif
  390. ACanvas->SetBrushColor(tColor);
  391. ACanvas->Font->Color = clBlack;
  392. /*if (AViewInfo->GridRecord->Selected)
  393. {
  394. ACanvas->Font->Color = clBlack;
  395. }*/
  396. }
  397. catch(Exception &e)
  398. {
  399. }
  400. }
  401. //---------------------------------------------------------------------------