00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(AFX_GRAPHITEM_H__6C5709B5_EB88_4CAB_B61E_74F11AAB9F65__INCLUDED_)
00023 #define AFX_GRAPHITEM_H__6C5709B5_EB88_4CAB_B61E_74F11AAB9F65__INCLUDED_
00024
00025 #pragma once
00026
00027 typedef struct
00028 {
00029 DWORD m_nCode;
00030 UINT m_nStringID;
00031 UINT m_nUnits;
00032 } GRAPHITEM;
00033
00034
00035 class CGraphItem
00036 {
00037
00038 public:
00039 CGraphItem(DWORD nCode = 0, DWORD nParam = 0, COLORREF nColour = RGB(255,255,255));
00040 virtual ~CGraphItem();
00041
00042
00043 public:
00044 DWORD m_nCode;
00045 DWORD m_nParam;
00046 COLORREF m_nColour;
00047 public:
00048 CString m_sName;
00049 CPen m_pPen[4];
00050 COLORREF m_cPen[4];
00051 public:
00052 DWORD* m_pData;
00053 DWORD m_nData;
00054 DWORD m_nLength;
00055 DWORD m_nPosition;
00056 public:
00057 static GRAPHITEM m_pItemDesc[];
00058
00059
00060 public:
00061 void SetCode(DWORD nCode);
00062 void Clear();
00063 DWORD Add(DWORD nValue);
00064 DWORD GetValueAt(DWORD nPosition) const;
00065 DWORD GetMaximum() const;
00066 void SetHistory(DWORD nSize, BOOL bMax = FALSE);
00067 DWORD Update();
00068 void Serialize(CArchive& ar);
00069 void MakeGradient(COLORREF crBack);
00070 public:
00071 static QWORD GetValue(DWORD nCode, DWORD nParam = 0);
00072 static GRAPHITEM* GetItemDesc(DWORD nCode);
00073
00074 };
00075
00076 #define GRC_TOTAL_BANDWIDTH_IN 1
00077 #define GRC_TOTAL_BANDWIDTH_OUT 2
00078 #define GRC_TOTAL_BANDWIDTH_TCP_IN 3
00079 #define GRC_TOTAL_BANDWIDTH_TCP_OUT 4
00080 #define GRC_TOTAL_BANDWIDTH_UDP_IN 5
00081 #define GRC_TOTAL_BANDWIDTH_UDP_OUT 6
00082
00083 #define GRC_GNUTELLA_CONNECTIONS 11
00084 #define GRC_GNUTELLA_CONNECTIONS_ALL 12
00085 #define GRC_GNUTELLA_BANDWIDTH_IN 13
00086 #define GRC_GNUTELLA_BANDWIDTH_OUT 14
00087 #define GRC_GNUTELLA_PACKETS_IN 15
00088 #define GRC_GNUTELLA_PACKETS_OUT 16
00089
00090 #define GRC_DOWNLOADS_FILES 21
00091 #define GRC_DOWNLOADS_TRANSFERS 22
00092 #define GRC_DOWNLOADS_BANDWIDTH 23
00093
00094 #define GRC_UPLOADS_TRANSFERS 31
00095 #define GRC_UPLOADS_BANDWIDTH 32
00096
00097 #define GRC_GNUTELLA_ROUTED 41
00098 #define GRC_GNUTELLA_DROPPED 42
00099 #define GRC_GNUTELLA_LOST 43
00100 #define GRC_GNUTELLA_QUERIES 44
00101
00102 #define GRC_RANDOM 100
00103
00104 #endif // !defined(AFX_GRAPHITEM_H__6C5709B5_EB88_4CAB_B61E_74F11AAB9F65__INCLUDED_)