options.cpp
来自「一个支持FTP,SFTP的客户端程序」· C++ 代码 · 共 1,863 行 · 第 1/5 页
CPP
1,863 行
//FileZilla - a Windows ftp client
// Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Options.cpp: Implementierungsdatei
//
#include "stdafx.h"
#include "options.h"
#include "filezilla.h"
#include "misc\MarkupSTL.h"
#include "SpeedLimit.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
COptions::t_OptionsCache COptions::m_OptionsCache[OPTIONS_NUM];
BOOL COptions::m_bInitialized=FALSE;
BOOL COptions::m_bUseXML=FALSE;
CCriticalSection COptions::m_Sync;
CMarkupSTL COptions::m_markup;
SPEEDLIMITSLIST COptions::m_DownloadSpeedLimits;
SPEEDLIMITSLIST COptions::m_UploadSpeedLimits;
CString COptions::m_sConfigFile;
/////////////////////////////////////////////////////////////////////////////
// Dialogfeld COptions
COptions::COptions(CWnd* pParent /*=NULL*/)
//: CSAPrefsDialog(pParent)
{
//{{AFX_DATA_INIT(COptions)
// HINWEIS: Der Klassen-Assistent f黦t hier Elementinitialisierung ein
//}}AFX_DATA_INIT
Init();
}
void COptions::DoDataExchange(CDataExchange* pDX)
{
CSAPrefsDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(COptions)
// HINWEIS: Der Klassen-Assistent f黦t hier DDX- und DDV-Aufrufe ein
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(COptions, CSAPrefsDialog)
//{{AFX_MSG_MAP(COptions)
ON_BN_CLICKED(IDC_PHELP, OnPhelp)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// Behandlungsroutinen f黵 Nachrichten COptions
BOOL COptions::Show()
{
AddPage(m_OptionsPage2, IDS_OPTIONSPAGE_CONNECTION);
AddPage(m_OptionsFirewallPage, IDS_OPTIONSPAGE_FIREWALL, &m_OptionsPage2);
AddPage(m_OptionsProxyPage, IDS_OPTIONSPAGE_PROXY, &m_OptionsPage2);
AddPage(m_OptionsFtpProxyPage, IDS_OPTIONSPAGE_FTPPROXY, &m_OptionsPage2);
AddPage(m_OptionsGssPage, IDS_OPTIONSPAGE_GSS, &m_OptionsPage2);
AddPage(m_OptionsDirCachePage, IDS_OPTIONSPAGE_DIRCACHE, &m_OptionsPage2);
AddPage(m_OptionsIdentPage, IDS_OPTIONSPAGE_IDENT, &m_OptionsPage2);
AddPage(m_OptionsSshPage, IDS_OPTIONSPAGE_SSH, &m_OptionsPage2);
AddPage(m_OptionsTransferPage, IDS_OPTIONSPAGE_TRANSFER);
AddPage(m_OptionsTypePage, IDS_OPTIONSPAGE_TYPE, &m_OptionsTransferPage);
AddPage(m_OptionsSpeedLimitPage, IDS_OPTIONSPAGE_SPEEDLIMIT, &m_OptionsTransferPage);
AddPage(m_OptionsTransferCompressionPage, IDS_OPTIONSPAGE_TRANSFER_COMPRESSION, &m_OptionsTransferPage);
AddPage(m_OptionsInterfacePage, IDS_OPTIONSPAGE_INTERFACE);
AddPage(m_OptionsLocalViewPage, IDS_OPTIONSPAGE_LOCALVIEW, &m_OptionsInterfacePage);
AddPage(m_OptionsRemoteViewPage, IDS_OPTIONSPAGE_REMOTEVIEW, &m_OptionsInterfacePage);
AddPage(m_OptionsLanguagePage, IDS_OPTIONSPAGE_LANGUAGE, &m_OptionsInterfacePage);
AddPage(m_OptionsMiscPage, IDS_OPTIONSPAGE_MISC, &m_OptionsInterfacePage);
AddPage(m_OptionsViewEditPage, IDS_OPTIONSPAGE_VIEWEDIT, &m_OptionsInterfacePage);
AddPage(m_OptionsPaneLayoutPage, IDS_OPTIONSPAGE_PANELAYOUT, &m_OptionsInterfacePage);
AddPage(m_OptionsLoggingPage, IDS_OPTIONSPAGE_LOGGING, &m_OptionsInterfacePage);
AddPage(m_OptionsDebugPage, IDS_OPTIONSPAGE_DEBUG);
SetConstantText("FileZilla");
m_OptionsFtpProxyPage.m_logontype=GetOptionVal(OPTION_LOGONTYPE);
m_OptionsFtpProxyPage.m_fwhost=GetOption(OPTION_FWHOST);
m_OptionsFtpProxyPage.m_fwport=GetOptionVal(OPTION_FWPORT);
m_OptionsFtpProxyPage.m_fwuser=GetOption(OPTION_FWUSER);
m_OptionsFtpProxyPage.m_fwpass=CCrypt::decrypt(GetOption(OPTION_FWPASS));
m_OptionsPage2.m_Timeout=GetOptionVal(OPTION_TIMEOUTLENGTH);
m_OptionsPage2.m_AnonPwd=GetOption(OPTION_ANONPWD);
m_OptionsPage2.m_UseKeepAlive=GetOptionVal(OPTION_KEEPALIVE);
m_OptionsPage2.m_IntervalLow.Format(_T("%d"), GetOptionVal(OPTION_INTERVALLOW));
m_OptionsPage2.m_IntervalHigh.Format(_T("%d"), GetOptionVal(OPTION_INTERVALHIGH));
m_OptionsPage2.m_NumRetries.Format(_T("%d"), GetOptionVal(OPTION_NUMRETRIES));
m_OptionsPage2.m_Delay.Format(_T("%d"), GetOptionVal(OPTION_RETRYDELAY));
m_OptionsPage2.m_bEnableIPV6 = GetOptionVal(OPTION_ENABLE_IPV6);
m_OptionsProxyPage.m_Type=GetOptionVal(OPTION_PROXYTYPE);
m_OptionsProxyPage.m_Host=GetOption(OPTION_PROXYHOST);
m_OptionsProxyPage.m_Port.Format(_T("%d"), GetOptionVal(OPTION_PROXYPORT));
m_OptionsProxyPage.m_User=GetOption(OPTION_PROXYUSER);
m_OptionsProxyPage.m_Pass=CCrypt::decrypt(GetOption(OPTION_PROXYPASS));
m_OptionsProxyPage.m_Use=GetOptionVal(OPTION_PROXYUSELOGON);
//Init type page
m_OptionsTypePage.m_nTypeMode = GetOptionVal(OPTION_TRANSFERMODE);
m_OptionsTypePage.m_AsciiFiles = GetOption(OPTION_ASCIIFILES);
//Init misc page
m_OptionsMiscPage.m_nFolderType = GetOptionVal(OPTION_DEFAULTFOLDERTYPE);
m_OptionsMiscPage.m_DefaultFolder = GetOption(OPTION_DEFAULTFOLDER);
m_OptionsMiscPage.m_bOpenSitemanagerOnStart = GetOptionVal(OPTION_SHOWSITEMANAGERONSTARTUP);
m_OptionsMiscPage.m_bSortSitemanagerFoldersFirst = GetOptionVal(OPTION_SORTSITEMANAGERFOLDERSFIRST);
m_OptionsMiscPage.m_bExpandSitemanagerFolders = GetOptionVal(OPTION_SITEMANAGERNOEXPANDFOLDERS);
//Init interface page
m_OptionsInterfacePage.m_bShowToolBar = !GetOptionVal(OPTION_SHOWNOTOOLBAR);
m_OptionsInterfacePage.m_bShowQuickconnectBar = !GetOptionVal(OPTION_SHOWNOQUICKCONNECTBAR);
m_OptionsInterfacePage.m_bShowStatusBar = !GetOptionVal(OPTION_SHOWNOSTATUSBAR);
m_OptionsInterfacePage.m_bShowMessageLog = !GetOptionVal(OPTION_SHOWNOMESSAGELOG);
m_OptionsInterfacePage.m_bShowLocalTree = !GetOptionVal(OPTION_SHOWNOTREEVIEW);
m_OptionsInterfacePage.m_bShowRemoteTree = GetOptionVal(OPTION_SHOWREMOTETREEVIEW);
m_OptionsInterfacePage.m_bShowQueue = !GetOptionVal(OPTION_SHOWNOQUEUE);
m_OptionsInterfacePage.m_bShowViewLabels = !GetOptionVal(OPTION_SHOWNOLABEL);
m_OptionsInterfacePage.m_nViewMode = GetOptionVal(OPTION_REMEMBERVIEWS);
m_OptionsInterfacePage.m_nMinimize = GetOptionVal(OPTION_MINIMIZETOTRAY);
m_OptionsInterfacePage.m_bRememberWindowPos = GetOptionVal(OPTION_REMEMBERLASTWINDOWPOS);
//Init local view page
m_OptionsLocalViewPage.m_nViewMode=GetOptionVal(OPTION_REMEMBERLOCALVIEW);
m_OptionsLocalViewPage.m_nLocalStyle=GetOptionVal(OPTION_LOCALLISTVIEWSTYLE);
int nLocalHide=GetOptionVal(OPTION_HIDELOCALCOLUMNS);
m_OptionsLocalViewPage.m_bSize=!(nLocalHide&0x01);
m_OptionsLocalViewPage.m_bType=!(nLocalHide&0x02);
m_OptionsLocalViewPage.m_bTime=!(nLocalHide&0x04);
m_OptionsLocalViewPage.m_bRememberColumnWidths=GetOptionVal(OPTION_REMEMBERLOCALCOLUMNWIDTHS);
m_OptionsLocalViewPage.m_nSizeFormat=GetOptionVal(OPTION_LOCALFILESIZEFORMAT);
m_OptionsLocalViewPage.m_bShowStatusBar = GetOptionVal(OPTION_SHOWLOCALSTATUSBAR);
m_OptionsLocalViewPage.m_bRememberColumnSort = GetOptionVal(OPTION_LOCALCOLUMNSORT) ? TRUE : FALSE;
m_OptionsLocalViewPage.m_nDoubleclickAction = GetOptionVal(OPTION_LOCAL_DOUBLECLICK_ACTION);
//Init remote view page
m_OptionsRemoteViewPage.m_nViewMode = GetOptionVal(OPTION_REMEMBERREMOTEVIEW);
m_OptionsRemoteViewPage.m_nRemoteStyle = GetOptionVal(OPTION_REMOTELISTVIEWSTYLE);
int nRemoteHide=GetOptionVal(OPTION_HIDEREMOTECOLUMNS);
m_OptionsRemoteViewPage.m_bSize = !(nRemoteHide&0x01);
m_OptionsRemoteViewPage.m_bFiletype = !(nRemoteHide&0x02);
m_OptionsRemoteViewPage.m_bDate = !(nRemoteHide&0x04);
m_OptionsRemoteViewPage.m_bTime = !(nRemoteHide&0x08);
m_OptionsRemoteViewPage.m_bPermissions = !(nRemoteHide&0x10);
m_OptionsRemoteViewPage.m_bOwnerGroup = !(nRemoteHide&0x20);
m_OptionsRemoteViewPage.m_bRememberColumnWidths = GetOptionVal(OPTION_REMEMBERREMOTECOLUMNWIDTHS);
m_OptionsRemoteViewPage.m_nSizeFormat = GetOptionVal(OPTION_REMOTEFILESIZEFORMAT);
m_OptionsRemoteViewPage.m_bShowHidden = GetOptionVal(OPTION_ALWAYSSHOWHIDDEN);
m_OptionsRemoteViewPage.m_bShowStatusBar = GetOptionVal(OPTION_SHOWREMOTESTATUSBAR);
m_OptionsRemoteViewPage.m_bRememberColumnSort = GetOptionVal(OPTION_REMOTECOLUMNSORT) ? TRUE : FALSE;
m_OptionsRemoteViewPage.m_nDoubleclickAction = GetOptionVal(OPTION_REMOTE_DOUBLECLICK_ACTION);
//Init GSS Page
m_OptionsGssPage.m_bUseGSS=GetOptionVal(OPTION_USEGSS);
m_OptionsGssPage.m_GssServers=GetOption(OPTION_GSSSERVERS);
//Init Debug Page
m_OptionsDebugPage.m_bEngineTrace=GetOptionVal(OPTION_DEBUGTRACE);
m_OptionsDebugPage.m_bShowListing=GetOptionVal(OPTION_DEBUGSHOWLISTING);
m_OptionsDebugPage.m_bDebugMenu=GetOptionVal(OPTION_ENABLEDEBUGMENU);
//Init firewall page
m_OptionsFirewallPage.m_bPasv=GetOptionVal(OPTION_PASV);
m_OptionsFirewallPage.m_bLimitPortRange=GetOptionVal(OPTION_LIMITPORTRANGE);
m_OptionsFirewallPage.m_PortRangeLow.Format(_T("%d"), GetOptionVal(OPTION_PORTRANGELOW));
m_OptionsFirewallPage.m_PortRangeHigh.Format(_T("%d"), GetOptionVal(OPTION_PORTRANGEHIGH));
m_OptionsFirewallPage.m_bUseTransferIP = (GetOption(OPTION_TRANSFERIP)!="") ? TRUE : FALSE;
m_OptionsFirewallPage.m_TransferIP = GetOption(OPTION_TRANSFERIP);
m_OptionsFirewallPage.m_bUseTransferIP6 = (GetOption(OPTION_TRANSFERIP6)!="") ? TRUE : FALSE;
m_OptionsFirewallPage.m_TransferIP6 = GetOption(OPTION_TRANSFERIP6);
//Init Directory Cache page
m_OptionsDirCachePage.m_bUseCache=GetOptionVal(OPTION_USECACHE)?1:0;
m_OptionsDirCachePage.m_nHours=GetOptionVal(OPTION_MAXCACHETIME)/3600;
m_OptionsDirCachePage.m_nMinutes=(GetOptionVal(OPTION_MAXCACHETIME)/60)%60;
m_OptionsDirCachePage.m_nSeconds=GetOptionVal(OPTION_MAXCACHETIME)%60;
//Init Transfer page
m_OptionsTransferPage.m_bPreserveTime=GetOptionVal(OPTION_PRESERVEDOWNLOADFILETIME);
m_OptionsTransferPage.m_MaxPrimarySize.Format(_T("%d"), GetOptionVal(OPTION_TRANSFERPRIMARYMAXSIZE));
m_OptionsTransferPage.m_MaxConnCount.Format(_T("%d"), GetOptionVal(OPTION_TRANSFERAPICOUNT));
m_OptionsTransferPage.m_bUseMultiple=GetOptionVal(OPTION_TRANSFERUSEMULTIPLE);
m_OptionsTransferPage.m_nFileExistsAction=GetOptionVal(OPTION_FILEEXISTSACTION);
m_OptionsTransferPage.m_vmsall = GetOptionVal(OPTION_VMSALLREVISIONS);
//Init View/Edit page
m_OptionsViewEditPage.m_Default=COptions::GetOption(OPTION_VIEWEDITDEFAULT);
m_OptionsViewEditPage.m_Custom2=COptions::GetOption(OPTION_VIEWEDITCUSTOM);
//Init Ident page
m_OptionsIdentPage.m_bIdent=GetOptionVal(OPTION_IDENT);
m_OptionsIdentPage.m_bIdentConnect=GetOptionVal(OPTION_IDENTCONNECT);
m_OptionsIdentPage.m_bSameIP=GetOptionVal(OPTION_IDENTSAMEIP);
m_OptionsIdentPage.m_System=GetOption(OPTION_IDENTSYSTEM);
m_OptionsIdentPage.m_UserID=GetOption(OPTION_IDENTUSER);
//Init Speed Limit page
m_OptionsSpeedLimitPage.m_DownloadSpeedLimitType=GetOptionVal(OPTION_SPEEDLIMIT_DOWNLOAD_TYPE);
m_OptionsSpeedLimitPage.m_DownloadValue=GetOptionVal(OPTION_SPEEDLIMIT_DOWNLOAD_VALUE);
m_OptionsSpeedLimitPage.m_UploadSpeedLimitType=GetOptionVal(OPTION_SPEEDLIMIT_UPLOAD_TYPE);
m_OptionsSpeedLimitPage.m_UploadValue=GetOptionVal(OPTION_SPEEDLIMIT_UPLOAD_VALUE);
m_Sync.Lock();
m_OptionsSpeedLimitPage.Copy(m_DownloadSpeedLimits, m_OptionsSpeedLimitPage.m_DownloadSpeedLimits);
m_OptionsSpeedLimitPage.Copy(m_UploadSpeedLimits, m_OptionsSpeedLimitPage.m_UploadSpeedLimits);
m_Sync.Unlock();
//Init SSH page
m_OptionsSshPage.m_nCompression = GetOptionVal(OPTION_SSHUSECOMPRESSION);
m_OptionsSshPage.m_nProtocol = GetOptionVal(OPTION_SSHPROTOCOL);
//Init pane layout page
m_OptionsPaneLayoutPage.m_nLocalTreePos = GetOptionVal(OPTION_LOCALTREEVIEWLOCATION);
m_OptionsPaneLayoutPage.m_nRemoteTreePos = GetOptionVal(OPTION_REMOTETREEVIEWLOCATION);
m_OptionsPaneLayoutPage.m_bSwitchLayout = GetOptionVal(OPTION_PANELAYOUT_SWITCHLAYOUT);
//Init message log page
m_OptionsLoggingPage.m_bLogToFile = GetOptionVal(OPTION_DEBUGLOGTOFILE);
m_OptionsLoggingPage.m_LogFile = GetOption(OPTION_DEBUGLOGFILE);
m_OptionsLoggingPage.m_bUseCustomFont = GetOptionVal(OPTION_MESSAGELOG_USECUSTOMFONT);
m_OptionsLoggingPage.m_FontName = GetOption(OPTION_MESSAGELOG_FONTNAME);
m_OptionsLoggingPage.m_nFontSize = GetOptionVal(OPTION_MESSAGELOG_FONTSIZE);
m_OptionsLoggingPage.m_timestamps = GetOptionVal(OPTION_LOGTIMESTAMPS);
//Init transfer compressio page
m_OptionsTransferCompressionPage.m_level.Format(_T("%d"), GetOptionVal(OPTION_MODEZ_LEVEL));
m_OptionsTransferCompressionPage.m_useCompression = GetOptionVal(OPTION_MODEZ_USE);
InitLanguagePage();
//Show the dialog
BOOL res = DoModal();
if (res != IDOK)
return FALSE;
SetOption(OPTION_LOGONTYPE,m_OptionsFtpProxyPage.m_logontype);
SetOption(OPTION_FWHOST,m_OptionsFtpProxyPage.m_fwhost);
SetOption(OPTION_FWPORT,m_OptionsFtpProxyPage.m_fwport);
SetOption(OPTION_FWUSER,m_OptionsFtpProxyPage.m_fwuser);
SetOption(OPTION_FWPASS,CCrypt::encrypt(m_OptionsFtpProxyPage.m_fwpass));
SetOption(OPTION_TIMEOUTLENGTH,m_OptionsPage2.m_Timeout);
SetOption(OPTION_ANONPWD,m_OptionsPage2.m_AnonPwd);
SetOption(OPTION_KEEPALIVE,m_OptionsPage2.m_UseKeepAlive);
if (m_OptionsPage2.m_UseKeepAlive)
{
SetOption(OPTION_INTERVALLOW,_ttoi(m_OptionsPage2.m_IntervalLow));
SetOption(OPTION_INTERVALHIGH,_ttoi(m_OptionsPage2.m_IntervalHigh));
}
SetOption(OPTION_RETRYDELAY,_ttoi(m_OptionsPage2.m_Delay));
SetOption(OPTION_NUMRETRIES,_ttoi(m_OptionsPage2.m_NumRetries));
SetOption(OPTION_ENABLE_IPV6, m_OptionsPage2.m_bEnableIPV6);
//Store proxy settings
SetOption(OPTION_PROXYTYPE,m_OptionsProxyPage.m_Type);
SetOption(OPTION_PROXYHOST,m_OptionsProxyPage.m_Host);
SetOption(OPTION_PROXYPORT,_ttoi(m_OptionsProxyPage.m_Port));
SetOption(OPTION_PROXYUSER,m_OptionsProxyPage.m_User);
SetOption(OPTION_PROXYPASS,CCrypt::encrypt(m_OptionsProxyPage.m_Pass));
SetOption(OPTION_PROXYUSELOGON,m_OptionsProxyPage.m_Use);
//Store Misc settings
SetOption(OPTION_DEFAULTFOLDERTYPE,m_OptionsMiscPage.m_nFolderType);
SetOption(OPTION_DEFAULTFOLDER,m_OptionsMiscPage.m_DefaultFolder);
SetOption(OPTION_SHOWSITEMANAGERONSTARTUP,m_OptionsMiscPage.m_bOpenSitemanagerOnStart);
SetOption(OPTION_SORTSITEMANAGERFOLDERSFIRST,m_OptionsMiscPage.m_bSortSitemanagerFoldersFirst);
SetOption(OPTION_SITEMANAGERNOEXPANDFOLDERS,m_OptionsMiscPage.m_bExpandSitemanagerFolders);
//Store Transfermode settings
SetOption(OPTION_TRANSFERMODE,m_OptionsTypePage.m_nTypeMode);
SetOption(OPTION_ASCIIFILES,m_OptionsTypePage.m_AsciiFiles);
//Store interface page
SetOption(OPTION_SHOWNOTOOLBAR,!m_OptionsInterfacePage.m_bShowToolBar);
SetOption(OPTION_SHOWNOQUICKCONNECTBAR,!m_OptionsInterfacePage.m_bShowQuickconnectBar);
SetOption(OPTION_SHOWNOSTATUSBAR,!m_OptionsInterfacePage.m_bShowStatusBar);
SetOption(OPTION_SHOWNOMESSAGELOG,!m_OptionsInterfacePage.m_bShowMessageLog);
SetOption(OPTION_SHOWNOTREEVIEW,!m_OptionsInterfacePage.m_bShowLocalTree);
SetOption(OPTION_SHOWREMOTETREEVIEW, m_OptionsInterfacePage.m_bShowRemoteTree);
SetOption(OPTION_SHOWNOQUEUE,!m_OptionsInterfacePage.m_bShowQueue);
SetOption(OPTION_SHOWNOLABEL,!m_OptionsInterfacePage.m_bShowViewLabels);
SetOption(OPTION_REMEMBERVIEWS,m_OptionsInterfacePage.m_nViewMode);
SetOption(OPTION_REMEMBERLASTWINDOWPOS,m_OptionsInterfacePage.m_bRememberWindowPos);
SetOption(OPTION_MINIMIZETOTRAY, m_OptionsInterfacePage.m_nMinimize);
//Store local view page
SetOption(OPTION_REMEMBERLOCALVIEW,m_OptionsLocalViewPage.m_nViewMode);
SetOption(OPTION_LOCALLISTVIEWSTYLE,m_OptionsLocalViewPage.m_nLocalStyle);
nLocalHide=0;
if (!m_OptionsLocalViewPage.m_bSize)
nLocalHide|=1;
if (!m_OptionsLocalViewPage.m_bType)
nLocalHide|=2;
if (!m_OptionsLocalViewPage.m_bTime)
nLocalHide|=4;
SetOption(OPTION_HIDELOCALCOLUMNS,nLocalHide);
SetOption(OPTION_REMEMBERLOCALCOLUMNWIDTHS, m_OptionsLocalViewPage.m_bRememberColumnWidths);
SetOption(OPTION_LOCALFILESIZEFORMAT, m_OptionsLocalViewPage.m_nSizeFormat);
SetOption(OPTION_SHOWLOCALSTATUSBAR, m_OptionsLocalViewPage.m_bShowStatusBar);
if (m_OptionsLocalViewPage.m_bRememberColumnSort && !GetOptionVal(OPTION_LOCALCOLUMNSORT))
SetOption(OPTION_LOCALCOLUMNSORT, 1);
else if (!m_OptionsLocalViewPage.m_bRememberColumnSort && GetOptionVal(OPTION_LOCALCOLUMNSORT))
SetOption(OPTION_LOCALCOLUMNSORT, 0);
SetOption(OPTION_LOCAL_DOUBLECLICK_ACTION, m_OptionsLocalViewPage.m_nDoubleclickAction);
//Store remote view page
SetOption(OPTION_REMEMBERREMOTEVIEW, m_OptionsRemoteViewPage.m_nViewMode);
SetOption(OPTION_REMOTELISTVIEWSTYLE, m_OptionsRemoteViewPage.m_nRemoteStyle);
nRemoteHide = 0;
if (!m_OptionsRemoteViewPage.m_bSize)
nRemoteHide |= 1;
if (!m_OptionsRemoteViewPage.m_bFiletype)
nRemoteHide |= 2;
if (!m_OptionsRemoteViewPage.m_bDate)
nRemoteHide |= 4;
if (!m_OptionsRemoteViewPage.m_bTime)
nRemoteHide |= 8;
if (!m_OptionsRemoteViewPage.m_bPermissions)
nRemoteHide |= 0x10;
if (!m_OptionsRemoteViewPage.m_bOwnerGroup)
nRemoteHide |= 0x20;
SetOption(OPTION_HIDEREMOTECOLUMNS, nRemoteHide);
SetOption(OPTION_REMEMBERREMOTECOLUMNWIDTHS, m_OptionsRemoteViewPage.m_bRememberColumnWidths);
SetOption(OPTION_REMOTEFILESIZEFORMAT, m_OptionsRemoteViewPage.m_nSizeFormat);
SetOption(OPTION_ALWAYSSHOWHIDDEN, m_OptionsRemoteViewPage.m_bShowHidden);
SetOption(OPTION_SHOWREMOTESTATUSBAR, m_OptionsRemoteViewPage.m_bShowStatusBar);
if (m_OptionsRemoteViewPage.m_bRememberColumnSort && !GetOptionVal(OPTION_REMOTECOLUMNSORT))
SetOption(OPTION_REMOTECOLUMNSORT, 1);
else if (!m_OptionsRemoteViewPage.m_bRememberColumnSort && GetOptionVal(OPTION_REMOTECOLUMNSORT))
SetOption(OPTION_REMOTECOLUMNSORT, 0);
SetOption(OPTION_REMOTE_DOUBLECLICK_ACTION, m_OptionsRemoteViewPage.m_nDoubleclickAction);
//Store the GSS settings
SetOption(OPTION_USEGSS,m_OptionsGssPage.m_bUseGSS);
SetOption(OPTION_GSSSERVERS,m_OptionsGssPage.m_GssServers);
//Store debug settings
SetOption(OPTION_DEBUGTRACE, m_OptionsDebugPage.m_bEngineTrace);
SetOption(OPTION_DEBUGSHOWLISTING, m_OptionsDebugPage.m_bShowListing);
SetOption(OPTION_ENABLEDEBUGMENU, m_OptionsDebugPage.m_bDebugMenu);
//Store firewall settings
SetOption(OPTION_PASV, m_OptionsFirewallPage.m_bPasv);
SetOption(OPTION_LIMITPORTRANGE, m_OptionsFirewallPage.m_bLimitPortRange);
SetOption(OPTION_PORTRANGELOW, _ttoi(m_OptionsFirewallPage.m_PortRangeLow));
SetOption(OPTION_PORTRANGEHIGH, _ttoi(m_OptionsFirewallPage.m_PortRangeHigh));
SetOption(OPTION_TRANSFERIP, m_OptionsFirewallPage.m_bUseTransferIP ? m_OptionsFirewallPage.m_TransferIP : "");
SetOption(OPTION_TRANSFERIP6, m_OptionsFirewallPage.m_bUseTransferIP6 ? m_OptionsFirewallPage.m_TransferIP6 : "");
//Store Directory Cache settings
SetOption(OPTION_USECACHE,m_OptionsDirCachePage.m_bUseCache);
SetOption(OPTION_MAXCACHETIME,m_OptionsDirCachePage.m_nHours*3600+m_OptionsDirCachePage.m_nMinutes*60+m_OptionsDirCachePage.m_nSeconds);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?