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

#ifndef CustomerSettingPanelUnitH
#define CustomerSettingPanelUnitH
#include "SkinScrollBarUnit.h"
#include "CKBox.h"
#include "ComboBoxComponent.h"
//#include "GlobalUnit.h"
//---------------------------------------------------------------------------
#define LINE_NUM			  (5)
#define LINE_HEIGHT       	  (40)
#define PANEL_START           (26)
#define PANEL_LEFT            (10)
#define PANEL_RIGHT           (PANEL_LEFT)
#define PANEL_HEIGHT 		  (260)

//---------------------------------------------------------------------------
class TCustmerSettingPanel : public Vcl::Extctrls::TPanel
{

private:

	int m_iShowLine;
	int m_iTopLine;

	TSkinScrollBar *m_ScrollBar;

	TCKBox *m_ckInitProject;
	TCKBox *m_ckDownloadStyle;
	TCKBox *m_ckPreBeat;
	TCKBox *m_ckSegColor;

	TComboBoxComponent *m_cbChordMode;
	TComboBoxComponent *m_cbPreStage;

	void __fastcall CKBoxChange(TObject* Sender);
	void __fastcall ChordModeChange(TComboBoxItem* Sender, int Index);
	void __fastcall PreStageChange(TComboBoxItem* Sender, int Index);
	void __fastcall SetShowLine();

	virtual void __fastcall CreateWnd();
	virtual void __fastcall Paint(void);

	MESSAGE void __fastcall WMEraseBkgnd(TWMEraseBkgnd &Message);
	MESSAGE void __fastcall WMVScroll(Winapi::Messages::TWMScroll &Message);
	MESSAGE void __fastcall WMMouseWheel(TWMMouseWheel &Message);

	BEGIN_MESSAGE_MAP
		MESSAGE_HANDLER(WM_ERASEBKGND, TWMEraseBkgnd, WMEraseBkgnd)
		MESSAGE_HANDLER(WM_VSCROLL, TWMVScroll, WMVScroll)
		MESSAGE_HANDLER(WM_MOUSEWHEEL, TWMMouseWheel, WMMouseWheel)
	END_MESSAGE_MAP( Vcl::Extctrls::TPanel )

public:
	bool m_bAutoOpenProject;
	bool m_bDownloadStyle;
    bool m_bPreBeat;
	bool m_bAlphaKey;
	bool m_bSegColor;
	char m_cPreStage;

	void __fastcall SetContent();

	__fastcall TCustmerSettingPanel( TComponent* Owner);
	__fastcall ~TCustmerSettingPanel();
};
//---------------------------------------------------------------------------
#endif
