// PPgTweaks2.h

#pragma once
#include "Neo\GUI\CP\TreeOptionsCtrl.h" // NEO - [TreeControl]

class CPPgTweaks2 : public CPropertyPage
{
	DECLARE_DYNAMIC(CPPgTweaks2)

public:
	CPPgTweaks2();
	virtual ~CPPgTweaks2();

// Dialog Data
	enum { IDD = IDD_PPG_MOD };

	void Localize();

protected:
	bool m_bHighresTimer;
	UINT m_iFileBufferSize;
	UINT m_iFileBufferTime;
	bool m_ICH;
	bool m_dontcompressblocks;
	bool m_dontcompressavi;
	bool m_bRemove2bin;
	bool m_bShowCopyEd2kLinkCmd;
	//int m_nServerUDPPort;
	bool m_bRestoreLastMainWndDlg;
	bool m_bRestoreLastLogPane;
	bool m_bIconflashOnNewMessage;
	//bool m_bEnableMiniMule;
	int m_iPreviewSmallBlocks;
	bool m_bPreviewCopiedArchives;
	bool m_bPreviewOnIconDblClk;
	bool m_bShowActiveDownloadsBold;
	bool m_bRTLWindowsLayout;
	bool m_bReBarToolbar;
	int m_iStraightWindowStyles;
	int m_iMaxChatHistory;
	int m_maxmsgsessions;
	bool m_bPreferRestrictedOverUser;
	bool m_bTrustEveryHash;
	bool m_bRememberAICH; // NEO: MOD - [RemoveUnusedAICHhashes]
	bool m_bShowVerticalHourMarkers;
	int m_iInspectAllFileTypes;
	//int m_dwServerKeepAliveTimeout;
	int m_iWebFileUploadSizeLimitMB;
	//bool m_bAllowAdminHiLevFunc;
	CString m_sAllowedRemoteAccessIPs;
	int m_uMaxLogFileSize;
	int m_iMaxLogBuff;
	UINT m_iLogFileFormat;
	CString m_TxtEditor;
	bool m_bPeerCacheShow;
	CString m_datetimeformat;
	CString m_datetimeformat4log;
	COLORREF m_crLogError;
	COLORREF m_crLogWarning;
	COLORREF m_crLogSuccess;

#ifdef WS2 // NEO: WS2 - [WINSOCK2]
	bool m_bWinSock2;
#endif // WS2 // NEO: WS2 END
	int m_iInternetSecurityZone;
	bool m_bCreateCrashDump;
	//bool m_bMiniMuleAutoClose;
	//int m_iMiniMuleTransparency;
	bool m_bAdjustNTFSDaylightFileTime;

	CTreeOptionsCtrl m_ctrlTreeOptions; // NEO: FIX - [TreeControl] <-- Xanatos --
	bool m_bInitializedTreeOpts;

	HTREEITEM m_htiHighresTimer;
	HTREEITEM m_htiFileBufferSize;
	HTREEITEM m_htiFileBufferTime;
	HTREEITEM m_htiICH;
	HTREEITEM m_htidontcompressblocks;
	HTREEITEM m_htidontcompressavi;
	HTREEITEM m_htiRemove2bin;
	HTREEITEM m_htiShowCopyEd2kLinkCmd;
	//HTREEITEM m_htiServerUDPPort;
	HTREEITEM m_htiRestoreLastMainWndDlg;
	HTREEITEM m_htiRestoreLastLogPane;
	HTREEITEM m_htiIconflashOnNewMessage;
	//HTREEITEM m_htiEnableMiniMule;
	HTREEITEM m_htiPreviewSmallBlocks;
	HTREEITEM m_htiPreviewCopiedArchives;
	HTREEITEM m_htiPreviewOnIconDblClk;
	HTREEITEM m_htiShowActiveDownloadsBold;
	HTREEITEM m_htiRTLWindowsLayout;
	HTREEITEM m_htiReBarToolbar;
	HTREEITEM m_htiStraightWindowStyles;
	HTREEITEM m_htiMaxChatHistory;
	HTREEITEM m_htimaxmsgsessions;
	HTREEITEM m_htiPreferRestrictedOverUser;
	HTREEITEM m_htiTrustEveryHash;
	HTREEITEM m_htiRememberAICH; // NEO: MOD - [RemoveUnusedAICHhashes]
	HTREEITEM m_htiShowVerticalHourMarkers;
	HTREEITEM m_htiInspectAllFileTypes;
	//HTREEITEM m_htiServerKeepAliveTimeout;
	HTREEITEM m_htiWebFileUploadSizeLimitMB;
	//HTREEITEM m_htiAllowAdminHiLevFunc;
	HTREEITEM m_htiAllowedRemoteAccessIPs;
	HTREEITEM m_htiPeerCacheShow;
	HTREEITEM m_htidatetimeformat;
	HTREEITEM m_htidatetimeformat4log;
	HTREEITEM m_htiLogError;
	HTREEITEM m_htiLogWarning;
	HTREEITEM m_htiLogSuccess;

#ifdef WS2 // NEO: WS2 - [WINSOCK2]
	HTREEITEM m_htiWinSock2;
#endif // WS2 // NEO: WS2 END
	HTREEITEM m_htiInternetSecurityZone;
	HTREEITEM m_htiCreateCrashDump;
	//HTREEITEM m_htiMiniMuleAutoClose;
	//HTREEITEM m_htiMiniMuleTransparency;
	HTREEITEM m_htiAdjustNTFSDaylightFileTime;
	HTREEITEM m_htiMaxLogFileSize;
	HTREEITEM m_htiMaxLogBuff;
	HTREEITEM m_htiLogFileFormat;
	HTREEITEM m_htiTxtEditor;

	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);

	void TreeItemsToNull();
};
