123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- //---------------------------------------------------------------------------
- #include <vcl.h>
- #include "ITSSkinF.h"
- #include "ITSUtilF.h"
- #include "ITSDbF.h"
- #include "AppGlobalF.h"
- #include "CDSCodeF.h"
- #include "CDSNodeF.h"
- #include "CDSLinkF.h"
- #include "CDSIfscF.h"
- #include "CDSRoadF.h"
- #include "ITSLangTransF.h"
- #pragma hdrstop
- #include "ITS0030MF.h"
- #include "FrmIncidVmsInfoF.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma link "FRAME_IncidentRegistF"
- #pragma link "FRAME_IncidentProcessF"
- #pragma link "FRAME_IncidentEndF"
- #pragma link "cxButtons"
- #pragma link "cxControls"
- #pragma link "cxGraphics"
- #pragma link "cxLookAndFeelPainters"
- #pragma link "cxLookAndFeels"
- #pragma link "cxPC"
- #pragma link "cxPCdxBarPopupMenu"
- #pragma link "dxSkinBlack"
- #pragma link "dxSkinBlue"
- #pragma link "dxSkinsCore"
- #pragma link "dxSkinscxPCPainter"
- #pragma resource "*.dfm"
- TITS0030M *ITS0030M = NULL;
- //---------------------------------------------------------------------------
- __fastcall TITS0030M::TITS0030M(TComponent* Owner)
- : TForm(Owner)
- {
- LangTrans->Translate(this, ITSDb_GetConnection());
- ITSSkin_Load(this);
- CMM_LoadForm(g_sFormsDir, this);
- cxPageControl1->Properties->ActivePage = cxTabSheet1;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::CommClose()
- {
- try
- {
- ItsIncidentManager->FAutoLists.RemoveAll();
- ItsIncidentManager->FVmsLists.RemoveAll();
- CMM_SaveForm(g_sFormsDir, this);
- }
- catch(...)
- {
- }
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::FormInit()
- {
- FRAMEIncidentRegist1->PnlTitle->Color = (TColor)0x00ACACFF;
- FRAMEIncidentProcess1->PnlTitle->Color = (TColor)0x000080FF;
- FRAMEIncidentProcess1->PnlVms->Color = clBlack;
- FRAMEIncidentEnd1->PnlTitle->Color = (TColor)0x0049BE50;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::FormShow(TObject *Sender)
- {
- Refresh();
- FormInit();
- TmrShow->Enabled = true;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::TmrShowTimer(TObject *Sender)
- {
- TmrShow->Enabled = false;
- BtnSearchClick((TObject*)BtnSearch);
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::BtnSearchClick(TObject *Sender)
- {
- Application->ProcessMessages();
- TSqlCursor sqlCrs((TControl*)BtnSearch);
- RefreshData();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::RefreshData()
- {
- SelListData();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::SelListData()
- {
- FRAMEIncidentRegist1->UpdateList();
- FRAMEIncidentRegist1->UpdateAutoList();
- FRAMEIncidentProcess1->UpdateList();
- //FRAMEIncidentProcess1->UpdateAutoList();
- FRAMEIncidentEnd1->UpdateList();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::BtnCloseClick(TObject *Sender)
- {
- Close();
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::FormClose(TObject *Sender, TCloseAction &Action)
- {
- try
- {
- if (FrmIncidVmsInfo)
- {
- FrmIncidVmsInfo->Close();
- FrmIncidVmsInfo = NULL;
- }
- }
- catch(...)
- {
- }
- CommClose();
- ITS0030M = NULL;
- Action = caFree;
- }
- //---------------------------------------------------------------------------
- void __fastcall TITS0030M::cxPageControl1PageChanging(TObject *Sender, TcxTabSheet *NewPage, bool &AllowChange)
- {
- try
- {
- if (FrmIncidVmsInfo)
- {
- FrmIncidVmsInfo->Close();
- FrmIncidVmsInfo = NULL;
- }
- }
- catch(...)
- {
- }
- switch(NewPage->PageIndex)
- {
- case 0 :
- FRAMEIncidentRegist1->UpdateList();
- FRAMEIncidentRegist1->UpdateAutoList();
- break;
- case 1 :
- FRAMEIncidentProcess1->UpdateList();
- //FRAMEIncidentProcess1->UpdateAutoList();
- break;
- case 2 :
- FRAMEIncidentEnd1->UpdateList();
- break;
- }
- }
- //---------------------------------------------------------------------------
|