00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "FdmApp.h"
00008 #include "DownloadPropertiesSheet.h"
00009 #include <afxpriv.h>
00010
00011 #ifdef _DEBUG
00012 #define new DEBUG_NEW
00013 #undef THIS_FILE
00014 static char THIS_FILE[] = __FILE__;
00015 #endif
00016
00017 IMPLEMENT_DYNAMIC(CDownloadPropertiesSheet, CPropertySheet)
00018
00019 CDownloadPropertiesSheet::CDownloadPropertiesSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
00020 :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
00021 {
00022
00023 }
00024
00025 CDownloadPropertiesSheet::CDownloadPropertiesSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
00026 :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
00027 {
00028 }
00029
00030 CDownloadPropertiesSheet::~CDownloadPropertiesSheet()
00031 {
00032 }
00033
00034 BEGIN_MESSAGE_MAP(CDownloadPropertiesSheet, CPropertySheet)
00035 ON_WM_CREATE ()
00036
00037
00038
00039 END_MESSAGE_MAP()
00040
00041 void CDownloadPropertiesSheet::Init(DLDS_LIST* pvDlds, DWORD dwPages)
00042 {
00043 m_general.m_pvDlds = m_connection.m_pvDlds = m_protocol.m_pvDlds = m_proxy.m_pvDlds =
00044 m_integrity.m_pvDlds = m_misc.m_pvDlds = pvDlds;
00045
00046 if (dwPages & DPS_SHP_GENERAL)
00047 AddPage (&m_general);
00048
00049 if ((dwPages & DPS_SHP_MIRRORS) && pvDlds->size () == 1)
00050 {
00051 m_mirrors.m_dld = pvDlds->at (0);
00052 AddPage (&m_mirrors);
00053 }
00054
00055 if (dwPages & DPS_SHP_CONNECTION)
00056 AddPage (&m_connection);
00057
00058 if (dwPages & DPS_SHP_PROTOCOL)
00059 AddPage (&m_protocol);
00060
00061 if (dwPages & DPS_SHP_PROXY)
00062 AddPage (&m_proxy);
00063
00064 if (dwPages & DPS_SHP_INTEGRITY)
00065 AddPage (&m_integrity);
00066
00067 if (dwPages & DPS_SHP_MISC)
00068 AddPage (&m_misc);
00069
00070 EnableStackedTabs (FALSE);
00071 }
00072
00073 BOOL CDownloadPropertiesSheet::OnInitDialog()
00074 {
00075 CPropertySheet::OnInitDialog ();
00076
00077 DWORD dw = GetWindowLong (m_hWnd, GWL_EXSTYLE);
00078 dw |= WS_EX_CONTEXTHELP;
00079 SetWindowLong (m_hWnd, GWL_EXSTYLE, dw);
00080
00081 return TRUE;
00082 }
00083
00084 BOOL CDownloadPropertiesSheet::IsNeedUpdateTasks()
00085 {
00086 return m_general.m_bNeedUpdateTasks;
00087 }
00088
00089 BOOL CDownloadPropertiesSheet::IsNeedProcessDownloads()
00090 {
00091 return m_general.m_bNeedProcessDownloads;
00092 }
00093
00094 int CDownloadPropertiesSheet::OnCreate(LPCREATESTRUCT lpCreateStruct)
00095 {
00096 int iRet = CPropertySheet::OnCreate (lpCreateStruct);
00097
00098 return iRet;
00099 }
00100
00101 void CDownloadPropertiesSheet::BuildPropPageArray()
00102 {
00103 CPropertySheet::BuildPropPageArray();
00104 }
00105