Develop and Download Open Source Software

Browse Subversion Repository

Contents of /WinCS/SlaveView.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (show annotations) (download) (as text)
Wed Feb 10 18:21:00 2010 UTC (14 years, 2 months ago) by sho1get
File MIME type: text/x-chdr
File size: 2684 byte(s)


1 #pragma once
2
3 #include "afxwin.h"
4 #include "afxcmn.h"
5
6 //////////////////////////////////////////////////////////////////////////
7
8 class CSlaveView : public CDialog, CStringConvert
9 {
10 DECLARE_DYNAMIC(CSlaveView)
11 public:
12 CSlaveView(CWnd* pParent = NULL);
13 virtual ~CSlaveView();
14 enum { IDD = IDD_SLAVE_VIEW };
15
16 void AddConsoleText(const CString &csText, BOOL fReturn = TRUE);
17 void SetBenchmarkScore(double dbScore);
18 void SetBenchmarkRanking(DWORD dwPosition, DWORD dwAll);
19 void SetProgress(DWORD dwIndex, int nPoint);
20 void InitProgress(DWORD dwProcessors);
21 void EndProgress();
22 void SetPluginRuntime(double dbRuntime);
23 void ResetBenchmark();
24 void RefreshSystemInfo();
25 void PluginTimer();
26 void CancelPlugin();
27 void GetSendMessage(CString &cs) { cs = m_MsgString; }
28
29 void SetPlugin(const CString &cs)
30 { m_xEditPlugin.SetWindowText(cs); }
31 void SetProcessors(DWORD dwProcessors)
32 { m_xEditProcessors1.SetWindowText(DwToString(dwProcessors)); }
33 void SetBenchmarkTestTime(const CString &cs)
34 { m_xEditTestTime.SetWindowText(cs); }
35 void GetConsoleText(CString &cs)
36 { m_xEditConsole.GetWindowText(cs); }
37 void ClearConsoleText()
38 { m_xEditConsole.SetWindowText(STRING_EMPTY); }
39 void SetBenchmarkRuntime(double dbRuntime)
40 { m_xEditRuntime2.SetWindowText(DbToHMSTime(dbRuntime)); }
41
42 protected:
43 DECLARE_MESSAGE_MAP()
44 virtual void DoDataExchange(CDataExchange* pDX);
45 virtual BOOL OnInitDialog();
46 virtual BOOL PreTranslateMessage(MSG* pMsg);
47
48 afx_msg void OnBnClickedOk() {}
49 afx_msg void OnBnClickedBtnSlaveSend();
50 afx_msg void OnCbnSelchangeCmbSlaveUsage();
51 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
52
53 void SendTextMessage();
54
55 static void WINAPI doRefreshSystemInfo(LPVOID pvContext, BOOLEAN fTimeout);
56
57 public:
58 CProgressCtrl m_xProgress;
59 CComboBox m_xCmbUsageMode;
60 CStatic m_xTxtPercent;
61 CEdit m_xEditAvailPhys;
62 CEdit m_xEditTotalPhys;
63 CEdit m_xEditAvailVirtual;
64 CEdit m_xEditTotalVirtual;
65 CEdit m_xEditUsageRate;
66 CEdit m_xEditProcessors1;
67 CEdit m_xEditProcessors2;
68 CEdit m_xEditPlugin;
69 CEdit m_xEditRuntime1; // Plugin
70 CEdit m_xEditScore;
71 CEdit m_xEditRuntime2; // Benchmark
72 CEdit m_xEditTestTime;
73 CEdit m_xEditRanking1;
74 CEdit m_xEditRanking2;
75 CEdit m_xEditConsole;
76 CEdit m_xEditInput;
77 CEdit m_xEditStatus;
78
79 protected:
80 CCriticalSection m_cs;
81 CStopwatch m_Stopwatch;
82 DWORDList m_dwPrgList;
83 CString m_MsgString;
84 HANDLE m_hSystem;
85 DWORD m_dwProcessors;
86 int m_nUsageMode;
87 };
88
89 //////////////////////////////////////////////////////////////////////////
90

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26