#pragma once
#include "Preferences.h"

class CPPg_X_Download : public CPropertyPage
{
	DECLARE_DYNAMIC(CPPg_X_Download)

public:
	CPPg_X_Download();
	virtual ~CPPg_X_Download();

	// Dialog Data
	enum { IDD = IDD_PPG_X_DOWNLOAD };

	void Localize(void);

	afx_msg void OnSettingsChange()		{ SetModified(); }
	afx_msg	void OnGHLChk(); // X-Ray :: Global Hardlimit

// X-Ray :: PPgPrefTabs
private:
	enum eTab	{NONE, Download1, Download2};
	CTabCtrl	m_tabCtr;
	eTab		m_currentTab;
	CImageList	m_imageList;
	void		SetTab(eTab tab);

public:
	afx_msg void OnTcnSelchangeTabDownload1(NMHDR *pNMHDR, LRESULT *pResult);
	void	InitTab(bool firstinit, int Page = 0);
// X-Ray :: End

protected:

	void LoadSettings();

	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual BOOL OnInitDialog();
	virtual BOOL OnApply();

	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);

	DECLARE_MESSAGE_MAP()

private:
	void ShowGHLSources(); // X-Ray :: Global Hardlimit
	// X-Ray :: IntelliFlush :: Start
	void ShowForcedFlushTime();
	void ShowFlushbufferLimit();
	// X-Ray :: IntelliFlush :: End
	// X-Ray :: SLS :: Start
	void OnSLSChkClicked();
	uint8 GetEditBoxSLSEntries(CEdit* pEditBox, uint8 iPrefBuffer);
	void SetEditBoxSLSEntries(CEdit* pEditBox, uint8 strBuffer);
	// X-Ray :: SLS :: End
};
