//---------------------------------------------------------------------------

#ifndef IDB0050MFH
#define IDB0050MFH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Menus.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
#include "CDSColSysF.h"
#include "FRAME_LinkListF.h"
#include "FRAME_IfscListF.h"
#include "FRAME_RoadListF.h"
#include <ADODB.hpp>
#include <DB.hpp>
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxCheckBox.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxGroupBox.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxPC.hpp"
#include "cxPCdxBarPopupMenu.hpp"
#include "cxSpinEdit.hpp"
#include "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinMcSkin.hpp"

class TIDB0050M : public TForm
{
__published:	// IDE-managed Components
    TShape *ShpTitle;
    TcxButton *BtnSearch;
    TcxButton *BtnClose;
    TLabel *LblCaption;
    TEdit *EdFocus;
    TShape *ShpList;
    TTimer *TmrShow;
    TPanel *Panel1;
    TcxGroupBox *cxGroupBox1;
    TPanel *PnlRight;
    TcxGroupBox *cxGroupBox2;
    TcxPageControl *PgLink;
    TcxTabSheet *cxTabSheet1;
    TcxTabSheet *cxTabSheet2;
    TFRAMELinkList *FRAMELinkList1;
    TFRAMEIfscList *FRAMEIfscList1;
    TcxPageControl *cxPageControl2;
    TcxTabSheet *cxTabSheet3;
    TPanel *PnlBottom;
    TcxButton *BtnApplyAll;
    TcxButton *BtnApplySel;
    TcxSplitter *cxSplitter1;
    TcxGroupBox *cxGroupBoxFMT;
    TcxCheckBox *ChkFMT0;
    TcxCheckBox *ChkFMT1;
    TGroupBox *GrpFMT1;
    TImage *ImgDesc01;
    TLabel *Label5;
    TLabel *Label4;
    TLabel *Label1;
    TImage *ImgDesc02;
    TLabel *Label2;
    TLabel *Label3;
    TLabel *Label6;
    TcxSpinEdit *SeVolMin;
    TcxSpinEdit *SeVolMax;
    TcxSpinEdit *SeSpdMin;
    TcxSpinEdit *SeSpdMax;
    TcxGroupBox *cxGroupBoxFST;
    TcxCheckBox *ChkFST1;
    TcxCheckBox *ChkFST2;
    TGroupBox *GrpFST2;
    TcxGroupBox *cxGroupBoxMCA;
    TcxCheckBox *ChkMCA0;
    TcxCheckBox *ChkMCA2;
    TGroupBox *GrpMCA1;
    TImage *ImgDesc07;
    TLabel *Label13;
    TImage *ImgDesc08;
    TLabel *Label16;
    TcxGroupBox *cxGroupBoxSMT;
    TcxCheckBox *ChkSMT0;
    TcxCheckBox *ChkSMT1;
    TGroupBox *GrpFST1;
    TImage *ImgDesc04;
    TLabel *Label8;
    TImage *ImgDesc06;
    TLabel *Label9;
    TcxGrid *CxList3;
    TcxGridTableView *TvList3;
    TcxGridColumn *ColumnC01;
    TcxGridColumn *ColumnC02;
    TcxGridLevel *GlList3;
    TcxCheckBox *ChkMCA1;
    TLabel *Label10;
    TImage *ImgDesc09;
    TcxSpinEdit *SeMCAVal3;
    TcxSpinEdit *SeMCAVal2;
    TcxSpinEdit *SeMCAVal1;
    TcxCheckBox *ChkSMT2;
    TGroupBox *GrpSMT2;
    TImage *ImgDesc12;
    TLabel *Label11;
    TImage *ImgDesc13;
    TLabel *Label12;
    TLabel *Label14;
    TImage *ImgDesc14;
    TcxSpinEdit *SeSMTVal2;
    TcxSpinEdit *SeSMTVal1;
    TcxSpinEdit *SeSMTValC;
    TGroupBox *GrpSMT1;
    TImage *ImgDesc10;
    TLabel *Label15;
    TImage *ImgDesc11;
    TLabel *Label17;
    TcxSpinEdit *SeSMTValMin;
    TcxSpinEdit *SeSMTValMax;
    TcxGridColumn *ColumnC03;
    TPanel *Panel3;
    TcxGrid *CxList1;
    TcxGridTableView *TvList1;
    TcxGridColumn *ColumnA01;
    TcxGridColumn *ColumnA02;
    TcxGridLevel *GlList1;
    TcxButton *BtnListAdd;
    TcxButton *BtnListDelete;
    TcxGrid *CxList2;
    TcxGridTableView *TvList2;
    TcxGridColumn *ColumnB01;
    TcxGridColumn *ColumnB02;
    TcxGridLevel *GlList2;
    TImage *ImgDesc03;
    TLabel *Label7;
    TcxGrid *CxList0;
    TcxGridTableView *TvList0;
    TcxGridColumn *ColumnD01;
    TcxGridColumn *ColumnD03;
    TcxGridColumn *ColumnD02;
    TcxGridLevel *GlList0;
    TcxGridColumn *ColumnD04;
    TcxTabSheet *cxTabSheet4;
    TFRAMERoadList *FRAMERoadList1;
    TADOQuery *ADOQry;
    TcxCheckBox *Chk15MinPtrn;
    TcxSpinEdit *SeMissCycle;
    TLabel *Label18;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnSearchClick(TObject *Sender);
    void __fastcall BtnCloseClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall ChkFMT0Click(TObject *Sender);
    void __fastcall ChkFMT1Click(TObject *Sender);
    void __fastcall ChkFST1Click(TObject *Sender);
    void __fastcall ChkFST2Click(TObject *Sender);
    void __fastcall ChkMCA0Click(TObject *Sender);
    void __fastcall ChkMCA2Click(TObject *Sender);
    void __fastcall ChkMCA1Click(TObject *Sender);
    void __fastcall ChkSMT0Click(TObject *Sender);
    void __fastcall ChkSMT1Click(TObject *Sender);
    void __fastcall ChkSMT2Click(TObject *Sender);
    void __fastcall BtnApplyAllClick(TObject *Sender);
    void __fastcall BtnApplySelClick(TObject *Sender);
    void __fastcall BtnListAddClick(TObject *Sender);
    void __fastcall BtnListDeleteClick(TObject *Sender);
    void __fastcall FRAMELinkList1TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall FRAMEIfscList1TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall FRAMERoadList1TvListFocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
private:	// User declarations
    void __fastcall CommClose();
    String             FTitle;
    //TItsColSysManager *MyItsColSysManager;
    bool               FInit;
public:
    String  FFMT;
    int     FFMTVolMin, FFMTVolMax, FFMTSpdMin, FFMTSpdMax;

    String  FFST;

    String  FMCA;
    //int     FMCAVal3, FMCAVal2, FMCAVal1;
    float   FMCAVal3, FMCAVal2, FMCAVal1;

    String  FSMT;
    float   FSMTSpdMin, FSMTSpdMax;
    //int     FSMTVal2, FSMTVal1, FSMTValC;
    float   FSMTVal2, FSMTVal1, FSMTValC;

    int     FColSysCnt;

public:		// User declarations
    __fastcall TIDB0050M(TComponent* Owner);

    void __fastcall FormInit();
    void __fastcall RefreshData();

    void __fastcall ChangeFMT(bool AUse);
    void __fastcall ChangeFST(bool AUse);
    void __fastcall ChangeMCA(int AType);
    void __fastcall ChangeSMT(int AType);

    void __fastcall LoadCollectSysInfo();
    bool __fastcall CheckParameterValue();

    void __fastcall DisplayLink();
    bool __fastcall ModifyLinkParam(int ALevel, TStringList *AStringList);
    void __fastcall DisplayLinkParam(int ALevel, String ALinkId);
};
//---------------------------------------------------------------------------
extern PACKAGE TIDB0050M *IDB0050M;
//---------------------------------------------------------------------------

#endif

