📄 preferences.h
字号:
static void ResetCumulativeStatistics();
// Functions from base code that update original cumulative stats, now obsolete. (KHAOS)
//void Add2TotalDownloaded(uint64 in) {totalDownloadedBytes+=in;}
//void Add2TotalUploaded(uint64 in) {totalUploadedBytes+=in;}
// End functions from base code.
// Add to, increment and replace functions. They're all named Add2 for the sake of some kind of naming
// convention.
static void Add2DownCompletedFiles() { cumDownCompletedFiles++; }
static void SetConnMaxAvgDownRate(float in) { cumConnMaxAvgDownRate = in; }
static void SetConnMaxDownRate(float in) { cumConnMaxDownRate = in; }
static void SetConnAvgUpRate(float in) { cumConnAvgUpRate = in; }
static void SetConnMaxAvgUpRate(float in) { cumConnMaxAvgUpRate = in; }
static void SetConnMaxUpRate(float in) { cumConnMaxUpRate = in; }
static void SetConnPeakConnections(int in) { cumConnPeakConnections = in; }
static void SetUpAvgTime(int in) { cumUpAvgTime = in; }
static void Add2DownSAvgTime(int in) { sesDownAvgTime += in; }
static void SetDownCAvgTime(int in) { cumDownAvgTime = in; }
static void Add2ConnTransferTime(int in) { cumConnTransferTime += in; }
static void Add2ConnDownloadTime(int in) { cumConnDownloadTime += in; }
static void Add2ConnUploadTime(int in) { cumConnUploadTime += in; }
static void Add2DownSessionCompletedFiles() { sesDownCompletedFiles++; }
static void Add2SessionTransferData ( uint8 uClientID , uint16 uClientPort , BOOL bFromPF, BOOL bUpDown, uint32 bytes, bool sentToFriend = false);
static void Add2DownSuccessfulSessions() { sesDownSuccessfulSessions++;
cumDownSuccessfulSessions++; }
static void Add2DownFailedSessions() { sesDownFailedSessions++;
cumDownFailedSessions++; }
static void Add2LostFromCorruption(uint64 in) { sesLostFromCorruption += in;}
static void Add2SavedFromCompression(uint64 in) { sesSavedFromCompression += in;}
static void Add2SessionPartsSavedByICH(int in) { sesPartsSavedByICH += in;}
// Functions that return stats stuff...
// Saved stats for cumulative downline overhead
static uint64 GetDownOverheadTotal() { return cumDownOverheadTotal;}
static uint64 GetDownOverheadFileReq() { return cumDownOverheadFileReq;}
static uint64 GetDownOverheadSrcEx() { return cumDownOverheadSrcEx;}
static uint64 GetDownOverheadServer() { return cumDownOverheadServer;}
static uint64 GetDownOverheadKad() { return cumDownOverheadKad;}
static uint64 GetDownOverheadTotalPackets() { return cumDownOverheadTotalPackets;}
static uint64 GetDownOverheadFileReqPackets() { return cumDownOverheadFileReqPackets;}
static uint64 GetDownOverheadSrcExPackets() { return cumDownOverheadSrcExPackets;}
static uint64 GetDownOverheadServerPackets() { return cumDownOverheadServerPackets;}
static uint64 GetDownOverheadKadPackets() { return cumDownOverheadKadPackets;}
// Saved stats for cumulative upline overhead
static uint64 GetUpOverheadTotal() { return cumUpOverheadTotal;}
static uint64 GetUpOverheadFileReq() { return cumUpOverheadFileReq;}
static uint64 GetUpOverheadSrcEx() { return cumUpOverheadSrcEx;}
static uint64 GetUpOverheadServer() { return cumUpOverheadServer;}
static uint64 GetUpOverheadKad() { return cumUpOverheadKad;}
static uint64 GetUpOverheadTotalPackets() { return cumUpOverheadTotalPackets;}
static uint64 GetUpOverheadFileReqPackets() { return cumUpOverheadFileReqPackets;}
static uint64 GetUpOverheadSrcExPackets() { return cumUpOverheadSrcExPackets;}
static uint64 GetUpOverheadServerPackets() { return cumUpOverheadServerPackets;}
static uint64 GetUpOverheadKadPackets() { return cumUpOverheadKadPackets;}
// Saved stats for cumulative upline data
static uint32 GetUpSuccessfulSessions() { return cumUpSuccessfulSessions;}
static uint32 GetUpFailedSessions() { return cumUpFailedSessions;}
static uint32 GetUpAvgTime() { return cumUpAvgTime;}
// Saved stats for cumulative downline data
static uint32 GetDownCompletedFiles() { return cumDownCompletedFiles;}
static uint16 GetDownC_SuccessfulSessions() { return cumDownSuccessfulSessions;}
static uint16 GetDownC_FailedSessions() { return cumDownFailedSessions;}
static uint32 GetDownC_AvgTime() { return cumDownAvgTime;}
// Session download stats
static uint16 GetDownSessionCompletedFiles() { return sesDownCompletedFiles;}
static uint16 GetDownS_SuccessfulSessions() { return sesDownSuccessfulSessions;}
static uint16 GetDownS_FailedSessions() { return sesDownFailedSessions;}
static uint32 GetDownS_AvgTime() { return GetDownS_SuccessfulSessions()?sesDownAvgTime/GetDownS_SuccessfulSessions():0;}
// Saved stats for corruption/compression
static uint64 GetCumLostFromCorruption() { return cumLostFromCorruption;}
static uint64 GetCumSavedFromCompression() { return cumSavedFromCompression;}
static uint64 GetSesLostFromCorruption() { return sesLostFromCorruption;}
static uint64 GetSesSavedFromCompression() { return sesSavedFromCompression;}
static uint32 GetCumPartsSavedByICH() { return cumPartsSavedByICH;}
static uint32 GetSesPartsSavedByICH() { return sesPartsSavedByICH;}
// Cumulative client breakdown stats for sent bytes
static uint64 GetUpTotalClientData() { return GetCumUpData_EDONKEY()
+ GetCumUpData_EDONKEYHYBRID()
+ GetCumUpData_EMULE()
+ GetCumUpData_MLDONKEY()
+ GetCumUpData_AMULE()
+ GetCumUpData_EMULECOMPAT()
+ GetCumUpData_SHAREAZA(); }
static uint64 GetCumUpData_EDONKEY() { return (cumUpData_EDONKEY + sesUpData_EDONKEY );}
static uint64 GetCumUpData_EDONKEYHYBRID() { return (cumUpData_EDONKEYHYBRID + sesUpData_EDONKEYHYBRID );}
static uint64 GetCumUpData_EMULE() { return (cumUpData_EMULE + sesUpData_EMULE );}
static uint64 GetCumUpData_MLDONKEY() { return (cumUpData_MLDONKEY + sesUpData_MLDONKEY );}
static uint64 GetCumUpData_AMULE() { return (cumUpData_AMULE + sesUpData_AMULE );}
static uint64 GetCumUpData_EMULECOMPAT() { return (cumUpData_EMULECOMPAT + sesUpData_EMULECOMPAT );}
static uint64 GetCumUpData_SHAREAZA() { return (cumUpData_SHAREAZA + sesUpData_SHAREAZA );}
// Session client breakdown stats for sent bytes
static uint64 GetUpSessionClientData() { return sesUpData_EDONKEY
+ sesUpData_EDONKEYHYBRID
+ sesUpData_EMULE
+ sesUpData_MLDONKEY
+ sesUpData_AMULE
+ sesUpData_EMULECOMPAT
+ sesUpData_SHAREAZA; }
static uint64 GetUpData_EDONKEY() { return sesUpData_EDONKEY;}
static uint64 GetUpData_EDONKEYHYBRID() { return sesUpData_EDONKEYHYBRID;}
static uint64 GetUpData_EMULE() { return sesUpData_EMULE;}
static uint64 GetUpData_MLDONKEY() { return sesUpData_MLDONKEY;}
static uint64 GetUpData_AMULE() { return sesUpData_AMULE;}
static uint64 GetUpData_EMULECOMPAT() { return sesUpData_EMULECOMPAT;}
static uint64 GetUpData_SHAREAZA() { return sesUpData_SHAREAZA;}
// Cumulative port breakdown stats for sent bytes...
static uint64 GetUpTotalPortData() { return (GetCumUpDataPort_4662() + GetCumUpDataPort_OTHER() );}
static uint64 GetCumUpDataPort_4662() { return (cumUpDataPort_4662 + sesUpDataPort_4662 );}
static uint64 GetCumUpDataPort_OTHER() { return (cumUpDataPort_OTHER + sesUpDataPort_OTHER );}
// Session port breakdown stats for sent bytes...
static uint64 GetUpSessionPortData() { return (sesUpDataPort_4662 + sesUpDataPort_OTHER );}
static uint64 GetUpDataPort_4662() { return sesUpDataPort_4662;}
static uint64 GetUpDataPort_OTHER() { return sesUpDataPort_OTHER;}
// Cumulative DS breakdown stats for sent bytes...
static uint64 GetUpTotalDataFile() { return (GetCumUpData_File() + GetCumUpData_Partfile() );}
static uint64 GetCumUpData_File() { return (cumUpData_File + sesUpData_File );}
static uint64 GetCumUpData_Partfile() { return (sesUpData_Partfile + sesUpData_Partfile );}
// Session DS breakdown stats for sent bytes...
static uint64 GetUpSessionDataFile() { return (sesUpData_File + sesUpData_Partfile );}
static uint64 GetUpData_File() { return sesUpData_File;}
static uint64 GetUpData_Partfile() { return sesUpData_Partfile;}
// Cumulative client breakdown stats for received bytes
static uint64 GetDownTotalClientData() { return GetCumDownData_EDONKEY()
+ GetCumDownData_EDONKEYHYBRID()
+ GetCumDownData_EMULE()
+ GetCumDownData_MLDONKEY()
+ GetCumDownData_AMULE()
+ GetCumDownData_EMULECOMPAT()
+ GetCumDownData_SHAREAZA()
+ GetCumDownData_URL(); }
static uint64 GetCumDownData_EDONKEY() { return (cumDownData_EDONKEY + sesDownData_EDONKEY);}
static uint64 GetCumDownData_EDONKEYHYBRID() { return (cumDownData_EDONKEYHYBRID + sesDownData_EDONKEYHYBRID);}
static uint64 GetCumDownData_EMULE() { return (cumDownData_EMULE + sesDownData_EMULE);}
static uint64 GetCumDownData_MLDONKEY() { return (cumDownData_MLDONKEY + sesDownData_MLDONKEY);}
static uint64 GetCumDownData_AMULE() { return (cumDownData_AMULE + sesDownData_AMULE);}
static uint64 GetCumDownData_EMULECOMPAT() { return (cumDownData_EMULECOMPAT + sesDownData_EMULECOMPAT);}
static uint64 GetCumDownData_SHAREAZA() { return (cumDownData_SHAREAZA + sesDownData_SHAREAZA);}
static uint64 GetCumDownData_URL() { return (cumDownData_URL + sesDownData_URL);}
// Session client breakdown stats for received bytes
static uint64 GetDownSessionClientData() { return sesDownData_EDONKEY
+ sesDownData_EDONKEYHYBRID
+ sesDownData_EMULE
+ sesDownData_MLDONKEY
+ sesDownData_AMULE
+ sesDownData_EMULECOMPAT
+ sesDownData_SHAREAZA
+ sesDownData_URL; }
static uint64 GetDownData_EDONKEY() { return sesDownData_EDONKEY;}
static uint64 GetDownData_EDONKEYHYBRID() { return sesDownData_EDONKEYHYBRID;}
static uint64 GetDownData_EMULE() { return sesDownData_EMULE;}
static uint64 GetDownData_MLDONKEY() { return sesDownData_MLDONKEY;}
static uint64 GetDownData_AMULE() { return sesDownData_AMULE;}
static uint64 GetDownData_EMULECOMPAT() { return sesDownData_EMULECOMPAT;}
static uint64 GetDownData_SHAREAZA() { return sesDownData_SHAREAZA;}
static uint64 GetDownData_URL() { return sesDownData_URL;}
// Cumulative port breakdown stats for received bytes...
static uint64 GetDownTotalPortData() { return (GetCumDownDataPort_4662() + GetCumDownDataPort_OTHER() );}
static uint64 GetCumDownDataPort_4662() { return (cumDownDataPort_4662 + sesDownDataPort_4662 );}
static uint64 GetCumDownDataPort_OTHER() { return (cumDownDataPort_OTHER + sesDownDataPort_OTHER );}
// Session port breakdown stats for received bytes...
static uint64 GetDownSessionDataPort() { return (sesDownDataPort_4662 + sesDownDataPort_OTHER );}
static uint64 GetDownDataPort_4662() { return sesDownDataPort_4662;}
static uint64 GetDownDataPort_OTHER() { return sesDownDataPort_OTHER;}
// Saved stats for cumulative connection data
static float GetConnAvgDownRate() { return cumConnAvgDownRate;}
static float GetConnMaxAvgDownRate() { return cumConnMaxAvgDownRate;}
static float GetConnMaxDownRate() { return cumConnMaxDownRate;}
static float GetConnAvgUpRate() { return cumConnAvgUpRate;}
static float GetConnMaxAvgUpRate() { return cumConnMaxAvgUpRate;}
static float GetConnMaxUpRate() { return cumConnMaxUpRate;}
static uint64 GetConnRunTime() { return cumConnRunTime;}
static uint16 GetConnNumReconnects() { return cumConnNumReconnects;}
static uint16 GetConnAvgConnections() { return cumConnAvgConnections;}
static uint16 GetConnMaxConnLimitReached() { return cumConnMaxConnLimitReached;}
static uint16 GetConnPeakConnections() { return cumConnPeakConnections;}
static uint32 GetConnTransferTime() { return cumConnTransferTime;}
static uint32 GetConnDownloadTime() { return cumConnDownloadTime;}
static uint32 GetConnUploadTime() { return cumConnUploadTime;}
static uint32 GetConnServerDuration() { return cumConnServerDuration;}
// Saved records for servers / network
static uint16 GetSrvrsMostWorkingServers() { return cumSrvrsMostWorkingServers;}
static uint32 GetSrvrsMostUsersOnline() { return cumSrvrsMostUsersOnline;}
static uint32 GetSrvrsMostFilesAvail() { return cumSrvrsMostFilesAvail;}
// Saved records for shared files
static uint16 GetSharedMostFilesShared() { return cumSharedMostFilesShared;}
static uint64 GetSharedLargestShareSize() { return cumSharedLargestShareSize;}
static uint64 GetSharedLargestAvgFileSize() { return cumSharedLargestAvgFileSize;}
static uint64 GetSharedLargestFileSize() { return cumSharedLargestFileSize;}
// Get the long date/time when the stats were last reset
static __int64 GetStatsLastResetLng() { return stat_datetimeLastReset;}
static CString GetStatsLastResetStr(bool formatLong = true);
static UINT GetStatsSaveInterval() { return statsSaveInterval; }
// Get and Set our new preferences
static void SetStatsMax(uint16 in) { statsMax = in; }
static void SetStatsConnectionsGraphRatio(uint8 in) { statsConnectionsGraphRatio = in; }
static uint8 GetStatsConnectionsGraphRatio() { return statsConnectionsGraphRatio; }
static void SetExpandedTreeItems(CString in) { _stprintf(statsExpandedTreeItems,_T("%s"),in); }
static CString GetExpandedTreeItems() { return statsExpandedTreeItems; }
// <-----khaos- End Statistics Methods
// Original Statistics Functions
static uint64 GetTotalDownloaded() {return totalDownloadedBytes;}
static uint64 GetTotalUploaded() {return totalUploadedBytes;}
// End Original Statistics Functions
static bool IsErrorBeepEnabled() {return beepOnError;}
static bool IsConfirmExitEnabled() {return confirmExit;}
static bool UseSplashScreen() {return splashscreen;}
static bool FilterLANIPs() {return filterLANIPs;}
static bool GetAllowLocalHostIP() {return m_bAllocLocalHostIP;}
static bool IsOnlineSignatureEnabled() {return onlineSig;}
static int GetMaxGraphUploadRate() {return maxGraphUploadRate;}
static int GetMaxGraphDownloadRate() {return maxGraphDownloadRate;}
static void SetMaxGraphUploadRate(int in) {maxGraphUploadRate =(in)?in:16;}
static void SetMaxGraphDownloadRate(int in) {maxGraphDownloadRate=(in)?in:96;}
static uint16 GetMaxDownload();
static uint64 GetMaxDownloadInBytesPerSec(boolean dynamic = false);
static uint16 GetMaxConnections() {return maxconnections;}
static uint16 GetMaxHalfConnections() {return maxhalfconnections;}
static uint16 GetMaxSourcePerFile() {return maxsourceperfile;}
static uint16 GetMaxSourcePerFileSoft();
static uint16 GetMaxSourcePerFileUDP();
static uint16 GetDeadserverRetries() {return deadserverretries;}
static DWORD GetServerKeepAliveTimeout() {return m_dwServerKeepAliveTimeout;}
static int GetColumnWidth (Table t, int index);
static BOOL GetColumnHidden(Table t, int index);
static int GetColumnOrder (Table t, int index);
static void SetColumnWidth (Table t, int index, int width);
static void SetColumnHidden(Table t, int index, BOOL bHidden);
static void SetColumnOrder (Table t, INT *piOrder);
// Barry - Provide a mechanism for all tables to store/retrieve sort order
static int GetColumnSortItem (Table t);
static bool GetColumnSortAscending (Table t);
static void SetColumnSortItem (Table t, int sortItem);
static void SetColumnSortAscending (Table t, bool sortAscending);
static WORD GetLanguageID();
static void SetLanguageID(WORD lid);
static void GetLanguages(CWordArray& aLanguageIDs);
static void SetLanguage();
static const CString& GetLangDir() {return m_strLangDir;}
static bool IsLanguageSupported(LANGID lidSelected, bool bUpdateBefore);
static CString GetLangDLLNameByID(LANGID lidSelected);
static void InitThreadLocale();
static void SetRtlLocale(LCID lcid);
static CString GetHtmlCharset();
static uint8 IsDoubleClickEnabled() {return transferDoubleclick;}
static EViewSharedFilesAccess CanSeeShares(void) {return m_iSeeShares;}
static uint8 GetToolTipDelay(void) {return m_iToolDelayTime;}
static uint8 IsBringToFront() {return bringtoforeground;}
static uint8 GetSplitterbarPosition() {return splitterbarPosition;}
static void SetSplitterbarPosition(uint8 pos) {splitterbarPosition=pos;}
static uint8 GetTransferWnd2() {return m_uTransferWnd2;}
static void SetTransferWnd2(uint8 uWnd2) {m_uTransferWnd2 = uWnd2;}
//MORPH START - Added by SiRoB, Splitting Bar [O瞉
static uint8 GetSplitterbarPositionStat() {return splitterbarPositionStat;}
static void SetSplitterbarPositionStat(uint8 pos) {splitterbarPositionStat=pos;}
static uint8 GetSplitterbarPositionStat_HL() {return splitterbarPositionStat_HL;}
static void SetSplitterbarPositionStat_HL(uint8 pos) {splitterbarPositionStat_HL=pos;}
static uint8 GetSplitterbarPositionStat_HR() {return splitterbarPositionStat_HR;}
static void SetSplitterbarPositionStat_HR(uint8 pos) {splitterbarPositionStat_HR=pos;}
static uint16 GetSplitterbarPositionFriend() {return splitterbarPositionFriend;}
static void SetSplitterbarPositionFriend(uint16 pos) {splitterbarPositionFriend=pos;}
static uint16 GetSplitterbarPositionIRC() {return splitterbarPositionIRC;}
static void SetSplitterbarPositionIRC(uint16 pos) {splitterbarPositionIRC=pos;}
//MORPH END - Added by SiRoB, Splitting Bar [O瞉
// -khaos--+++> Changed datatype to avoid overflows
static uint16 GetStatsMax() {return statsMax;}
// <-----khaos-
static uint8 UseFlatBar() {return (depth3D==0);}
static int GetStraightWindowStyles() {return m_iStraightWindowStyles;}
static LPCTSTR GetSkinProfile() {return m_szSkinProfile;}
static CString GetSkinProfileDir() {return m_szSkinProfileDir;}
static void SetSkinProfile(LPCTSTR pszProfile) {_sntprintf(m_szSkinProfile, ARRSIZE(m_szSkinProfile), _T("%s"), pszProfile); }
static void SetSkinProfileDir(LPCTSTR pszDir) {_sntprintf(m_szSkinProfileDir, ARRSIZE(m_szSkinProfileDir), _T("%s"), pszDir); }
static uint8 GetStatsAverageMinutes() {return statsAverageMinutes;}
static void SetStatsAverageMinutes(uint8 in) {statsAverageMinutes=in;}
static bool GetUseDownloadNotifier() {return useDownloadNotifier;}
static bool GetUseNewDownloadNotifier() {return useNewDownloadNotifier;}
static bool GetUseChatNotifier() {return useChatNotifier;}
static bool GetUseLogNotifier() {return useLogNotifier;}
static bool GetUseSoundInNotifier() {return useSoundInNotifier;}
static bool GetNotifierPopsEveryChatMsg() {return notifierPopsEveryChatMsg;}
static bool GetNotifierPopOnImportantError() {return notifierImportantError;}
static bool GetNotifierPopOnNewVersion() {return notifierNewVersion;}
static TCHAR* GetNotifierWavSoundPath() {return notifierSoundFilePath;}
static bool GetUseServerNotifier() {return useServerNotifier;} //VeryCD
static CString GetIRCNick() {return m_sircnick;}
static void SetIRCNick( TCHAR in_nick[] ) { _tcscpy(m_sircnick,in_nick);}
static CString GetIRCServer() {return m_sircserver;}
static bool GetIRCAddTimestamp() {return m_bircaddtimestamp;}
static CString GetIRCChanNameFilter() {return m_sircchannamefilter;}
static bool GetIRCUseChanFilter() {return m_bircusechanfilter;}
static uint16 GetIRCChannelUserFilter() {return m_iircchanneluserfilter;}
static CString GetIrcPerformString() {return m_sircperformstring;}
static bool GetIrcUsePerform() {return m_bircuseperform;}
static bool GetIRCListOnConnect() {return m_birclistonconnect;}
static bool GetIrcAcceptLinks() {return m_bircacceptlinks;}
static bool GetIrcAcceptLinksFriends() {return m_bircacceptlinksfriends;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -