Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

PPgUDReg.h

Go to the documentation of this file.
00001 
00016 #pragma once
00017 
00018 #include "preferences.h"
00019 #include "math.h"
00020 // CPPgUDReg dialog
00021 
00023 struct UDReg_Struct{
00026     float   DLOffset;
00027     float   ULOffset;
00029 
00032     float   ULAbsMax;
00033     float   DLAbsMax;
00035 
00038     float   Ratio0;
00039     float   Ratio1;
00040     float   Ratio2;
00041     float   Ratio3;
00043 
00046     float   Thres0;
00047     float   Thres1;
00048     float   Thres2;
00050 
00053     BOOL    DLEnable;
00054     BOOL    ULEnable;
00056 
00059     sint16  DLBoostTR;
00060     sint16  DLBuckTR;
00061     sint16  ULBoostTR;
00062     sint16  ULBuckTR;
00064 };
00065 
00066 class CUDRegMon;
00067 
00074 class CPPgUDReg : public CPropertyPage
00075 {
00076     friend class CUDRegMon;
00078     DECLARE_DYNAMIC(CPPgUDReg);
00079 
00080 public:
00081     CPPgUDReg();
00082     virtual ~CPPgUDReg();
00083 
00084     enum { IDD = IDD_PPG_UDREG };
00085 
00086 protected:
00087     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00088 
00090     DECLARE_MESSAGE_MAP();
00091 
00092 public:
00093     afx_msg void OnEnChange();
00094     virtual BOOL OnInitDialog();
00095     virtual BOOL OnApply();
00096 
00097     void UpdateRates(float lastdownrate);
00098     void WriteConfig(CIni &ini);
00099     void LoadConfig(CIni &ini);
00100 
00101 private:
00103     static uint16   alpha_to_sec(float alpha) {return (uint32) (-2.0F / log(alpha));}
00105     static float    sec_to_alpha(uint16 sec) {return exp(-2.0F / sec);}
00106 
00107     void SetConfig      (UDReg_Struct *pUDReg);
00110     void GetConfig      (UDReg_Struct *pUDReg) {memcpy(pUDReg, &UDReg, sizeof(UDReg));}
00111 
00113     UDReg_Struct    UDReg;
00115     UDReg_Struct    GUI_UDReg;
00117     CUDRegMon       *UDRegMon;
00119     float   hystup;
00121     float   hystdown;
00123     float   ULFeedUp;
00125     float   ULFeedDn;
00127     float   DLFeedUp;
00129     float   DLFeedDn;
00130 
00131 public:
00132     afx_msg void OnBnClickedUDRMon();
00133 };

Generated on Mon Oct 27 14:45:06 2003 for Moonlight's eMule Tweaks Documentation by doxygen 1.3.4