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

#ifndef DataModuleH
#define DataModuleH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "CPort.hpp"
#include <Menus.hpp>
#include <ExtCtrls.hpp>
#include <Dialogs.hpp>
//---------------------------------------------------------------------------
class TDModule : public TDataModule
{
__published:	// IDE-managed Components
        TMainMenu *MainMenu1;
        TComPort *Cp1_307;
        TComPort *Cp1_tp;
        TComPort *Cp_plc;
        TComPort *Cp1_tc;
        TMenuItem *N1;
        TMenuItem *N2;
        TComPort *Cp2_307;
        TComPort *Cp2_tp;
        TComPort *Cp2_tc;
        TComPort *Cp3_307;
        TComPort *Cp3_tp;
        TComPort *Cp3_tc;
        TComPort *Cp4_307;
        TComPort *Cp4_tp;
        TComPort *Cp4_tc;
        TTimer *F1_Timer;
        TSaveDialog *SaveDialog1;
        TMenuItem *Furnace1SavetoExcel1;
        TMenuItem *Furnace2SavetoExcel1;
        TMenuItem *Furnace3SavetoExcel1;
        TMenuItem *Furnace4SavetoExcel1;
        TMenuItem *N3;
        TMenuItem *Exit1;
        TMenuItem *N4;
        TMenuItem *Furnace11;
        TMenuItem *Furnace21;
        TMenuItem *Furnace31;
        TMenuItem *Furnace41;
        TTimer *F2_Timer;
        TTimer *F3_Timer;
        TTimer *F4_Timer;
        TTimer *Timer1;
        void __fastcall F1_TimerTimer(TObject *Sender);
        void __fastcall Furnace11Click(TObject *Sender);
        void __fastcall Timer1Timer(TObject *Sender);
        void __fastcall F2_TimerTimer(TObject *Sender);
        void __fastcall F3_TimerTimer(TObject *Sender);
        void __fastcall F4_TimerTimer(TObject *Sender);
private:	// User declarations
public:		// User declarations
        __fastcall TDModule(TComponent* Owner);

        int F1_DataCount;
        int F2_DataCount;
        int F3_DataCount;
        int F4_DataCount;

        int F1_ChartPageCount;
        int F2_ChartPageCount;
        int F3_ChartPageCount;
        int F4_ChartPageCount;
        
        int Tss[4];
        int Tmm[4];
        int Thh[4];
        
        TDateTime F1_OldDT,F1_NowDT,F1_TempT;
        TDateTime F2_OldDT,F2_NowDT;
        TDateTime F3_OldDT,F3_NowDT;
        TDateTime F4_OldDT,F4_NowDT;
};
//---------------------------------------------------------------------------
extern PACKAGE TDModule *DModule;
//---------------------------------------------------------------------------
#endif
