00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #pragma once
00023
00024 #include "WndSettingsPage.h"
00025
00026
00027 class CBandwidthSettingsPage : public CSettingsPage
00028 {
00029
00030 public:
00031 CBandwidthSettingsPage();
00032 virtual ~CBandwidthSettingsPage();
00033
00034 DECLARE_DYNCREATE(CBandwidthSettingsPage)
00035
00036
00037 public:
00038 enum { IDD = IDD_SETTINGS_BANDWIDTH };
00039 CStatic m_wndHeadUP2;
00040 CStatic m_wndHeadUP1;
00041 CStatic m_wndHeadTransmit;
00042 CStatic m_wndHeadReceive;
00043 CString m_sUPInLimit;
00044 CString m_sUPInMax;
00045 CString m_sUPInTotal;
00046 CString m_sUPOutLimit;
00047 CString m_sUPOutMax;
00048 CString m_sUPOutTotal;
00049 CString m_sDLTotal;
00050 CString m_sInTotal;
00051 CString m_sOutTotal;
00052 CString m_sPInTotal;
00053 CString m_sPOutLimit;
00054 CString m_sPOutMax;
00055 CString m_sPOutTotal;
00056 CString m_sULTotal;
00057 CString m_sPInLimit;
00058 CString m_sPInMax;
00059 CString m_sLInLimit;
00060 CString m_sLInMax;
00061 CString m_sLInTotal;
00062 CString m_sLOutLimit;
00063 CString m_sLOutMax;
00064 CString m_sLOutTotal;
00065 CString m_sUDPTotal;
00066
00067
00068 public:
00069 void Calculate(BOOL bForeward);
00070 void Calculate(CString& strLimit, int nCount, CString& strCount, CString& strTotal, BOOL bForeward);
00071 DWORD ToSpeed(CString& str);
00072 CString ToString(DWORD nSpeed, BOOL bUnlimited = TRUE, BOOL bUnit = FALSE);
00073 DWORD AddString(CString& str);
00074 void SwapBytesBits(CString& str);
00075
00076
00077 protected:
00078 BOOL m_bActive;
00079 BOOL m_bBytes;
00080
00081
00082 public:
00083 virtual void OnOK();
00084 virtual BOOL OnSetActive();
00085 protected:
00086 virtual void DoDataExchange(CDataExchange* pDX);
00087 virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
00088 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
00089
00090
00091 protected:
00092 DECLARE_MESSAGE_MAP()
00093 virtual BOOL OnInitDialog();
00094 afx_msg void OnTimer(UINT nIDEvent);
00095 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
00096
00097 };