#pragma once
#include "TreeOptionsCtrlEx.h"

class CPPgMOD : public CPropertyPage
{
	DECLARE_DYNAMIC(CPPgMOD)

public:
	CPPgMOD();
	virtual ~CPPgMOD();

// Dialog Data
	void Localize(void);

	enum { IDD = IDD_PPG_MOD};

protected:
	void	Nullify();

	CTreeOptionsCtrlEx m_ctrlTreeOptions;
	bool m_bInitializedTreeOpts;

	virtual void DoDataExchange(CDataExchange* pDX);
	virtual BOOL OnInitDialog();
	virtual BOOL OnApply();
	virtual BOOL OnKillActive();
	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);

	DECLARE_MESSAGE_MAP()
	afx_msg void OnDestroy();
	afx_msg LRESULT OnTreeOptsCtrlNotify(WPARAM wParam, LPARAM lParam);
	afx_msg void OnHelp();
	afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);

//insert HTREEITEMS and variables here:

// Contrib - Mod Options arangement
	HTREEITEM	m_htiSystemGroup;
	HTREEITEM	m_htiDM;
	HTREEITEM	m_htiUM;
	HTREEITEM	m_htiDisplayGroup;
	HTREEITEM	m_htiMoreTweaksGroup;
// <-------- Mod Options arangement

// Contrib - IntelliFlush
//>>> WiZaRd::IntelliFlush
	HTREEITEM	m_htiFileBufferGroup;
	HTREEITEM	m_htiFileBufferSize;
	HTREEITEM	m_htiFileBufferTime;
	HTREEITEM	m_htiIntelliFlushCheck;
	int			m_iFileBufferSize;
	int			m_iFileBufferTime;
	bool		m_bIntelliFlush;
//<<< WiZaRd::IntelliFlush
// <-------- IntelliFlush

// Contrib - IP2Country
//>>> shadow2004::IP2Country [EastShare]
	HTREEITEM	m_htiI2CGroup;
	HTREEITEM	m_htiI2C2Letter;
	HTREEITEM	m_htiI2C3Letter;
	HTREEITEM	m_htiI2CFullCaption;
	HTREEITEM	m_htiI2CShowFlag;
	int			m_iI2CCaption;
	bool		m_bI2CShowFlag;
//<<< shadow2004::IP2Country [EastShare]
	HTREEITEM	m_htiI2CShowFFlag;
	bool		m_bI2CShowFFlag;
// <-------- IP2Country

// Contrib - Connection Checker
//>>> WiZaRd::ConChecker [eWombat]
	HTREEITEM	m_htiConcheckerGroup;
	HTREEITEM	m_htiConcheckerActive;
	HTREEITEM	m_htiConcheckerPingtypeRadio;
	HTREEITEM	m_htiConcheckerPingICMP;
	HTREEITEM	m_htiConcheckerPingRAW;
	HTREEITEM	m_htiConcheckerTTL;
	HTREEITEM	m_htiConcheckerPingtimeout;
	bool		m_bConcheckerActive;
	int			m_iConcheckerPingtype;
	int			m_iConcheckerTTL;
	int			m_iConcheckerPingtimeout;
//<<< WiZaRd::ConChecker [eWombat]
// <-------- Connection Checker

// Contrib - QuickStart
// NEO: QS - [QuickStart]
	HTREEITEM	m_htiQuickStart;
	HTREEITEM	m_htiQuickStartEnable;
	HTREEITEM	m_htiQuickStartTime;
	HTREEITEM	m_htiQuickMaxConperFive;
	HTREEITEM	m_htiQuickMaxHalfOpen;
	HTREEITEM	m_htiQuickMaxConnections;
// NEO: QS END
	HTREEITEM	m_htiQuickStartOnIPChange; // NEO: QS - [QuickStart]
	bool		m_bQuickStart;
	int			m_iQuickStartTime;
	int			m_iQuickMaxConperFive;
	int			m_iQuickMaxHalfOpen;
	int			m_iQuickMaxConnections;
	bool		m_bQuickStartOnIPChange; // NEO: QS - [QuickStart]
// <-------- QuickStart

// Contrib - SLS
//>>> JvA::SLS [enkeyDEV]
	HTREEITEM	m_htiSLSGroup;
	HTREEITEM	m_htiSLSCheck;
	HTREEITEM	m_htiSLSActivationLimit;
	HTREEITEM	m_htiSLSSaveValue;
	bool		m_bSLSCheck;
	int			m_iSLSActivationLimit;
	int			m_iSLSSaveValue;
//<<< JvA::SLS [enkeyDEV]
// <-------- SLS

// Contrib - minRQR
//>>> WiZaRd::minRQR [WiZaRd]
	HTREEITEM	m_htiMinRQR;
	bool		m_bUseMinRQR;
//<<< WiZaRd::minRQR [WiZaRd]
// <-------- minRQR

// Contrib - FunnyNick
	HTREEITEM m_htiFunnyNick;
	bool m_bFunnyNick; //MORPH - Added by SiRoB, Optionnal funnynick display
	HTREEITEM m_htiDisplayFunnyNick;//MORPH - Added by SiRoB, Optionnal funnynick display

// Contrib - FunnyNick tag at end
	bool m_bFnTagAtEnd;
	HTREEITEM m_htiFnTagAtEnd;
// <-------- FunnyNick tag at end
// <-------- FunnyNick

// Contrib - folder ICONS
	HTREEITEM m_htiFolderIcons;
	bool m_bFolderIcons;
// <-------- folder ICONS

// By Taz - show SRC totals
	HTREEITEM	m_htiShowSrcTotals;
	bool		m_bShowSrcTotals;
// <------- show SRC totals

// By Taz - download color
	HTREEITEM	m_htiDownloadColor;
	HTREEITEM	m_htiRedDownload;
	HTREEITEM	m_htiGreenDownload;
	HTREEITEM	m_htiBlueDownload;
	int			m_iDownloadRed;
	int			m_iDownloadGreen;
	int			m_iDownloadBlue;
// <------- download color

// Contrib - Advanced official preferences
	HTREEITEM	m_hti_m_bRTLWindowsLayout;
	bool		m_bRTLWindowsLayout;
// <-------- Advanced official preferences

// Contrib - Automatic shared files updater
	HTREEITEM	m_htiAUTO_SHARED_UPDATER;
	bool		m_bAUTO_SHARED_UPDATER;
// <-------- Automatic shared files updater

// Contrib - remove unused AICH-hashes
	HTREEITEM	m_htiremove_unused_AICH_hashes;
	bool		m_bremove_unused_AICH_hashes;
// <-------- remove unused AICH-hashes

// Contrib - version check
	bool		m_bModVersionCheck, m_bModBetaCheck;
	HTREEITEM	m_htiModVersionCheck, m_htiModBetaCheck;
// <-------- version check

// Contrib - AutoHL
//>>> WiZaRd::AutoHL
	HTREEITEM m_htiAutoHL;

	HTREEITEM m_htiUseAutoHLRadio;
	HTREEITEM m_htiUseAutoHLPerFile;
	HTREEITEM m_htiUseAutoHLOn;
	HTREEITEM m_htiUseAutoHLOff;
	int m_iUseAutoHL;

	HTREEITEM m_htiMaxSources;
	int	 m_iMaxSources;

	HTREEITEM m_htiMaxPerFileSources;
	int	 m_iMaxPerFileSources;

	HTREEITEM m_htiMinPerFileSources;
	int	 m_iMinPerFileSources;

	HTREEITEM m_htiAHLUpdate;
	int	 m_iAHLUpdate;
//<<< WiZaRd::AutoHL
// <-------- AutoHL

// Contrib - drop sources
// By Taz - drop sources
	// ==> drop sources - Stulle
	bool m_bEnableAutoDropNNSDefault;
	int m_iAutoNNS_TimerDefault;
	int m_iMaxRemoveNNSLimitDefault;
	bool m_bEnableAutoDropFQSDefault;
	int m_iAutoFQS_TimerDefault;
	int m_iMaxRemoveFQSLimitDefault;
	bool m_bEnableAutoDropQRSDefault;
	int m_iAutoHQRS_TimerDefault;
	int m_iMaxRemoveQRSDefault;
	int m_iMaxRemoveQRSLimitDefault;
	// <== drop sources - Stulle
	// ==> drop sources - Stulle
	HTREEITEM m_htiDropDefaults;
	HTREEITEM m_htiAutoNNS;
	HTREEITEM m_htiAutoNNSTimer;
	HTREEITEM m_htiAutoNNSLimit;
	HTREEITEM m_htiAutoFQS;
	HTREEITEM m_htiAutoFQSTimer;
	HTREEITEM m_htiAutoFQSLimit;
	HTREEITEM m_htiAutoQRS;
	HTREEITEM m_htiAutoQRSTimer;
	HTREEITEM m_htiAutoQRSMax;
	HTREEITEM m_htiAutoQRSLimit;
	// <== drop sources - Stulle
// <------- drop sources
// <-------- drop sources

// Contrib - SCC
	// ==> Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
	int m_iDlMode;
	bool m_bShowCatNames;
	bool m_bSelectCat;
	bool m_bUseActiveCat;
	bool m_bAutoSetResOrder;
	bool m_bSmallFileDLPush;
	int m_iResumeFileInNewCat;
	bool m_bUseAutoCat;
	// <== Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
	// ==> Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
	HTREEITEM m_htiSCC;
	HTREEITEM m_htiDlMode;
	HTREEITEM m_htiDlNone;
	HTREEITEM m_htiDlAlph;
	HTREEITEM m_htiDlLP;
	HTREEITEM m_htiShowCatNames;
	HTREEITEM m_htiSelectCat;
	HTREEITEM m_htiUseActiveCat;
	HTREEITEM m_htiAutoSetResOrder;
	HTREEITEM m_htiSmallFileDLPush;
	HTREEITEM m_htiResumeFileInNewCat;
	HTREEITEM m_htiUseAutoCat;
	// <== Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
// <-------- SCC

// Contrib - Inform Clients after IP Change
	// ==> Inform Clients after IP Change - Stulle
	HTREEITEM m_htiIsreaskSourceAfterIPChange;
	HTREEITEM m_htiInformQueuedClientsAfterIPChange;
	bool m_bIsreaskSourceAfterIPChange;
	bool m_bInformQueuedClientsAfterIPChange;
	// <== Inform Clients after IP Change - Stulle
// <-------- Inform Clients after IP Change

// Contrib - ClientAnalyzer
#ifdef CLIENTANALYZER
	int	 m_iCreditSystem; //>>> WiZaRd::ClientAnalyzer
//>>> WiZaRd::ClientAnalyzer
	HTREEITEM m_htiCreditSystem;
	HTREEITEM m_htiCSNone;
	HTREEITEM m_htiCSOffi;
	HTREEITEM m_htiCSAnalyzer;
//<<< WiZaRd::ClientAnalyzer
#endif
// <-------- ClientAnalyzer

// Contrib - One-queue-per-file
protected:
	HTREEITEM m_htiEnableMultiQueue;
	bool m_bEnableMultiQueue;
// <-------- One-queue-per-file

// Contrib - corrupted blocks ban threshold
protected:
	HTREEITEM	m_htiBanThreshold;
	int			m_iBanThreshold;
// <-------- corrupted blocks ban threshold

// Contrib - Client Percentage
protected:
	HTREEITEM m_htiShowClientPercentage;
	bool m_bShowClientPercentage;
// <-------- Client Percentage

// By Taz - ban
protected:
#ifdef CLIENTANALYZER
	HTREEITEM	m_htiBanVagaa;
	bool		m_bBanVagaa;
	HTREEITEM	m_htiBanBS;
	bool		m_bBanBS;
	HTREEITEM	m_htiBanBMS;
	bool		m_bBanBMS;
#endif
	HTREEITEM	m_htiBanCommunity;
	bool		m_bBanCommunity;
	HTREEITEM	m_htiBanCorrupt;
	bool		m_bBanCorrupt;
	HTREEITEM	m_htiBan;
// <------- ban

};
