PIS0030MF.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #include <winsock2.h>
  4. #include "ITSSkinF.h"
  5. #include "ITSUtilF.h"
  6. #include "AppGlobalF.h"
  7. #include "CenterCommF.h"
  8. #include "CDSFacilityF.h"
  9. #include "ITSLangTransF.h"
  10. #include "ITS_OPLibF.h"
  11. #pragma hdrstop
  12. #include "PIS0030MF.h"
  13. //---------------------------------------------------------------------------
  14. #pragma package(smart_init)
  15. #pragma link "cxButtons"
  16. #pragma link "cxClasses"
  17. #pragma link "cxContainer"
  18. #pragma link "cxControls"
  19. #pragma link "cxCustomData"
  20. #pragma link "cxData"
  21. #pragma link "cxDataStorage"
  22. #pragma link "cxEdit"
  23. #pragma link "cxFilter"
  24. #pragma link "cxGraphics"
  25. #pragma link "cxGrid"
  26. #pragma link "cxGridCustomTableView"
  27. #pragma link "cxGridCustomView"
  28. #pragma link "cxGridLevel"
  29. #pragma link "cxGridTableView"
  30. #pragma link "cxGroupBox"
  31. #pragma link "cxLabel"
  32. #pragma link "cxLookAndFeelPainters"
  33. #pragma link "cxLookAndFeels"
  34. #pragma link "cxStyles"
  35. #pragma link "dxSkinBlack"
  36. #pragma link "dxSkinBlue"
  37. #pragma link "dxSkinsCore"
  38. #pragma link "dxSkinscxPCPainter"
  39. #pragma link "dxSkinMcSkin"
  40. #pragma resource "*.dfm"
  41. TPIS0030M *PIS0030M = NULL;
  42. //---------------------------------------------------------------------------
  43. __fastcall TPIS0030M::TPIS0030M(TComponent* Owner)
  44. : TForm(Owner)
  45. {
  46. LangTrans->Translate(this, ITSDb_GetConnection());
  47. ITSSkin_Load(this);
  48. CMM_LoadForm(g_sFormsDir, this);
  49. FTitle = "주차장 제어";
  50. FReqSeq = 0;
  51. }
  52. //---------------------------------------------------------------------------
  53. void __fastcall TPIS0030M::CommClose()
  54. {
  55. try
  56. {
  57. CMM_SaveForm(g_sFormsDir, this);
  58. }
  59. catch(...)
  60. {
  61. }
  62. }
  63. //---------------------------------------------------------------------------
  64. void __fastcall TPIS0030M::FormShow(TObject *Sender)
  65. {
  66. Refresh();
  67. FormInit();
  68. TmrShow->Enabled = true;
  69. }
  70. //---------------------------------------------------------------------------
  71. void __fastcall TPIS0030M::FormInit()
  72. {
  73. LoadParkServerInfo();
  74. RefreshData();
  75. }
  76. //---------------------------------------------------------------------------
  77. void __fastcall TPIS0030M::TmrShowTimer(TObject *Sender)
  78. {
  79. TmrShow->Enabled = false;
  80. }
  81. //---------------------------------------------------------------------------
  82. void __fastcall TPIS0030M::BtnCloseClick(TObject *Sender)
  83. {
  84. Close();
  85. }
  86. //---------------------------------------------------------------------------
  87. void __fastcall TPIS0030M::FormClose(TObject *Sender, TCloseAction &Action)
  88. {
  89. CommClose();
  90. PIS0030M = NULL;
  91. Action = caFree;
  92. }
  93. //---------------------------------------------------------------------------
  94. void __fastcall TPIS0030M::BtnControlClick(TObject *Sender)
  95. {
  96. #ifdef USE_PARKxx
  97. if (CTLR_MNGM_NMBR->Text == "")
  98. {
  99. Application->MessageBox(L"주차장을 선택하지 않았습니다.", FTitle.c_str(), MB_OK|MB_ICONWARNING|MB_APPLMODAL);
  100. CxList->SetFocus();
  101. return;
  102. }
  103. if (COMM_STATE->Text != "정상")
  104. {
  105. Application->MessageBox(L"통신상태가 정상이 아닌 주차장으로는 주차면수 초기화명령을 전송할 수 없습니다.", FTitle.c_str(), MB_OK|MB_ICONWARNING|MB_APPLMODAL);
  106. return;
  107. }
  108. if (Application->MessageBox(L"주차장 주차면수 초기화 명령 확인\r\n선택한 주차장에 대하여 주차면수 초기화 명령을 전송하시겠습니까??",
  109. FTitle.c_str(), MB_YESNO|MB_ICONQUESTION|MB_APPLMODAL) != IDYES) return;
  110. AnsiString sIpAddress = FIpAddress;
  111. int nPort = FPort;
  112. AnsiString sId;
  113. P_INIT_PARKING *pInfo;
  114. P_REQ_INIT_PARKING data;
  115. memset((char*) & data, 0x00, sizeof(P_REQ_INIT_PARKING));
  116. int ADataLen;
  117. data.Count = 1;
  118. pInfo = &data.Info[0];
  119. sId = CTLR_MNGM_NMBR->Text;
  120. sprintf(pInfo->Id, "%.*s", P_PARKING_ID_SIZE, sId.c_str()); // Id
  121. //pInfo->Total = (DWORD)StrToIntDef(Edit1->Text.Trim(), 0); // 총 주차여유 면수 주차장 전체 여유 면수 4 N
  122. pInfo->General = (DWORD)StrToIntDef(Edit2->Text.Trim(), 0); // 일반 주차여유 면수 일반 차량 주차 여유 면수 4 N
  123. pInfo->Disabled = (DWORD)StrToIntDef(Edit3->Text.Trim(), 0); // 장애인 주차여유 면수 장애인 차량 주차 여유 면수 4 N
  124. pInfo->Small = (DWORD)StrToIntDef(Edit4->Text.Trim(), 0); // 경차 주차여유 면수 경차 주차 여유 면수 4 N
  125. pInfo->Woman = (DWORD)StrToIntDef(Edit5->Text.Trim(), 0); // 여성전용 주차여유 면수 여성전용 주차여유 면수 4 N
  126. pInfo->Electric = (DWORD)StrToIntDef(Edit6->Text.Trim(), 0); // 전기차 주차여유 면수 전기차 전용 주차여유 면수 4 N
  127. pInfo->Total = pInfo->General +
  128. pInfo->Disabled +
  129. pInfo->Small +
  130. pInfo->Woman +
  131. pInfo->Electric;
  132. #if 0
  133. pInfo->Total = 200; // 총 주차여유 면수 주차장 전체 여유 면수 4 N
  134. pInfo->General = 0; // 일반 주차여유 면수 일반 차량 주차 여유 면수 4 N
  135. pInfo->Disabled = 14; // 장애인 주차여유 면수 장애인 차량 주차 여유 면수 4 N
  136. pInfo->Small = 10; // 경차 주차여유 면수 경차 주차 여유 면수 4 N
  137. pInfo->Woman = 22; // 여성전용 주차여유 면수 여성전용 주차여유 면수 4 N
  138. pInfo->Electric = 12; // 전기차 주차여유 면수 전기차 전용 주차여유 면수 4 N
  139. #endif
  140. ADataLen = 1 + (data.Count*sizeof(P_INIT_PARKING));
  141. P_INT_PACKET PKT;
  142. memset((char*) & PKT, 0x00, sizeof(P_INT_HEADER_SIZE));
  143. PKT.head.SendId = P_INT_ID_MAIN_OPER; /* 송신 시스템 ID */
  144. PKT.head.RecvId = P_INT_ID_PARK_SERVER; /* 수신 시스템 ID */
  145. PKT.head.TotalFrame = 1; /* 전체 프레임 갯수 */
  146. PKT.head.CurrentFrame = 1; /* 현재 프레임 번호 */
  147. PKT.head.Reserved = 0x00; /* Reserved */
  148. PKT.head.OPCode = INT_OP_PROC_EVENT; // INT_OP_COMM_COMMON; /* 명령어 */
  149. PKT.head.Length = htonl(ADataLen + 2); /* 데이터의 길이 */
  150. PKT.data.Data[0] = INT_OP_PARKING_INIT;
  151. PKT.data.Data[1] = 0X00;
  152. #if 0
  153. memcpy(&PKT.data.Data[2], (char*) & data, ADataLen);
  154. int result = CenterSendMessageB(sIpAddress, nPort, (char*) & PKT, P_INT_HEADER_SIZE + ADataLen + 2);
  155. Application->MessageBox(L"주차면수 초기화 제어명령을 전송 하였습니다.", FTitle.c_str(), MB_OK | MB_ICONINFORMATION | MB_APPLMODAL);
  156. #endif
  157. #endif
  158. }
  159. //---------------------------------------------------------------------------
  160. void __fastcall TPIS0030M::OnMainFormMessage(TMessage &Msg)
  161. {
  162. #if 0
  163. IPCUDPMESSAGESTRUCT *pMsg; // 메시지 구조체
  164. IPCUDPDATASTRUCT *pPkt; // 내부 통신 패킷 구조체
  165. UNION_INT_DATA *pData; // 내부 통신 데이터부 구조체
  166. pMsg = (IPCUDPMESSAGESTRUCT*)Msg.LParam;
  167. pPkt = &pMsg->Frame;
  168. pData = &pPkt->Data.unData;
  169. switch(Msg.WParam)
  170. {
  171. case INT_OP_RSE_CONTROL_RES: /* 0xC1, RSE 제어정보 응답 */
  172. {
  173. INT_RSE_CONTROL_RES *pRseCtl;
  174. pRseCtl = (INT_RSE_CONTROL_RES*)pData;
  175. String sResId = String(pRseCtl->Head.RseId);
  176. String sResSeq = String(pRseCtl->Head.Seq);
  177. int nResult = pRseCtl->Data.ResType;
  178. try {
  179. TvResult->BeginUpdate();
  180. int nRowCnt = TvResult->ViewData->RecordCount;
  181. for (int ii = 0; ii < nRowCnt; ii++)
  182. {
  183. TcxCustomGridRow* ARow = FRAMEDsrcList1->TvList->ViewData->Rows[ii];
  184. if (((bool)ARow->Values[FRAMEDsrcList1->ColumnSel->Index]))
  185. {
  186. String sId = VarToStr(ARow->Values[ColResult1->Index]);
  187. String sSeq = VarToStr(ARow->Values[ColResult2->Index]);
  188. if (sResId == sId && sResSeq == sSeq) {
  189. String sResult = "Unknown";
  190. if (nResult == (int)INT_RSE_RESPONSE_SUCC)
  191. sResult = "성공";
  192. else if (nResult == (int)INT_RSE_RESPONSE_NACK)
  193. sResult = "실패";
  194. else if (nResult == (int)INT_RSE_RESPONSE_NONE)
  195. sResult = "응답없음";
  196. ARow->Values[ColResult4->Index] = sResult;
  197. break;
  198. }
  199. }
  200. }
  201. }
  202. __finally
  203. {
  204. TvResult->EndUpdate();
  205. }
  206. }
  207. break;
  208. default:
  209. break;
  210. } /* end switch */
  211. #endif
  212. }
  213. //---------------------------------------------------------------------------
  214. void __fastcall TPIS0030M::LoadParkServerInfo()
  215. {
  216. FIpAddress = "192.168.0.3";
  217. FPort = 4701;
  218. String sSvrID = "PARK01";
  219. String sIniFile = ChangeFileExt(ExtractFileName(Application->ExeName), ".ini");
  220. ReadConfigInfo(sIniFile, "APPLICATION", "PARKINGSERVERID", sSvrID);
  221. if (sSvrID == "")
  222. {
  223. sSvrID = "PARK01";
  224. }
  225. // 검색조건에 의한 링크 데이터 조회
  226. String sQry;
  227. TADOQuery *pADO = NULL;
  228. sQry = "SELECT A.* \r\n"
  229. " FROM TB_UNIT_SYST A \r\n"
  230. " WHERE A.SYST_ID = '" + sSvrID + "' \r\n";
  231. try
  232. {
  233. try
  234. {
  235. pADO = new TADOQuery(NULL);
  236. pADO->Close();
  237. pADO->Connection = ITSDb_GetConnection();
  238. pADO->SQL->Clear();
  239. pADO->SQL->Text = sQry;
  240. pADO->Open();
  241. for( ; !pADO->Eof; pADO->Next())
  242. {
  243. FIpAddress = pADO->FieldByName("SYST_IP_1")->AsString;
  244. FPort = pADO->FieldByName("PRGM_PORT")->AsString.ToIntDef(4701);
  245. }
  246. }
  247. catch(EDatabaseError &E)
  248. {
  249. throw Exception(String(E.ClassName()) + E.Message);
  250. }
  251. catch(Exception &exception)
  252. {
  253. throw Exception(String(exception.ClassName()) + exception.Message);
  254. }
  255. catch(...)
  256. {
  257. throw Exception(FrmLang->lblDbErr->Caption);//"[주차서버정보조회] 알수없는 DB 오류가 발생하였습니다.");
  258. }
  259. }
  260. __finally
  261. {
  262. if (pADO)
  263. {
  264. pADO->Close();
  265. delete pADO;
  266. }
  267. }
  268. }
  269. //---------------------------------------------------------------------------
  270. void __fastcall TPIS0030M::RefreshData()
  271. {
  272. // 검색조건에 의한 링크 데이터 조회
  273. String sQry;
  274. TADOQuery *pADO = NULL;
  275. ClearForm();
  276. sQry = "SELECT A.PRLT_CTLR_ID, A.PRLT_NM, B.* \r\n"
  277. " FROM TB_PRLT_CTLR A, \r\n"
  278. " TB_PRLT_RT_INFR B \r\n"
  279. " WHERE A.REAL_DATA_YN = 'Y' \r\n"
  280. " AND A.PRLT_CTLR_NMBR = B.PRLT_CTLR_NMBR \r\n"
  281. " ORDER BY A.PRLT_CTLR_NMBR, B.FLOR_NMBR \r\n";
  282. CMM_ClearGridTableView(TvList);
  283. try
  284. {
  285. int nRow;
  286. TvList->BeginUpdate();
  287. try
  288. {
  289. int nORD;
  290. pADO = new TADOQuery(NULL);
  291. pADO->Close();
  292. pADO->Connection = ITSDb_GetConnection();
  293. pADO->SQL->Clear();
  294. pADO->SQL->Text = sQry;
  295. pADO->Open();
  296. for( ; !pADO->Eof; pADO->Next())
  297. {
  298. //실시간주차정보제공 하는 주차장만 제어가능
  299. String REAL_DATA_YN = pADO->FieldByName("REAL_DATA_YN")->AsString;
  300. if (REAL_DATA_YN != "Y") continue;
  301. nRow = TvList->DataController->AppendRecord();
  302. String PRLT_CTLR_ID = pADO->FieldByName("PRLT_CTLR_ID")->AsString;
  303. TvList->DataController->Values[nRow][Col11->Index] = PRLT_CTLR_ID;
  304. TvList->DataController->Values[nRow][Col12->Index] = pADO->FieldByName("PRLT_NM")->AsString;
  305. TvList->DataController->Values[nRow][Col00->Index] = pADO->FieldByName("FLOR_NMBR")->AsString;
  306. //TvList->DataController->Values[nRow][Col01->Index] = pADO->FieldByName("FLORNM")->AsString;
  307. //TvList->DataController->Values[nRow][Col02->Index] = pADO->FieldByName("UPDT_DT")->AsString;
  308. TvList->DataController->Values[nRow][Col02->Index] = ITSUtil_StrToDateTime(pADO->FieldByName("UPDT_DT")->AsString).FormatString(STR_DATETIME);
  309. TvList->DataController->Values[nRow][Col03->Index] = pADO->FieldByName("GNRL_RMND_PRZN_NUM")->AsString;
  310. TvList->DataController->Values[nRow][Col04->Index] = pADO->FieldByName("LGVH_RMND_PRZN_NUM")->AsString;
  311. TvList->DataController->Values[nRow][Col05->Index] = pADO->FieldByName("HVVH_RMND_PRZN_NUM")->AsString;
  312. TvList->DataController->Values[nRow][Col06->Index] = pADO->FieldByName("EMVH_RMND_PRZN_NUM")->AsString;
  313. TvList->DataController->Values[nRow][Col07->Index] = pADO->FieldByName("HNDC_RMND_PRZN_NUM")->AsString;
  314. TvList->DataController->Values[nRow][Col08->Index] = pADO->FieldByName("WMON_RMND_PRZN_NUM")->AsString;
  315. TvList->DataController->Values[nRow][Col09->Index] = pADO->FieldByName("ELVH_RMND_PRZN_NUM")->AsString;
  316. TvList->DataController->Values[nRow][Col10->Index] = pADO->FieldByName("ETC_RMND_PRZN_NUM")->AsString;
  317. TItsFacility *pObj = ItsFacilityManager->FLists.Find(PRLT_CTLR_ID);
  318. if (pObj)
  319. {
  320. if (pObj->FComm == str_state_error)
  321. TvList->DataController->Values[nRow][Col13->Index] = "장애";
  322. else
  323. TvList->DataController->Values[nRow][Col13->Index] = "정상";
  324. }
  325. else
  326. {
  327. TvList->DataController->Values[nRow][Col10->Index] = FrmLang->lblUnknown->Caption;//"알수없음";
  328. }
  329. }
  330. }
  331. catch(EDatabaseError &E)
  332. {
  333. throw Exception(String(E.ClassName()) + E.Message);
  334. }
  335. catch(Exception &exception)
  336. {
  337. throw Exception(String(exception.ClassName()) + exception.Message);
  338. }
  339. catch(...)
  340. {
  341. throw Exception(FrmLang->lblDbErr->Caption);//"[주차현황조회] 알수없는 DB 오류가 발생하였습니다.");
  342. }
  343. }
  344. __finally
  345. {
  346. if (pADO)
  347. {
  348. pADO->Close();
  349. delete pADO;
  350. }
  351. TvList->EndUpdate();
  352. //cxGroupBox3->Caption = "▶ 주차정보";// (최종가공시각: " + FRAMETrafficLinkList1->FLastAnsTime + ")";
  353. }
  354. }
  355. //---------------------------------------------------------------------------
  356. void __fastcall TPIS0030M::Edit1KeyPress(TObject *Sender, wchar_t &Key)
  357. {
  358. if (Key > '9' || Key < '0')
  359. {
  360. if (Key != VK_BACK && Key != VK_TAB && Key != VK_DELETE)
  361. Key = 0;
  362. }
  363. }
  364. //---------------------------------------------------------------------------
  365. void __fastcall TPIS0030M::BtnSearchClick(TObject *Sender)
  366. {
  367. Application->ProcessMessages();
  368. TSqlCursor sqlCrs((TControl*)BtnSearch);
  369. RefreshData();
  370. }
  371. //---------------------------------------------------------------------------
  372. void __fastcall TPIS0030M::Col13CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
  373. TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone)
  374. {
  375. if (AViewInfo->Value == "정상")
  376. {
  377. ACanvas->Canvas->Brush->Color = clWhite;
  378. ACanvas->Canvas->Font->Color = clBlack;
  379. }
  380. else
  381. {
  382. ACanvas->Canvas->Brush->Color = clRed;
  383. ACanvas->Canvas->Font->Color = clWhite;
  384. }
  385. }
  386. //---------------------------------------------------------------------------
  387. void __fastcall TPIS0030M::TvListCellClick(TcxCustomGridTableView *Sender, TcxGridTableDataCellViewInfo *ACellViewInfo,
  388. TMouseButton AButton, TShiftState AShift,
  389. bool &AHandled)
  390. {
  391. DisplayInfo();
  392. }
  393. //---------------------------------------------------------------------------
  394. void __fastcall TPIS0030M::TvListFocusedRecordChanged(TcxCustomGridTableView *Sender,
  395. TcxCustomGridRecord *APrevFocusedRecord, TcxCustomGridRecord *AFocusedRecord,
  396. bool ANewItemRecordFocusingChanged)
  397. {
  398. DisplayInfo();
  399. }
  400. //---------------------------------------------------------------------------
  401. void __fastcall TPIS0030M::DisplayInfo()
  402. {
  403. ClearForm();
  404. if (TvList->ViewData->RecordCount <= 0) return;
  405. int nIndex = TvList->DataController->FocusedRecordIndex;
  406. if (nIndex < 0) return;
  407. CTLR_MNGM_NMBR->Text = VarToStr(TvList->DataController->Values[nIndex][Col11->Index]);
  408. CTLR_MNGM_NM->Text = VarToStr(TvList->DataController->Values[nIndex][Col12->Index]);
  409. COMM_STATE->Text = VarToStr(TvList->DataController->Values[nIndex][Col10->Index]);
  410. #if 0
  411. int GNRL_RMND_PRZN_NUM = pObj->GENERAL; // N NUMBER(3) Y 0 일반 잔여 주차구역 개수
  412. int LGVH_RMND_PRZN_NUM = pObj->SMALL; // N NUMBER(3) Y 0 경차 잔여 주차구역 개수
  413. int HVVH_RMND_PRZN_NUM = 0; // N NUMBER(3) Y 0 대형 잔여 주차구역 개수
  414. int EMVH_RMND_PRZN_NUM = 0; // N NUMBER(3) Y 0 긴급차량 잔여 주차구역 개수
  415. int HNDC_RMND_PRZN_NUM = pObj->DISABLED; // N NUMBER(3) Y 0 장애인 잔여 주차구역 개수
  416. int WMON_RMND_PRZN_NUM = pObj->WOMAN; // N NUMBER(3) Y 0 여성전용 잔여 주차구역 개수
  417. int ETC_RMND_PRZN_NUM = pObj->ELECTRIC; // N NUMBER(3) Y 0 기타 잔여 주차구역 개수
  418. #endif
  419. Edit1->Text = "0";//VarToStr(TvList->DataController->Values[nIndex][Col09->Index]);
  420. Edit2->Text = VarToStr(TvList->DataController->Values[nIndex][Col03->Index]);
  421. Edit3->Text = VarToStr(TvList->DataController->Values[nIndex][Col07->Index]);
  422. Edit4->Text = VarToStr(TvList->DataController->Values[nIndex][Col04->Index]);
  423. Edit5->Text = VarToStr(TvList->DataController->Values[nIndex][Col08->Index]);
  424. Edit6->Text = VarToStr(TvList->DataController->Values[nIndex][Col09->Index]);
  425. if (COMM_STATE->Text == "정상")
  426. BtnControl->Enabled = true;
  427. else
  428. BtnControl->Enabled = false;
  429. }
  430. //---------------------------------------------------------------------------
  431. void __fastcall TPIS0030M::ClearForm()
  432. {
  433. CTLR_MNGM_NMBR->Text = "";
  434. CTLR_MNGM_NM->Text = "";
  435. COMM_STATE->Text = "-";
  436. #if 0
  437. Edit1// 총 주차여유 면수 주차장 전체 여유 면수 4 N
  438. Edit2// 일반 주차여유 면수 일반 차량 주차 여유 면수 4 N
  439. Edit3// 장애인 주차여유 면수 장애인 차량 주차 여유 면수 4 N
  440. Edit4// 경차 주차여유 면수 경차 주차 여유 면수 4 N
  441. Edit5// 여성전용 주차여유 면수 여성전용 주차여유 면수 4 N
  442. Edit6// 전기차 주차여유 면수 전기차 전용 주차여유 면수 4 N
  443. #endif
  444. Edit1->Text = "0";
  445. Edit2->Text = "0";
  446. Edit3->Text = "0";
  447. Edit4->Text = "0";
  448. Edit5->Text = "0";
  449. Edit6->Text = "0";
  450. BtnControl->Enabled = false;
  451. }
  452. //---------------------------------------------------------------------------