// CodeGear C++Builder
// Copyright (c) 1995, 2020 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'fuQImport3ProgressDlg.pas' rev: 34.00 (Windows)

#ifndef Fuqimport3progressdlgHPP
#define Fuqimport3progressdlgHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <Vcl.ComCtrls.hpp>
#include <QImport3.hpp>
#include <QImport3StrTypes.hpp>
#include <QImport3StrIDs.hpp>
#include <QImport3Common.hpp>
#include <System.WideStrings.hpp>

//-- user supplied -----------------------------------------------------------

namespace Fuqimport3progressdlg
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TfmQImport3ProgressDlg;
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM TImportState : unsigned char { istPrepare, istImport, istCancel, istFinish, istPause, istContinue };

class PASCALIMPLEMENTATION TfmQImport3ProgressDlg : public Vcl::Forms::TForm
{
	typedef Vcl::Forms::TForm inherited;
	
__published:
	Vcl::Stdctrls::TButton* bCancel;
	Vcl::Extctrls::TPanel* paInfo;
	Vcl::Extctrls::TBevel* bvProcessed;
	Vcl::Comctrls::TProgressBar* prbImport;
	Vcl::Stdctrls::TLabel* laProcessed;
	Vcl::Extctrls::TBevel* bvStateValue;
	Vcl::Stdctrls::TLabel* laProcessedValue;
	Vcl::Extctrls::TBevel* bvState;
	Vcl::Extctrls::TBevel* bvProcessedValue;
	Vcl::Stdctrls::TLabel* laState;
	Vcl::Stdctrls::TLabel* laStateValue;
	Vcl::Extctrls::TBevel* bvTime;
	Vcl::Stdctrls::TLabel* laTime;
	Vcl::Stdctrls::TLabel* laTimeValue;
	Vcl::Extctrls::TBevel* bvTimeValue;
	Vcl::Extctrls::TTimer* Timer;
	Vcl::Stdctrls::TLabel* laPercent;
	Vcl::Stdctrls::TLabel* laCommitted;
	Vcl::Extctrls::TBevel* bvCommitted;
	Vcl::Stdctrls::TLabel* laCommittedValue;
	Vcl::Extctrls::TBevel* bvCommittedValue;
	Vcl::Extctrls::TBevel* bvInserted;
	Vcl::Extctrls::TBevel* bvUpdates;
	Vcl::Extctrls::TBevel* bvDeleted;
	Vcl::Extctrls::TBevel* bvErrors;
	Vcl::Stdctrls::TLabel* laInserted;
	Vcl::Stdctrls::TLabel* laUpdated;
	Vcl::Stdctrls::TLabel* laDeleted;
	Vcl::Stdctrls::TLabel* laErrors;
	Vcl::Extctrls::TBevel* bvInsertedValue;
	Vcl::Stdctrls::TLabel* laInsertedValue;
	Vcl::Extctrls::TBevel* bvUpdatedValue;
	Vcl::Stdctrls::TLabel* laUpdatedValue;
	Vcl::Stdctrls::TLabel* laDeletedValue;
	Vcl::Extctrls::TBevel* bvDeletedValue;
	Vcl::Stdctrls::TLabel* laErrorsValue;
	Vcl::Extctrls::TBevel* bvErrorsValue;
	Vcl::Extctrls::TBevel* bvPervent;
	Vcl::Extctrls::TTimer* FinishDelay;
	void __fastcall TimerTimer(System::TObject* Sender);
	void __fastcall FormShow(System::TObject* Sender);
	void __fastcall bCancelClick(System::TObject* Sender);
	void __fastcall FinishDelayTimer(System::TObject* Sender);
	
private:
	TImportState FImportState;
	int FInsertedValue;
	int FUpdatedValue;
	int FDeletedValue;
	int FSkippedValue;
	int FErrorsValue;
	int FAdvErrorsValue;
	int FRowCount;
	System::TDateTime FTime;
	System::Widestrings::TWideStrings* FErrors;
	Qimport3::TQImport3* FImport;
	bool FCloseAfterImport;
	void __fastcall SetCaptions();
	void __fastcall SetImportState(const TImportState Value);
	void __fastcall SetInsertedValue(const int Value);
	void __fastcall SetUpdatedValue(const int Value);
	void __fastcall SetDeletedValue(const int Value);
	void __fastcall SetSkippedValue(const int Value);
	void __fastcall SetErrorsValue(const int Value);
	void __fastcall SetAdvErrorsValue(const int Value);
	void __fastcall SetRowCount(const int Value);
	void __fastcall SetTime(const System::TDateTime ATime);
	void __fastcall ShowImportedState();
	void __fastcall ShowProcessedValue();
	void __fastcall ShowInsertedValue();
	void __fastcall ShowUpdatedValue();
	void __fastcall ShowDeletedValue();
	void __fastcall ShowErrorsValue();
	void __fastcall ShowTime();
	void __fastcall ShowPercent();
	System::UnicodeString __fastcall GetStateString();
	void __fastcall SetVisibleProgress(const bool Value);
	
protected:
	virtual void __fastcall CreateParams(Vcl::Controls::TCreateParams &Params);
	MESSAGE void __fastcall ImportProgress(Winapi::Messages::TMessage &Msg);
	
public:
	__fastcall TfmQImport3ProgressDlg(System::Classes::TComponent* AOwner, Qimport3::TQImport3* AImport, bool ACloseAfterImport);
	__property TImportState ImportState = {read=FImportState, write=SetImportState, nodefault};
	__property System::UnicodeString StateString = {read=GetStateString};
	__property int InsertedValue = {read=FInsertedValue, write=SetInsertedValue, nodefault};
	__property int UpdatedValue = {read=FUpdatedValue, write=SetUpdatedValue, nodefault};
	__property int DeletedValue = {read=FDeletedValue, write=SetDeletedValue, nodefault};
	__property int SkippedValue = {read=FSkippedValue, write=SetSkippedValue, nodefault};
	__property int ErrorsValue = {read=FErrorsValue, write=SetErrorsValue, nodefault};
	__property int AdvErrorsValue = {read=FAdvErrorsValue, write=SetAdvErrorsValue, nodefault};
	__property int RowCount = {read=FRowCount, write=SetRowCount, nodefault};
	__property System::Widestrings::TWideStrings* Errors = {read=FErrors, write=FErrors};
	__property Qimport3::TQImport3* Import = {read=FImport, write=FImport};
	__property bool CloseAfterImport = {read=FCloseAfterImport, write=FCloseAfterImport, nodefault};
	void __fastcall Stop(bool ShowErrors);
	void __fastcall StepIt();
	void __fastcall Start();
	void __fastcall ShowCommittedValue();
public:
	/* TCustomForm.Create */ inline __fastcall virtual TfmQImport3ProgressDlg(System::Classes::TComponent* AOwner) : Vcl::Forms::TForm(AOwner) { }
	/* TCustomForm.CreateNew */ inline __fastcall virtual TfmQImport3ProgressDlg(System::Classes::TComponent* AOwner, int Dummy) : Vcl::Forms::TForm(AOwner, Dummy) { }
	/* TCustomForm.Destroy */ inline __fastcall virtual ~TfmQImport3ProgressDlg() { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TfmQImport3ProgressDlg(HWND ParentWindow) : Vcl::Forms::TForm(ParentWindow) { }
	
};


//-- var, const, procedure ---------------------------------------------------
static const System::Word WM_QIMPORT_PROGRESS = System::Word(0x401);
static const System::Int8 QIP_STATE = System::Int8(0x1);
static const System::Int8 QIP_ERROR = System::Int8(0x2);
static const System::Int8 QIP_ERROR_ADV = System::Int8(0x7);
static const System::Int8 QIP_IMPORT = System::Int8(0x3);
static const System::Int8 QIP_COMMIT = System::Int8(0x4);
static const System::Int8 QIP_FINISH = System::Int8(0x5);
static const System::Int8 QIP_ROWCOUNT = System::Int8(0x6);
}	/* namespace Fuqimport3progressdlg */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_FUQIMPORT3PROGRESSDLG)
using namespace Fuqimport3progressdlg;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Fuqimport3progressdlgHPP
