BOOL CPPgTweaks::OnInitDialog() { m_iMaxConnPerFive = thePrefs.GetMaxConperFive(); m_iMaxHalfOpen = thePrefs.GetMaxHalfConnections(); m_bConditionalTCPAccept = thePrefs.GetConditionalTCPAccept(); m_bAutoTakeEd2kLinks = HaveEd2kRegAccess() ? thePrefs.AutoTakeED2KLinks() : 0; if (thePrefs.GetEnableVerboseOptions()) { m_bVerbose = thePrefs.m_bVerbose; m_bDebug2Disk = thePrefs.debug2disk; // do *not* use the according 'Get...' function here! m_bDebugSourceExchange = thePrefs.m_bDebugSourceExchange; // do *not* use the according 'Get...' function here! m_bLogBannedClients = thePrefs.m_bLogBannedClients; // do *not* use the according 'Get...' function here! m_bLogRatingDescReceived = thePrefs.m_bLogRatingDescReceived; // do *not* use the according 'Get...' function here! m_bLogSecureIdent = thePrefs.m_bLogSecureIdent; // do *not* use the according 'Get...' function here! m_bLogFilteredIPs = thePrefs.m_bLogFilteredIPs; // do *not* use the according 'Get...' function here! m_bLogFileSaving = thePrefs.m_bLogFileSaving; // do *not* use the according 'Get...' function here! m_bLogA4AF = thePrefs.m_bLogA4AF; // do *not* use the according 'Get...' function here! // ZZ:DownloadManager m_bLogUlDlEvents = thePrefs.m_bLogUlDlEvents; //==> Emulate others by WiZaRd & Spike [shadow2004] #ifdef EMULATE m_bLogEmulator = thePrefs.m_bLogEmulator; #endif //<== Emulate others by WiZaRd & Spike [shadow2004] m_iLogLevel = 5 - thePrefs.m_byLogLevel; } m_bLog2Disk = thePrefs.log2disk; m_bCreditSystem = thePrefs.m_bCreditSystem; m_iCommitFiles = thePrefs.m_iCommitFiles; m_iExtractMetaData = thePrefs.m_iExtractMetaData; m_bFilterLANIPs = thePrefs.filterLANIPs; m_bExtControls = thePrefs.m_bExtControls; m_uServerKeepAliveTimeout = thePrefs.m_dwServerKeepAliveTimeout / 60000; m_bSparsePartFiles = thePrefs.m_bSparsePartFiles; m_bCheckDiskspace = thePrefs.checkDiskspace; m_fMinFreeDiskSpaceMB = (float)(thePrefs.m_uMinFreeDiskSpace / (1024.0 * 1024.0)); m_sYourHostname = thePrefs.GetYourHostname(); m_bFirewallStartup = ((thePrefs.GetWindowsVersion() == _WINVER_XP_) ? thePrefs.m_bOpenPortsOnStartUp : 0); m_bDisablePeerCache = !thePrefs.m_bPeerCacheEnabled; m_bDynUpEnabled = thePrefs.m_bDynUpEnabled; m_iDynUpMinUpload = thePrefs.GetMinUpload(); m_iDynUpPingTolerance = thePrefs.GetDynUpPingTolerance(); m_iDynUpPingToleranceMilliseconds = thePrefs.GetDynUpPingToleranceMilliseconds(); m_iDynUpRadioPingTolerance = thePrefs.IsDynUpUseMillisecondPingTolerance()?1:0; m_iDynUpGoingUpDivider = thePrefs.GetDynUpGoingUpDivider(); m_iDynUpGoingDownDivider = thePrefs.GetDynUpGoingDownDivider(); m_iDynUpNumberOfPings = thePrefs.GetDynUpNumberOfPings(); m_bA4AFSaveCpu = thePrefs.GetA4AFSaveCpu(); CPropertyPage::OnInitDialog(); InitWindowStyles(this); m_ctrlTreeOptions.SetItemHeight(m_ctrlTreeOptions.GetItemHeight() + 2); m_iFileBufferSize = thePrefs.m_iFileBufferSize; m_ctlFileBuffSize.SetRange(16, 1024+512, TRUE); int iMin, iMax; m_ctlFileBuffSize.GetRange(iMin, iMax); m_ctlFileBuffSize.SetPos(m_iFileBufferSize/1024); int iPage = 128; for (int i = ((iMin+iPage-1)/iPage)*iPage; i < iMax; i += iPage) m_ctlFileBuffSize.SetTic(i); m_ctlFileBuffSize.SetPageSize(iPage); m_iQueueSize = thePrefs.m_iQueueSize; m_ctlQueueSize.SetRange(20, 100, TRUE); m_ctlQueueSize.SetPos(m_iQueueSize/100); m_ctlQueueSize.SetTicFreq(10); m_ctlQueueSize.SetPageSize(10); Localize(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
BOOL CPPgTweaks::OnApply() { // if prop page is closed by pressing ENTER we have to explicitly commit any possibly pending // data from an open edit control m_ctrlTreeOptions.HandleChildControlLosingFocus(); if (!UpdateData()) return FALSE; thePrefs.SetMaxConsPerFive(m_iMaxConnPerFive ? m_iMaxConnPerFive : DFLT_MAXCONPERFIVE); theApp.scheduler->original_cons5s = thePrefs.GetMaxConperFive(); thePrefs.SetMaxHalfConnections(m_iMaxHalfOpen ? m_iMaxHalfOpen : DFLT_MAXHALFOPEN); thePrefs.m_bConditionalTCPAccept = m_bConditionalTCPAccept; if (HaveEd2kRegAccess() && thePrefs.AutoTakeED2KLinks() != m_bAutoTakeEd2kLinks) { thePrefs.autotakeed2klinks = m_bAutoTakeEd2kLinks; if (thePrefs.AutoTakeED2KLinks()) Ask4RegFix(false, true, false); else RevertReg(); } if (!thePrefs.log2disk && m_bLog2Disk) theLog.Open(); else if (thePrefs.log2disk && !m_bLog2Disk) theLog.Close(); thePrefs.log2disk = m_bLog2Disk; if (thePrefs.GetEnableVerboseOptions()) { if (!thePrefs.GetDebug2Disk() && m_bVerbose && m_bDebug2Disk) theVerboseLog.Open(); else if (thePrefs.GetDebug2Disk() && (!m_bVerbose || !m_bDebug2Disk)) theVerboseLog.Close(); thePrefs.debug2disk = m_bDebug2Disk; thePrefs.m_bDebugSourceExchange = m_bDebugSourceExchange; thePrefs.m_bLogBannedClients = m_bLogBannedClients; thePrefs.m_bLogRatingDescReceived = m_bLogRatingDescReceived; thePrefs.m_bLogSecureIdent = m_bLogSecureIdent; thePrefs.m_bLogFilteredIPs = m_bLogFilteredIPs; thePrefs.m_bLogFileSaving = m_bLogFileSaving; thePrefs.m_bLogA4AF = m_bLogA4AF; thePrefs.m_bLogUlDlEvents = m_bLogUlDlEvents; //==> Emulate others by WiZaRd & Spike [shadow2004] #ifdef EMULATE thePrefs.m_bLogEmulator = m_bLogEmulator; #endif //<== Emulate others by WiZaRd & Spike [shadow2004] thePrefs.m_byLogLevel = 5 - m_iLogLevel; thePrefs.m_bVerbose = m_bVerbose; // store after related options were stored! } thePrefs.m_bCreditSystem = m_bCreditSystem; thePrefs.m_iCommitFiles = m_iCommitFiles; thePrefs.m_iExtractMetaData = m_iExtractMetaData; thePrefs.filterLANIPs = m_bFilterLANIPs; thePrefs.m_iFileBufferSize = m_iFileBufferSize; thePrefs.m_iQueueSize = m_iQueueSize; if (thePrefs.m_bExtControls != m_bExtControls) { thePrefs.m_bExtControls = m_bExtControls; //==> XPMenu [shadow2004] #ifndef XPMEN theApp.emuledlg->transferwnd->downloadlistctrl.CreateMenues(); #endif //<== XPMenu [shadow2004] theApp.emuledlg->searchwnd->CreateMenus(); theApp.emuledlg->sharedfileswnd->sharedfilesctrl.CreateMenues(); } thePrefs.m_dwServerKeepAliveTimeout = m_uServerKeepAliveTimeout * 60000; thePrefs.m_bSparsePartFiles = m_bSparsePartFiles; thePrefs.checkDiskspace = m_bCheckDiskspace; thePrefs.m_uMinFreeDiskSpace = (UINT)(m_fMinFreeDiskSpaceMB * (1024 * 1024)); if (thePrefs.GetYourHostname() != m_sYourHostname) { thePrefs.SetYourHostname(m_sYourHostname); theApp.emuledlg->serverwnd->UpdateMyInfo(); } thePrefs.m_bOpenPortsOnStartUp = m_bFirewallStartup; thePrefs.m_bPeerCacheEnabled = !m_bDisablePeerCache; thePrefs.m_bDynUpEnabled = m_bDynUpEnabled; thePrefs.minupload = m_iDynUpMinUpload; thePrefs.m_iDynUpPingTolerance = m_iDynUpPingTolerance; thePrefs.m_iDynUpPingToleranceMilliseconds = m_iDynUpPingToleranceMilliseconds; thePrefs.m_bDynUpUseMillisecondPingTolerance = (m_iDynUpRadioPingTolerance == 1); thePrefs.m_iDynUpGoingUpDivider = m_iDynUpGoingUpDivider; thePrefs.m_iDynUpGoingDownDivider = m_iDynUpGoingDownDivider; thePrefs.m_iDynUpNumberOfPings = m_iDynUpNumberOfPings; thePrefs.m_bA4AFSaveCpu = m_bA4AFSaveCpu; if (thePrefs.GetEnableVerboseOptions()) { theApp.emuledlg->serverwnd->ToggleDebugWindow(); theApp.emuledlg->serverwnd->UpdateLogTabSelection(); } theApp.downloadqueue->CheckDiskspace(); SetModified(FALSE); return CPropertyPage::OnApply(); }
void CPPgTweaks::DoDataExchange(CDataExchange* pDX) { CPropertyPage::DoDataExchange(pDX); DDX_Control(pDX, IDC_FILEBUFFERSIZE, m_ctlFileBuffSize); DDX_Control(pDX, IDC_QUEUESIZE, m_ctlQueueSize); DDX_Control(pDX, IDC_EXT_OPTS, m_ctrlTreeOptions); if (!m_bInitializedTreeOpts) { int iImgBackup = 8; // default icon int iImgLog = 8; int iImgDynyp = 8; int iImgConnection = 8; int iImgA4AF = 8; int iImgMetaData = 8; CImageList* piml = m_ctrlTreeOptions.GetImageList(TVSIL_NORMAL); if (piml){ iImgBackup = piml->Add(CTempIconLoader(_T("Harddisk"))); iImgLog = piml->Add(CTempIconLoader(_T("Log"))); iImgDynyp = piml->Add(CTempIconLoader(_T("upload"))); iImgConnection= piml->Add(CTempIconLoader(_T("connection"))); iImgA4AF = piml->Add(CTempIconLoader(_T("Download"))); iImgMetaData = piml->Add(CTempIconLoader(_T("MediaInfo"))); } ///////////////////////////////////////////////////////////////////////////// // TCP/IP group // m_htiTCPGroup = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_TCPIP_CONNS), iImgConnection, TVI_ROOT); //==> Bold Categories by $icK$ [shadow2004] m_ctrlTreeOptions.SetItemState(m_htiTCPGroup, TVIS_BOLD, TVIS_BOLD); //<== Bold Categories by $icK$ [shadow2004] m_htiMaxCon5Sec = m_ctrlTreeOptions.InsertItem(GetResString(IDS_MAXCON5SECLABEL), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiTCPGroup); m_ctrlTreeOptions.AddEditBox(m_htiMaxCon5Sec, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiMaxHalfOpen = m_ctrlTreeOptions.InsertItem(GetResString(IDS_MAXHALFOPENCONS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiTCPGroup); m_ctrlTreeOptions.AddEditBox(m_htiMaxHalfOpen, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiConditionalTCPAccept = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_CONDTCPACCEPT), m_htiTCPGroup, m_bConditionalTCPAccept); m_htiServerKeepAliveTimeout = m_ctrlTreeOptions.InsertItem(GetResString(IDS_SERVERKEEPALIVETIMEOUT), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiTCPGroup); m_ctrlTreeOptions.AddEditBox(m_htiServerKeepAliveTimeout, RUNTIME_CLASS(CNumTreeOptionsEdit)); ///////////////////////////////////////////////////////////////////////////// // Miscellaneous group // m_htiAutoTakeEd2kLinks = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_AUTOTAKEED2KLINKS), TVI_ROOT, m_bAutoTakeEd2kLinks); m_htiCreditSystem = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_USECREDITSYSTEM), TVI_ROOT, m_bCreditSystem); m_htiFirewallStartup = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_FO_PREF_STARTUP), TVI_ROOT, m_bFirewallStartup); m_htiFilterLANIPs = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_PW_FILTER), TVI_ROOT, m_bFilterLANIPs); m_htiExtControls = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_SHOWEXTSETTINGS), TVI_ROOT, m_bExtControls); m_htiA4AFSaveCpu = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_A4AF_SAVE_CPU), TVI_ROOT, m_bA4AFSaveCpu); // ZZ:DownloadManager m_htiYourHostname = m_ctrlTreeOptions.InsertItem(GetResString(IDS_YOURHOSTNAME), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, TVI_ROOT); m_ctrlTreeOptions.AddEditBox(m_htiYourHostname, RUNTIME_CLASS(CTreeOptionsEditEx)); m_htiDisablePeerCache = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DISABLEPEERACHE), TVI_ROOT, m_bDisablePeerCache); ///////////////////////////////////////////////////////////////////////////// // File related group // m_htiSparsePartFiles = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_SPARSEPARTFILES), TVI_ROOT, m_bSparsePartFiles); m_htiCheckDiskspace = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_CHECKDISKSPACE), TVI_ROOT, m_bCheckDiskspace); m_htiMinFreeDiskSpace = m_ctrlTreeOptions.InsertItem(GetResString(IDS_MINFREEDISKSPACE), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiCheckDiskspace); m_ctrlTreeOptions.AddEditBox(m_htiMinFreeDiskSpace, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiCommit = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_COMMITFILES), iImgBackup, TVI_ROOT); //==> Bold Categories by $icK$ [shadow2004] m_ctrlTreeOptions.SetItemState(m_htiCommit, TVIS_BOLD, TVIS_BOLD); //<== Bold Categories by $icK$ [shadow2004] m_htiCommitNever = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_NEVER), m_htiCommit, m_iCommitFiles == 0); m_htiCommitOnShutdown = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_ONSHUTDOWN), m_htiCommit, m_iCommitFiles == 1); m_htiCommitAlways = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_ALWAYS), m_htiCommit, m_iCommitFiles == 2); m_htiExtractMetaData = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_EXTRACT_META_DATA), iImgMetaData, TVI_ROOT); //==> Bold Categories by $icK$ [shadow2004] m_ctrlTreeOptions.SetItemState(m_htiExtractMetaData, TVIS_BOLD, TVIS_BOLD); //<== Bold Categories by $icK$ [shadow2004] m_htiExtractMetaDataNever = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_NEVER), m_htiExtractMetaData, m_iExtractMetaData == 0); m_htiExtractMetaDataID3Lib = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_META_DATA_ID3LIB), m_htiExtractMetaData, m_iExtractMetaData == 1); //m_htiExtractMetaDataMediaDet = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_META_DATA_MEDIADET), m_htiExtractMetaData, m_iExtractMetaData == 2); ///////////////////////////////////////////////////////////////////////////// // Logging group // m_htiLog2Disk = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG2DISK), TVI_ROOT, m_bLog2Disk); if (thePrefs.GetEnableVerboseOptions()) { m_htiVerboseGroup = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_VERBOSE), iImgLog, TVI_ROOT); //==> Bold Categories by $icK$ [shadow2004] m_ctrlTreeOptions.SetItemState(m_htiVerboseGroup, TVIS_BOLD, TVIS_BOLD); //<== Bold Categories by $icK$ [shadow2004] m_htiVerbose = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_ENABLED), m_htiVerboseGroup, m_bVerbose); m_htiLogLevel = m_ctrlTreeOptions.InsertItem(GetResString(IDS_LOG_LEVEL), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiVerboseGroup); m_ctrlTreeOptions.AddEditBox(m_htiLogLevel, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDebug2Disk = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG2DISK), m_htiVerboseGroup, m_bDebug2Disk); m_htiDebugSourceExchange = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DEBUG_SOURCE_EXCHANGE), m_htiVerboseGroup, m_bDebugSourceExchange); m_htiLogBannedClients = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_BANNED_CLIENTS), m_htiVerboseGroup, m_bLogBannedClients); m_htiLogRatingDescReceived = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_RATING_RECV), m_htiVerboseGroup, m_bLogRatingDescReceived); m_htiLogSecureIdent = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_SECURE_IDENT), m_htiVerboseGroup, m_bLogSecureIdent); m_htiLogFilteredIPs = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_FILTERED_IPS), m_htiVerboseGroup, m_bLogFilteredIPs); m_htiLogFileSaving = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_FILE_SAVING), m_htiVerboseGroup, m_bLogFileSaving); m_htiLogA4AF = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_A4AF), m_htiVerboseGroup, m_bLogA4AF); // ZZ:DownloadManager m_htiLogUlDlEvents = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_ULDL_EVENTS), m_htiVerboseGroup, m_bLogUlDlEvents); //==> Emulate others by WiZaRd & Spike [shadow2004] #ifdef EMULATE m_htiLogEmulator = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOGEMULATOR), m_htiVerboseGroup, m_bLogEmulator); #endif //<== Emulate others by WiZaRd & Spike [shadow2004] } ///////////////////////////////////////////////////////////////////////////// // USS group // m_htiDynUp = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_DYNUP), iImgDynyp, TVI_ROOT); //==> Bold Categories by $icK$ [shadow2004] m_ctrlTreeOptions.SetItemState(m_htiDynUp, TVIS_BOLD, TVIS_BOLD); //<== Bold Categories by $icK$ [shadow2004] m_htiDynUpEnabled = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DYNUPENABLED), m_htiDynUp, m_bDynUpEnabled); m_htiDynUpMinUpload = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_MINUPLOAD), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpMinUpload, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpPingTolerance = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_PINGTOLERANCE), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpPingTolerance, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpPingToleranceMilliseconds = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_PINGTOLERANCE_MS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpPingToleranceMilliseconds, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpPingToleranceGroup = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_DYNUP_RADIO_PINGTOLERANCE_HEADER), iImgDynyp, m_htiDynUp); m_htiDynUpRadioPingTolerance = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_DYNUP_RADIO_PINGTOLERANCE_PERCENT), m_htiDynUpPingToleranceGroup, m_iDynUpRadioPingTolerance == 0); m_htiDynUpRadioPingToleranceMilliseconds = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_DYNUP_RADIO_PINGTOLERANCE_MS), m_htiDynUpPingToleranceGroup, m_iDynUpRadioPingTolerance == 1); m_htiDynUpGoingUpDivider = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_GOINGUPDIVIDER), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpGoingUpDivider, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpGoingDownDivider = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_GOINGDOWNDIVIDER), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpGoingDownDivider, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpNumberOfPings = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_NUMBEROFPINGS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpNumberOfPings, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_ctrlTreeOptions.Expand(m_htiTCPGroup, TVE_EXPAND); if (m_htiVerboseGroup) m_ctrlTreeOptions.Expand(m_htiVerboseGroup, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiCommit, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiCheckDiskspace, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiDynUp, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiDynUpPingToleranceGroup, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiExtractMetaData, TVE_EXPAND); m_ctrlTreeOptions.SendMessage(WM_VSCROLL, SB_TOP); m_bInitializedTreeOpts = true; } ///////////////////////////////////////////////////////////////////////////// // TCP/IP group // DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiMaxCon5Sec, m_iMaxConnPerFive); DDV_MinMaxInt(pDX, m_iMaxConnPerFive, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiMaxHalfOpen, m_iMaxHalfOpen); DDV_MinMaxInt(pDX, m_iMaxHalfOpen, 1, INT_MAX); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiConditionalTCPAccept, m_bConditionalTCPAccept); DDX_Text(pDX, IDC_EXT_OPTS, m_htiServerKeepAliveTimeout, m_uServerKeepAliveTimeout); ///////////////////////////////////////////////////////////////////////////// // Miscellaneous group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiAutoTakeEd2kLinks, m_bAutoTakeEd2kLinks); m_ctrlTreeOptions.SetCheckBoxEnable(m_htiAutoTakeEd2kLinks, HaveEd2kRegAccess()); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiCreditSystem, m_bCreditSystem); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiFirewallStartup, m_bFirewallStartup); m_ctrlTreeOptions.SetCheckBoxEnable(m_htiFirewallStartup, thePrefs.GetWindowsVersion() == _WINVER_XP_); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiFilterLANIPs, m_bFilterLANIPs); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiExtControls, m_bExtControls); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiA4AFSaveCpu, m_bA4AFSaveCpu); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiYourHostname, m_sYourHostname); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDisablePeerCache, m_bDisablePeerCache); ///////////////////////////////////////////////////////////////////////////// // File related group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiSparsePartFiles, m_bSparsePartFiles); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiCheckDiskspace, m_bCheckDiskspace); DDX_Text(pDX, IDC_EXT_OPTS, m_htiMinFreeDiskSpace, m_fMinFreeDiskSpaceMB); DDV_MinMaxFloat(pDX, m_fMinFreeDiskSpaceMB, 0.0, UINT_MAX / (1024*1024)); DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiCommit, m_iCommitFiles); DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiExtractMetaData, m_iExtractMetaData); ///////////////////////////////////////////////////////////////////////////// // Logging group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLog2Disk, m_bLog2Disk); if (m_htiLogLevel){ DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiLogLevel, m_iLogLevel); DDV_MinMaxInt(pDX, m_iLogLevel, 1, 5); } if (m_htiVerbose) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiVerbose, m_bVerbose); if (m_htiDebug2Disk) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDebug2Disk, m_bDebug2Disk); if (m_htiDebug2Disk) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiDebug2Disk, m_bVerbose); if (m_htiDebugSourceExchange) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDebugSourceExchange, m_bDebugSourceExchange); if (m_htiDebugSourceExchange) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiDebugSourceExchange, m_bVerbose); if (m_htiLogBannedClients) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogBannedClients, m_bLogBannedClients); if (m_htiLogBannedClients) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogBannedClients, m_bVerbose); if (m_htiLogRatingDescReceived) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogRatingDescReceived, m_bLogRatingDescReceived); if (m_htiLogRatingDescReceived) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogRatingDescReceived, m_bVerbose); if (m_htiLogSecureIdent) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogSecureIdent, m_bLogSecureIdent); if (m_htiLogSecureIdent) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogSecureIdent, m_bVerbose); if (m_htiLogFilteredIPs) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogFilteredIPs, m_bLogFilteredIPs); if (m_htiLogFilteredIPs) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogFilteredIPs, m_bVerbose); if (m_htiLogFileSaving) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogFileSaving, m_bLogFileSaving); if (m_htiLogFileSaving) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogFileSaving, m_bVerbose); if (m_htiLogA4AF) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogA4AF, m_bLogA4AF); if (m_htiLogA4AF) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogA4AF, m_bVerbose); if (m_htiLogUlDlEvents) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogUlDlEvents, m_bLogUlDlEvents); if (m_htiLogUlDlEvents) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogUlDlEvents, m_bVerbose); //==> Emulate others by WiZaRd & Spike [shadow2004] #ifdef EMULATE if (m_htiLogEmulator) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogEmulator, m_bLogEmulator); if (m_htiLogEmulator) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogEmulator, m_bVerbose); #endif //<== Emulate others by WiZaRd & Spike [shadow2004] ///////////////////////////////////////////////////////////////////////////// // USS group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDynUpEnabled, m_bDynUpEnabled); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpMinUpload, m_iDynUpMinUpload); DDV_MinMaxInt(pDX, m_iDynUpMinUpload, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpPingTolerance, m_iDynUpPingTolerance); DDV_MinMaxInt(pDX, m_iDynUpPingTolerance, 100, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpPingToleranceMilliseconds, m_iDynUpPingToleranceMilliseconds); DDV_MinMaxInt(pDX, m_iDynUpPingTolerance, 1, INT_MAX); DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiDynUpPingToleranceGroup, m_iDynUpRadioPingTolerance); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpGoingUpDivider, m_iDynUpGoingUpDivider); DDV_MinMaxInt(pDX, m_iDynUpGoingUpDivider, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpGoingDownDivider, m_iDynUpGoingDownDivider); DDV_MinMaxInt(pDX, m_iDynUpGoingDownDivider, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpNumberOfPings, m_iDynUpNumberOfPings); DDV_MinMaxInt(pDX, m_iDynUpNumberOfPings, 1, INT_MAX); }
BOOL CPPgTweaks::OnApply() { // if prop page is closed by pressing ENTER we have to explicitly commit any possibly pending // data from an open edit control m_ctrlTreeOptions.HandleChildControlLosingFocus(); if (!UpdateData()) return FALSE; thePrefs.SetMaxConsPerFive(m_iMaxConnPerFive ? m_iMaxConnPerFive : DFLT_MAXCONPERFIVE); theApp.scheduler->original_cons5s = thePrefs.GetMaxConperFive(); thePrefs.SetMaxHalfConnections(m_iMaxHalfOpen ? m_iMaxHalfOpen : DFLT_MAXHALFOPEN); thePrefs.m_bConditionalTCPAccept = m_bConditionalTCPAccept; if (HaveEd2kRegAccess() && thePrefs.AutoTakeED2KLinks() != m_bAutoTakeEd2kLinks) { thePrefs.autotakeed2klinks = m_bAutoTakeEd2kLinks; if (thePrefs.AutoTakeED2KLinks()) Ask4RegFix(false, true, false); else RevertReg(); } if (!thePrefs.log2disk && m_bLog2Disk) theLog.Open(); else if (thePrefs.log2disk && !m_bLog2Disk) theLog.Close(); thePrefs.log2disk = m_bLog2Disk; if (thePrefs.GetEnableVerboseOptions()) { if (!thePrefs.GetDebug2Disk() && m_bVerbose && m_bDebug2Disk) theVerboseLog.Open(); else if (thePrefs.GetDebug2Disk() && (!m_bVerbose || !m_bDebug2Disk)) theVerboseLog.Close(); thePrefs.debug2disk = m_bDebug2Disk; thePrefs.m_bDebugSourceExchange = m_bDebugSourceExchange; thePrefs.m_bLogBannedClients = m_bLogBannedClients; thePrefs.m_bLogRatingDescReceived = m_bLogRatingDescReceived; thePrefs.m_bLogSecureIdent = m_bLogSecureIdent; thePrefs.m_bLogFilteredIPs = m_bLogFilteredIPs; thePrefs.m_bLogFileSaving = m_bLogFileSaving; thePrefs.m_bLogA4AF = m_bLogA4AF; thePrefs.m_bLogUlDlEvents = m_bLogUlDlEvents; thePrefs.m_byLogLevel = 5 - m_iLogLevel; thePrefs.m_bVerbose = m_bVerbose; // store after related options were stored! } thePrefs.m_bCreditSystem = m_bCreditSystem; thePrefs.m_iCommitFiles = m_iCommitFiles; thePrefs.m_iExtractMetaData = m_iExtractMetaData; thePrefs.filterLANIPs = m_bFilterLANIPs; thePrefs.m_iFileBufferSize = m_iFileBufferSize; thePrefs.m_iQueueSize = m_iQueueSize; if (thePrefs.m_bExtControls != m_bExtControls) { thePrefs.m_bExtControls = m_bExtControls; theApp.emuledlg->transferwnd->downloadlistctrl.CreateMenues(); theApp.emuledlg->searchwnd->CreateMenus(); theApp.emuledlg->sharedfileswnd->sharedfilesctrl.CreateMenues(); } thePrefs.m_dwServerKeepAliveTimeout = m_uServerKeepAliveTimeout * 60000; thePrefs.m_bSparsePartFiles = m_bSparsePartFiles; thePrefs.m_bAllocFull= m_bFullAlloc; thePrefs.checkDiskspace = m_bCheckDiskspace; thePrefs.m_uMinFreeDiskSpace = (UINT)(m_fMinFreeDiskSpaceMB * (1024 * 1024)); if (thePrefs.GetYourHostname() != m_sYourHostname) { thePrefs.SetYourHostname(m_sYourHostname); theApp.emuledlg->serverwnd->UpdateMyInfo(); } thePrefs.m_bOpenPortsOnStartUp = m_bFirewallStartup; thePrefs.m_bPeerCacheEnabled = !m_bDisablePeerCache; //upnp_start - Added by thilon on 2006.09.24, for UPnP if(thePrefs.GetUPnPNat()!=m_iUPnPNat || thePrefs.GetUPnPNatTryRandom() != m_iUPnPTryRandom) { AfxMessageBox(GetResString(IDS_UPNP_MESSAGE)); } thePrefs.SetUPnPNat( m_iUPnPNat ); thePrefs.SetUPnPNatTryRandom( m_iUPnPTryRandom ); //upnp_end thePrefs.m_bDynUpEnabled = m_bDynUpEnabled; thePrefs.minupload = (uint16)m_iDynUpMinUpload; thePrefs.m_iDynUpPingTolerance = m_iDynUpPingTolerance; thePrefs.m_iDynUpPingToleranceMilliseconds = m_iDynUpPingToleranceMilliseconds; thePrefs.m_bDynUpUseMillisecondPingTolerance = (m_iDynUpRadioPingTolerance == 1); thePrefs.m_iDynUpGoingUpDivider = m_iDynUpGoingUpDivider; thePrefs.m_iDynUpGoingDownDivider = m_iDynUpGoingDownDivider; thePrefs.m_iDynUpNumberOfPings = m_iDynUpNumberOfPings; thePrefs.m_bAutomaticArcPreviewStart = !m_bAutoArchDisable; thePrefs.ChangeUserDirMode(m_iShareeMule); //Added by thilon on 2007.05.25 //added by Chocobo //国家名称显示相关 //2006.07.28 //EastShare Start - added by AndCycle, IP to Country thePrefs.m_iIP2CountryNameMode = (IP2CountryNameSelection)m_iIP2CountryName; thePrefs.m_bIP2CountryShowFlag = m_bIP2CountryShowFlag != 0; theApp.ip2country->Load(); theApp.ip2country->Refresh();//refresh passive windows //EastShare End - added by AndCycle, IP to Country thePrefs.m_uUploadClients = m_uUploadClients;//Added by thilon on 2006.08.08, 固定上传线程 thePrefs.m_bA4AFSaveCpu = m_bA4AFSaveCpu; if (thePrefs.GetEnableVerboseOptions()) { theApp.emuledlg->serverwnd->ToggleDebugWindow(); theApp.emuledlg->serverwnd->UpdateLogTabSelection(); } theApp.downloadqueue->CheckDiskspace(); // 添加修改XP连接数 added by thilon at 2006.40.20, Changed on 2007.06.06 if(m_betterSP2.DetectSystemInformation()) { if(m_iTCPIPInit != m_iMaxHalfOpen) { if(m_betterSP2.ChangeTCPIPValue(m_iMaxHalfOpen)) { ::MessageBox(this->m_hWnd, GetResString(IDS_TCPIPCHANGED), _T("eMule"), MB_OK); m_iTCPIPInit = m_iMaxHalfOpen; } } } else { thePrefs.SetMaxHalfConnections(m_iMaxHalfOpen ? m_iMaxHalfOpen : DFLT_MAXHALFOPEN); } SetModified(FALSE); return CPropertyPage::OnApply(); }
BOOL CPPgTweaks::OnInitDialog() { /*说明:Tweaks对话框初始化时,检测系统是不是XPSP2,同时检测tcpip.sys的大小和版本,来确定是否修改 当条件满足时,eMule的最大半连接数,可以修改,并且该数字就为tcpip的最大连接数 Changed on 2007.06.06 */ if(m_betterSP2.DetectSystemInformation()) { m_iTCPIPInit = theApp.GetTCPIPVaule(); //added by thilon on 2006.04.20 条件满足,直接赋值,这里通过启动eMule时,获得tcpip.sys文件里的连接数 m_iMaxHalfOpen = m_iTCPIPInit; //将获得的连接数直接赋值给最大半开连接数 } else { m_iMaxHalfOpen = thePrefs.GetMaxHalfConnections(); } m_iMaxConnPerFive = thePrefs.GetMaxConperFive(); m_bConditionalTCPAccept = thePrefs.GetConditionalTCPAccept(); m_bAutoTakeEd2kLinks = HaveEd2kRegAccess() ? thePrefs.AutoTakeED2KLinks() : 0; if (thePrefs.GetEnableVerboseOptions()) { m_bVerbose = thePrefs.m_bVerbose; m_bDebug2Disk = thePrefs.debug2disk; // do *not* use the according 'Get...' function here! m_bDebugSourceExchange = thePrefs.m_bDebugSourceExchange; // do *not* use the according 'Get...' function here! m_bLogBannedClients = thePrefs.m_bLogBannedClients; // do *not* use the according 'Get...' function here! m_bLogRatingDescReceived = thePrefs.m_bLogRatingDescReceived; // do *not* use the according 'Get...' function here! m_bLogSecureIdent = thePrefs.m_bLogSecureIdent; // do *not* use the according 'Get...' function here! m_bLogFilteredIPs = thePrefs.m_bLogFilteredIPs; // do *not* use the according 'Get...' function here! m_bLogFileSaving = thePrefs.m_bLogFileSaving; // do *not* use the according 'Get...' function here! m_bLogA4AF = thePrefs.m_bLogA4AF; // do *not* use the according 'Get...' function here! // ZZ:DownloadManager m_bLogUlDlEvents = thePrefs.m_bLogUlDlEvents; m_iLogLevel = 5 - thePrefs.m_byLogLevel; } m_bLog2Disk = thePrefs.log2disk; m_bCreditSystem = thePrefs.m_bCreditSystem; m_iCommitFiles = thePrefs.m_iCommitFiles; m_iExtractMetaData = thePrefs.m_iExtractMetaData; m_bFilterLANIPs = thePrefs.filterLANIPs; m_bExtControls = thePrefs.m_bExtControls; m_uServerKeepAliveTimeout = thePrefs.m_dwServerKeepAliveTimeout / 60000; m_bSparsePartFiles = thePrefs.m_bSparsePartFiles; m_bFullAlloc= thePrefs.m_bAllocFull; m_bCheckDiskspace = thePrefs.checkDiskspace; m_fMinFreeDiskSpaceMB = (float)(thePrefs.m_uMinFreeDiskSpace / (1024.0 * 1024.0)); m_sYourHostname = thePrefs.GetYourHostname(); m_bFirewallStartup = ((thePrefs.GetWindowsVersion() == _WINVER_XP_) ? thePrefs.m_bOpenPortsOnStartUp : 0); m_bDisablePeerCache = !thePrefs.m_bPeerCacheEnabled; m_bAutoArchDisable = !thePrefs.m_bAutomaticArcPreviewStart; m_bDynUpEnabled = thePrefs.m_bDynUpEnabled; m_iDynUpMinUpload = thePrefs.GetMinUpload(); m_iDynUpPingTolerance = thePrefs.GetDynUpPingTolerance(); m_iDynUpPingToleranceMilliseconds = thePrefs.GetDynUpPingToleranceMilliseconds(); m_iDynUpRadioPingTolerance = thePrefs.IsDynUpUseMillisecondPingTolerance()?1:0; m_iDynUpGoingUpDivider = thePrefs.GetDynUpGoingUpDivider(); m_iDynUpGoingDownDivider = thePrefs.GetDynUpGoingDownDivider(); m_iDynUpNumberOfPings = thePrefs.GetDynUpNumberOfPings(); //EastShare Start - added by AndCycle, IP to Country m_iIP2CountryName = thePrefs.GetIP2CountryNameMode(); m_bIP2CountryShowFlag = thePrefs.IsIP2CountryShowFlag(); //EastShare End - added by AndCycle, IP to Country //Added by thilon on 2006.08.08, 固定上传线程 m_uUploadClients = thePrefs.m_uUploadClients; //upnp_start - Added by thilon on 2006.09.24, for UPnP m_iUPnPNat = thePrefs.GetUPnPNat(); m_iUPnPTryRandom = thePrefs.GetUPnPNatTryRandom(); //upnp_end m_iShareeMule = thePrefs.m_nCurrentUserDirMode; //Added by thilon on 2007.05.25 m_bA4AFSaveCpu = thePrefs.GetA4AFSaveCpu(); m_ctrlTreeOptions.SetImageListColorFlags(theApp.m_iDfltImageListColorFlags); CPropertyPage::OnInitDialog(); InitWindowStyles(this); m_ctrlTreeOptions.SetItemHeight(m_ctrlTreeOptions.GetItemHeight() + 2); m_iFileBufferSize = thePrefs.m_iFileBufferSize; #ifdef _SUPPORT_MEMPOOL m_ctlFileBuffSize.SetRange(1, 1024 /*+ 512*/, TRUE); // Change 1024 + 512 to 1024 and Change 16 to 1 SearchDream@2006/12/21 #else m_ctlFileBuffSize.SetRange(16, 1024 + 512, TRUE); #endif int iMin, iMax; m_ctlFileBuffSize.GetRange(iMin, iMax); #ifdef _SUPPORT_MEMPOOL m_ctlFileBuffSize.SetPos(m_iFileBufferSize/(1024 * 32)); // Change 1024 to 1024 * 32 SearchDream@2006/01/10 #else m_ctlFileBuffSize.SetPos(m_iFileBufferSize/(1024)); #endif int iPage = 128; for (int i = ((iMin+iPage-1)/iPage)*iPage; i < iMax; i += iPage) m_ctlFileBuffSize.SetTic(i); m_ctlFileBuffSize.SetPageSize(iPage); m_iQueueSize = thePrefs.m_iQueueSize; m_ctlQueueSize.SetRange(20, 100, TRUE); m_ctlQueueSize.SetPos(m_iQueueSize/100); m_ctlQueueSize.SetTicFreq(10); m_ctlQueueSize.SetPageSize(10); Localize(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
void CPPgTweaks::DoDataExchange(CDataExchange* pDX) { CPropertyPage::DoDataExchange(pDX); DDX_Control(pDX, IDC_FILEBUFFERSIZE, m_ctlFileBuffSize); DDX_Control(pDX, IDC_QUEUESIZE, m_ctlQueueSize); DDX_Control(pDX, IDC_EXT_OPTS, m_ctrlTreeOptions); if (!m_bInitializedTreeOpts) { int iImgIP2Country = 8; //EastShare - added by AndCycle, IP to Country int iImgBackup = 8; // default icon int iImgLog = 8; int iImgDynyp = 8; int iImgConnection = 8; int iImgA4AF = 8; int iImgMetaData = 8; int iImgShareeMule = 8; //Added by thilon on 2007.05.25 CImageList* piml = m_ctrlTreeOptions.GetImageList(TVSIL_NORMAL); if (piml){ iImgBackup = piml->Add(CTempIconLoader(_T("Harddisk"))); iImgLog = piml->Add(CTempIconLoader(_T("Log"))); iImgDynyp = piml->Add(CTempIconLoader(_T("upload"))); iImgConnection= piml->Add(CTempIconLoader(_T("connection"))); iImgIP2Country = piml->Add(CTempIconLoader(_T("SEARCHMETHOD_GLOBAL"))); //EastShare - added by AndCycle, IP to Country iImgA4AF = piml->Add(CTempIconLoader(_T("Download"))); iImgMetaData = piml->Add(CTempIconLoader(_T("MediaInfo"))); iImgShareeMule =piml->Add(CTempIconLoader(_T("viewfiles"))); //Added by thilon on 2007.05.25 } ///////////////////////////////////////////////////////////////////////////// // TCP/IP group // m_htiTCPGroup = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_TCPIP_CONNS), iImgConnection, TVI_ROOT); m_htiMaxCon5Sec = m_ctrlTreeOptions.InsertItem(GetResString(IDS_MAXCON5SECLABEL), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiTCPGroup); m_ctrlTreeOptions.AddEditBox(m_htiMaxCon5Sec, RUNTIME_CLASS(CNumTreeOptionsEdit)); //检测系统,成功可修改最大半连接数,失败不能修改最大半连接数 added by thilon on 2006.08.07 , Changed on 2007.06.06 if(m_betterSP2.DetectSystemInformation()) { m_htiMaxHalfOpen = m_ctrlTreeOptions.InsertItem(GetResString(IDS_MAXHALFOPENCONS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiTCPGroup); m_ctrlTreeOptions.AddEditBox(m_htiMaxHalfOpen, RUNTIME_CLASS(CNumTreeOptionsEdit)); } m_htiConditionalTCPAccept = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_CONDTCPACCEPT), m_htiTCPGroup, m_bConditionalTCPAccept); m_htiServerKeepAliveTimeout = m_ctrlTreeOptions.InsertItem(GetResString(IDS_SERVERKEEPALIVETIMEOUT), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiTCPGroup); m_ctrlTreeOptions.AddEditBox(m_htiServerKeepAliveTimeout, RUNTIME_CLASS(CNumTreeOptionsEdit)); ///////////////////////////////////////////////////////////////////////////// // Miscellaneous group // m_htiAutoTakeEd2kLinks = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_AUTOTAKEED2KLINKS), TVI_ROOT, m_bAutoTakeEd2kLinks); m_htiCreditSystem = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_USECREDITSYSTEM), TVI_ROOT, m_bCreditSystem); m_htiFirewallStartup = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_FO_PREF_STARTUP), TVI_ROOT, m_bFirewallStartup); m_htiFilterLANIPs = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_PW_FILTER), TVI_ROOT, m_bFilterLANIPs); m_htiExtControls = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_SHOWEXTSETTINGS), TVI_ROOT, m_bExtControls); m_htiA4AFSaveCpu = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_A4AF_SAVE_CPU), TVI_ROOT, m_bA4AFSaveCpu); // ZZ:DownloadManager m_htiAutoArch = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DISABLE_AUTOARCHPREV), TVI_ROOT, m_bAutoArchDisable); m_htiYourHostname = m_ctrlTreeOptions.InsertItem(GetResString(IDS_YOURHOSTNAME), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, TVI_ROOT); m_ctrlTreeOptions.AddEditBox(m_htiYourHostname, RUNTIME_CLASS(CTreeOptionsEditEx)); m_htiDisablePeerCache = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DISABLEPEERACHE), TVI_ROOT, m_bDisablePeerCache); ///////////////////////////////////////////////////////////////////////////// // File related group // m_htiSparsePartFiles = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_SPARSEPARTFILES), TVI_ROOT, m_bSparsePartFiles); m_htiFullAlloc = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_FULLALLOC), TVI_ROOT, m_bFullAlloc); m_htiCheckDiskspace = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_CHECKDISKSPACE), TVI_ROOT, m_bCheckDiskspace); m_htiMinFreeDiskSpace = m_ctrlTreeOptions.InsertItem(GetResString(IDS_MINFREEDISKSPACE), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiCheckDiskspace); m_ctrlTreeOptions.AddEditBox(m_htiMinFreeDiskSpace, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiCommit = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_COMMITFILES), iImgBackup, TVI_ROOT); m_htiCommitNever = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_NEVER), m_htiCommit, m_iCommitFiles == 0); m_htiCommitOnShutdown = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_ONSHUTDOWN), m_htiCommit, m_iCommitFiles == 1); m_htiCommitAlways = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_ALWAYS), m_htiCommit, m_iCommitFiles == 2); m_htiExtractMetaData = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_EXTRACT_META_DATA), iImgMetaData, TVI_ROOT); m_htiExtractMetaDataNever = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_NEVER), m_htiExtractMetaData, m_iExtractMetaData == 0); m_htiExtractMetaDataID3Lib = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_META_DATA_ID3LIB), m_htiExtractMetaData, m_iExtractMetaData == 1); //m_htiExtractMetaDataMediaDet = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_META_DATA_MEDIADET), m_htiExtractMetaData, m_iExtractMetaData == 2); //EastShare Start - added by AndCycle, IP to Country m_htiIP2CountryName = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_IP2LOCATION), iImgIP2Country, TVI_ROOT); m_htiIP2CountryName_DISABLE = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_DISABLED), m_htiIP2CountryName, m_iIP2CountryName == IP2CountryName_DISABLE); m_htiIP2CountryName_SHORT = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_LOCATIONNAME_SHORT), m_htiIP2CountryName, m_iIP2CountryName == IP2CountryName_SHORT); m_htiIP2CountryName_MID = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_LOCATIONNAME_MID), m_htiIP2CountryName, m_iIP2CountryName == IP2CountryName_MID); m_htiIP2CountryName_LONG = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_LOCATIONNAME_LONG), m_htiIP2CountryName, m_iIP2CountryName == IP2CountryName_LONG); m_htiIP2CountryShowFlag = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOCATIONNAME_SHOWFLAG), m_htiIP2CountryName, m_bIP2CountryShowFlag); //EastShare End - added by AndCycle, IP to Country //Added by thilon on 2006.08.08,固定上传线程 m_htiUploadClients = m_ctrlTreeOptions.InsertItem(GetResString(IDS_UPLOADCLIENTS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, TVI_ROOT); m_ctrlTreeOptions.AddEditBox(m_htiUploadClients, RUNTIME_CLASS(CNumTreeOptionsEdit)); ///////////////////////////////////////////////////////////////////////////// // Logging group // m_htiLog2Disk = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG2DISK), TVI_ROOT, m_bLog2Disk); if (thePrefs.GetEnableVerboseOptions()) { m_htiVerboseGroup = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_VERBOSE), iImgLog, TVI_ROOT); m_htiVerbose = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_ENABLED), m_htiVerboseGroup, m_bVerbose); m_htiLogLevel = m_ctrlTreeOptions.InsertItem(GetResString(IDS_LOG_LEVEL), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiVerboseGroup); m_ctrlTreeOptions.AddEditBox(m_htiLogLevel, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDebug2Disk = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG2DISK), m_htiVerboseGroup, m_bDebug2Disk); m_htiDebugSourceExchange = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DEBUG_SOURCE_EXCHANGE), m_htiVerboseGroup, m_bDebugSourceExchange); m_htiLogBannedClients = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_BANNED_CLIENTS), m_htiVerboseGroup, m_bLogBannedClients); m_htiLogRatingDescReceived = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_RATING_RECV), m_htiVerboseGroup, m_bLogRatingDescReceived); m_htiLogSecureIdent = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_SECURE_IDENT), m_htiVerboseGroup, m_bLogSecureIdent); m_htiLogFilteredIPs = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_FILTERED_IPS), m_htiVerboseGroup, m_bLogFilteredIPs); m_htiLogFileSaving = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_FILE_SAVING), m_htiVerboseGroup, m_bLogFileSaving); m_htiLogA4AF = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_A4AF), m_htiVerboseGroup, m_bLogA4AF); // ZZ:DownloadManager m_htiLogUlDlEvents = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_LOG_ULDL_EVENTS), m_htiVerboseGroup, m_bLogUlDlEvents); } ///////////////////////////////////////////////////////////////////////////// // USS group // m_htiDynUp = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_DYNUP), iImgDynyp, TVI_ROOT); m_htiDynUpEnabled = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_DYNUPENABLED), m_htiDynUp, m_bDynUpEnabled); m_htiDynUpMinUpload = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_MINUPLOAD), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpMinUpload, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpPingTolerance = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_PINGTOLERANCE), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpPingTolerance, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpPingToleranceMilliseconds = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_PINGTOLERANCE_MS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpPingToleranceMilliseconds, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpPingToleranceGroup = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_DYNUP_RADIO_PINGTOLERANCE_HEADER), iImgDynyp, m_htiDynUp); m_htiDynUpRadioPingTolerance = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_DYNUP_RADIO_PINGTOLERANCE_PERCENT), m_htiDynUpPingToleranceGroup, m_iDynUpRadioPingTolerance == 0); m_htiDynUpRadioPingToleranceMilliseconds = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_DYNUP_RADIO_PINGTOLERANCE_MS), m_htiDynUpPingToleranceGroup, m_iDynUpRadioPingTolerance == 1); m_htiDynUpGoingUpDivider = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_GOINGUPDIVIDER), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpGoingUpDivider, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpGoingDownDivider = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_GOINGDOWNDIVIDER), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpGoingDownDivider, RUNTIME_CLASS(CNumTreeOptionsEdit)); m_htiDynUpNumberOfPings = m_ctrlTreeOptions.InsertItem(GetResString(IDS_DYNUP_NUMBEROFPINGS), TREEOPTSCTRLIMG_EDIT, TREEOPTSCTRLIMG_EDIT, m_htiDynUp); m_ctrlTreeOptions.AddEditBox(m_htiDynUpNumberOfPings, RUNTIME_CLASS(CNumTreeOptionsEdit)); ///////////////////////////////////////////////////////////////////////////// // eMule Shared User, Added by thilon on 2007.05.25 // m_htiShareeMule = m_ctrlTreeOptions.InsertGroup(GetResString(IDS_SHAREEMULELABEL), iImgShareeMule, TVI_ROOT); m_htiShareeMuleMultiUser = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_SHAREEMULEMULTI), m_htiShareeMule, m_iCommitFiles == 0); m_htiShareeMulePublicUser = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_SHAREEMULEPUBLIC), m_htiShareeMule, m_iCommitFiles == 1); m_htiShareeMuleOldStyle = m_ctrlTreeOptions.InsertRadioButton(GetResString(IDS_SHAREEMULEOLD), m_htiShareeMule, m_iCommitFiles == 2); m_ctrlTreeOptions.Expand(m_htiTCPGroup, TVE_EXPAND); if (m_htiVerboseGroup) m_ctrlTreeOptions.Expand(m_htiVerboseGroup, TVE_EXPAND); //Added by thilon on 2006.09.24, for UPnP //upnp_start m_htiUPnPNat = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_CN_UPNPNAT), TVI_ROOT, m_iUPnPNat); m_htiUPnPTryRandom = m_ctrlTreeOptions.InsertCheckBox(GetResString(IDS_CN_UPNPTRYRANDOM), TVI_ROOT, m_iUPnPTryRandom); //upnp_end m_ctrlTreeOptions.Expand(m_htiCommit, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiCheckDiskspace, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiDynUp, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiDynUpPingToleranceGroup, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiIP2CountryName, TVE_EXPAND); //VeryCD m_ctrlTreeOptions.Expand(m_htiExtractMetaData, TVE_EXPAND); m_ctrlTreeOptions.Expand(m_htiShareeMule, TVE_EXPAND); //Added by thilon on 2007.05.25 m_ctrlTreeOptions.SendMessage(WM_VSCROLL, SB_TOP); m_bInitializedTreeOpts = true; } ///////////////////////////////////////////////////////////////////////////// // TCP/IP group // DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiMaxCon5Sec, m_iMaxConnPerFive); DDV_MinMaxInt(pDX, m_iMaxConnPerFive, 1, INT_MAX); //Added by thilon on 2006.08.07, Changed on 2007.06.06 if(m_betterSP2.DetectSystemInformation()) { DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiMaxHalfOpen, m_iMaxHalfOpen); DDV_MinMaxInt(pDX, m_iMaxHalfOpen, 1, INT_MAX); } DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiConditionalTCPAccept, m_bConditionalTCPAccept); DDX_Text(pDX, IDC_EXT_OPTS, m_htiServerKeepAliveTimeout, m_uServerKeepAliveTimeout); ///////////////////////////////////////////////////////////////////////////// // Miscellaneous group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiAutoTakeEd2kLinks, m_bAutoTakeEd2kLinks); m_ctrlTreeOptions.SetCheckBoxEnable(m_htiAutoTakeEd2kLinks, HaveEd2kRegAccess()); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiCreditSystem, m_bCreditSystem); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiFirewallStartup, m_bFirewallStartup); m_ctrlTreeOptions.SetCheckBoxEnable(m_htiFirewallStartup, thePrefs.GetWindowsVersion() == _WINVER_XP_); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiFilterLANIPs, m_bFilterLANIPs); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiExtControls, m_bExtControls); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiA4AFSaveCpu, m_bA4AFSaveCpu); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiYourHostname, m_sYourHostname); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDisablePeerCache, m_bDisablePeerCache); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiAutoArch, m_bAutoArchDisable); ///////////////////////////////////////////////////////////////////////////// // File related group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiSparsePartFiles, m_bSparsePartFiles); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiFullAlloc, m_bFullAlloc); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiCheckDiskspace, m_bCheckDiskspace); DDX_Text(pDX, IDC_EXT_OPTS, m_htiMinFreeDiskSpace, m_fMinFreeDiskSpaceMB); DDV_MinMaxFloat(pDX, m_fMinFreeDiskSpaceMB, 0.0, UINT_MAX / (1024*1024)); DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiCommit, m_iCommitFiles); DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiExtractMetaData, m_iExtractMetaData); ///////////////////////////////////////////////////////////////////////////// // Logging group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLog2Disk, m_bLog2Disk); if (m_htiLogLevel){ DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiLogLevel, m_iLogLevel); DDV_MinMaxInt(pDX, m_iLogLevel, 1, 5); } if (m_htiVerbose) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiVerbose, m_bVerbose); if (m_htiDebug2Disk) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDebug2Disk, m_bDebug2Disk); if (m_htiDebug2Disk) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiDebug2Disk, m_bVerbose); if (m_htiDebugSourceExchange) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDebugSourceExchange, m_bDebugSourceExchange); if (m_htiDebugSourceExchange) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiDebugSourceExchange, m_bVerbose); if (m_htiLogBannedClients) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogBannedClients, m_bLogBannedClients); if (m_htiLogBannedClients) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogBannedClients, m_bVerbose); if (m_htiLogRatingDescReceived) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogRatingDescReceived, m_bLogRatingDescReceived); if (m_htiLogRatingDescReceived) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogRatingDescReceived, m_bVerbose); if (m_htiLogSecureIdent) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogSecureIdent, m_bLogSecureIdent); if (m_htiLogSecureIdent) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogSecureIdent, m_bVerbose); if (m_htiLogFilteredIPs) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogFilteredIPs, m_bLogFilteredIPs); if (m_htiLogFilteredIPs) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogFilteredIPs, m_bVerbose); if (m_htiLogFileSaving) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogFileSaving, m_bLogFileSaving); if (m_htiLogFileSaving) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogFileSaving, m_bVerbose); if (m_htiLogA4AF) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogA4AF, m_bLogA4AF); if (m_htiLogA4AF) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogA4AF, m_bVerbose); if (m_htiLogUlDlEvents) DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiLogUlDlEvents, m_bLogUlDlEvents); if (m_htiLogUlDlEvents) m_ctrlTreeOptions.SetCheckBoxEnable(m_htiLogUlDlEvents, m_bVerbose); ///////////////////////////////////////////////////////////////////////////// // USS group // DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiDynUpEnabled, m_bDynUpEnabled); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpMinUpload, m_iDynUpMinUpload); DDV_MinMaxInt(pDX, m_iDynUpMinUpload, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpPingTolerance, m_iDynUpPingTolerance); DDV_MinMaxInt(pDX, m_iDynUpPingTolerance, 100, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpPingToleranceMilliseconds, m_iDynUpPingToleranceMilliseconds); DDV_MinMaxInt(pDX, m_iDynUpPingTolerance, 1, INT_MAX); DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiDynUpPingToleranceGroup, m_iDynUpRadioPingTolerance); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpGoingUpDivider, m_iDynUpGoingUpDivider); DDV_MinMaxInt(pDX, m_iDynUpGoingUpDivider, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpGoingDownDivider, m_iDynUpGoingDownDivider); DDV_MinMaxInt(pDX, m_iDynUpGoingDownDivider, 1, INT_MAX); DDX_TreeEdit(pDX, IDC_EXT_OPTS, m_htiDynUpNumberOfPings, m_iDynUpNumberOfPings); DDV_MinMaxInt(pDX, m_iDynUpNumberOfPings, 1, INT_MAX); //EastShare Start - added by AndCycle, IP to Country DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiIP2CountryName, (int &)m_iIP2CountryName); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiIP2CountryShowFlag, m_bIP2CountryShowFlag); //EastShare End - added by AndCycle, IP to Country //upnp_start - Added by thilon on 2006.09.24 DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiUPnPNat, m_iUPnPNat); DDX_TreeCheck(pDX, IDC_EXT_OPTS, m_htiUPnPTryRandom, m_iUPnPTryRandom); m_ctrlTreeOptions.SetCheckBoxEnable(m_htiUPnPTryRandom, m_iUPnPNat); //upnp_end //Added by thilon on 2006.08.08, 固定上传线程 DDX_Text(pDX, IDC_EXT_OPTS, m_htiUploadClients, m_uUploadClients); ///////////////////////////////////////////////////////////////////////////// // eMule Shared User, Added by thilon on 2007.05.25 // DDX_TreeRadio(pDX, IDC_EXT_OPTS, m_htiShareeMule, m_iShareeMule); m_ctrlTreeOptions.SetRadioButtonEnable(m_htiShareeMulePublicUser, thePrefs.GetWindowsVersion() == _WINVER_VISTA_); m_ctrlTreeOptions.SetRadioButtonEnable(m_htiShareeMuleMultiUser, thePrefs.GetWindowsVersion() != _WINVER_95_ &&thePrefs.GetWindowsVersion() != _WINVER_NT4_); }
void CPPgGeneral::UpdateEd2kLinkFixCtrl() { GetDlgItem(IDC_ED2KFIX)->EnableWindow(HaveEd2kRegAccess() && Ask4RegFix(true)); }