00001 // 00002 // PageSettingsUploads.h 00003 // 00004 // Copyright (c) Shareaza Development Team, 2002-2005. 00005 // This file is part of SHAREAZA (www.shareaza.com) 00006 // 00007 // Shareaza is free software; you can redistribute it 00008 // and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // Shareaza is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with Shareaza; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 00022 #pragma once 00023 00024 #include "WndSettingsPage.h" 00025 #include "CtrlDragList.h" 00026 00027 00028 class CUploadsSettingsPage : public CSettingsPage 00029 { 00030 // Construction 00031 public: 00032 CUploadsSettingsPage(); 00033 virtual ~CUploadsSettingsPage(); 00034 00035 DECLARE_DYNCREATE(CUploadsSettingsPage) 00036 00037 // Dialog Data 00038 public: 00039 enum { IDD = IDD_SETTINGS_UPLOADS }; 00040 00041 CSpinButtonCtrl m_wndMaxPerHost; 00042 CComboBox m_wndAgentList; 00043 CButton m_wndAgentAdd; 00044 CButton m_wndAgentRemove; 00045 CComboBox m_wndBandwidthLimit; 00046 CDragListCtrl m_wndQueues; 00047 CButton m_wndQueueDelete; 00048 CButton m_wndQueueEdit; 00049 00050 00051 BOOL m_bSharePartials; 00052 BOOL m_bHubUnshare; 00053 BOOL m_bSharePreviews; 00054 DWORD m_nMaxPerHost; 00055 CString m_sBandwidthLimit; 00056 int m_bThrottleMode; 00057 00058 // 00059 public: 00060 BOOL m_bQueuesChanged; //Have the queues been changed? (Rebuild hash table) 00061 void UpdateQueues(); 00062 00063 // Overrides 00064 public: 00065 virtual void OnOK(); 00066 virtual BOOL OnSetActive(); 00067 virtual BOOL OnKillActive(); 00068 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 00069 00070 // Implementation 00071 protected: 00072 BOOL IsNotLimited(LPCTSTR pText); 00073 DECLARE_MESSAGE_MAP() 00074 virtual BOOL OnInitDialog(); 00075 afx_msg void OnSelChangeAgentList(); 00076 afx_msg void OnEditChangeAgentList(); 00077 afx_msg void OnAgentAdd(); 00078 afx_msg void OnAgentRemove(); 00079 afx_msg void OnItemChangedQueues(NMHDR* pNMHDR, LRESULT* pResult); 00080 afx_msg void OnQueueNew(); 00081 afx_msg void OnQueueEdit(); 00082 afx_msg void OnQueueDelete(); 00083 afx_msg void OnDblClkQueues(NMHDR* pNMHDR, LRESULT* pResult); 00084 afx_msg void OnQueueDrop(NMHDR* pNMHDR, LRESULT* pResult); 00085 afx_msg void OnShowWindow(BOOL bShow, UINT nStatus); 00086 };