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

#ifndef ImportFormUnitH
#define ImportFormUnitH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Vcl.ExtCtrls.hpp>
#include <System.IOUtils.hpp>
#include <Vcl.ComCtrls.hpp>
#include "GeneralDialogPanel.h"
#include "LineEdit.h"
#include "SkinTrackBar.h"
#include "TextButton.h"
#include "CapButton.h"
#include "ComboBoxComponent.h"
#include "UpDownUnit.h"
//---------------------------------------------------------------------------
class TImportForm : public TForm
{
__published:	// IDE-managed Components
	TGeneralDialogPanel *m_panGeneral;
	TLabel *m_MediaFilePathLabel;
	TLabel *m_TSLabel;
	TLabel *m_TempoLabel;
	TLabel *m_TipsLabel;
	TTextButton *m_BrowsButton;
	TTextButton *m_CancelButton;
	TTextButton *m_OKButton;
	TLineEdit *m_MediaFilePath;
	TLabel *ts_44;
	TLabel *ts_34;
	TLabel *ts_24;
	TLabel *ts_68;
	TLineEdit *m_ShowTempo;
	TSkinTrackBar *m_TempoTrackBar;
	TSkinTrackBar *m_TSTrackBar;
	TLabel *m_ShowTempoMin;
	TLabel *m_ShowTempoMax;
	UpDownUnit::TUpDown *m_TempoUpDown;

	void __fastcall DoBrows(TObject *Sender);
	void __fastcall DoFilePathChange(TObject *Sender);
	void __fastcall DoOK(TObject *Sender);
	void __fastcall DoCancel(TObject *Sender);
    void __fastcall DoTempoTrackBar(TObject *Sender);
    void __fastcall DoTSTrackBar(TObject *Sender);
	void __fastcall DoShowTempoChange(TObject *Sender);
	void __fastcall DoTempoUpDown(TObject *Sender, TUDBtnType Button);
	void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall FormCreate(TObject *Sender);
private:	// User declarations
	int m_RetrunValue;
	int m_iMode; //0 = 导入单旋律文件 1 = 导入旋律片段
	int m_TopOk, m_TopCancel, m_TopTips, m_Height;
public:		// User declarations
	String 	MediaFilePath;
    int     TS;
    int		Tempo;

	__fastcall TImportForm(TComponent* Owner, String DefaultFile,
								int TS=-1, int Tempo=-1, int iMode=1 );
    virtual int __fastcall ShowModal();
};
//---------------------------------------------------------------------------
extern PACKAGE TImportForm *ImportForm;
//---------------------------------------------------------------------------
#endif
