| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "afxcmn.h" |
| 4 |
#include "afxwin.h" |
| 5 |
|
| 6 |
////////////////////////////////////////////////////////////////////////// |
| 7 |
|
| 8 |
class CMasterView : public CDialog, CStringConvert |
| 9 |
{ |
| 10 |
DECLARE_DYNAMIC(CMasterView) |
| 11 |
|
| 12 |
public: |
| 13 |
CMasterView(CWnd* pParent = NULL); |
| 14 |
virtual ~CMasterView(); |
| 15 |
enum { IDD = IDD_MASTER_VIEW }; |
| 16 |
|
| 17 |
void AddNodeList(NODE_DATA nd); |
| 18 |
void RemoveNodeList(WORD wNodeID); |
| 19 |
void SetNodeState(WORD wNodeID, WORD wNodeState); |
| 20 |
void SetNodeProcessors(WORD wNodeID, DWORD dwProcessors); |
| 21 |
void SetSlaves(DWORD dwCount); |
| 22 |
void SetProcessors(DWORD dwCount); |
| 23 |
void SetPluginName(const CString &cs); |
| 24 |
void SetBenchmarkNodes(DWORD dwCount); |
| 25 |
void SetBenchmarkScore(double dbScore); |
| 26 |
void SetBenchmarkRuntime(double dbRuntime); |
| 27 |
void SetBenchmarkTestTime(const CString &cs); |
| 28 |
void AddConsoleText(const CString &csText, BOOL fReturn = TRUE); |
| 29 |
void ClearConsoleText(); |
| 30 |
void GetSendMessage(CString &cs); |
| 31 |
void GetConsoleText(CString &cs); |
| 32 |
void ResetBenchmark(); |
| 33 |
BOOL IsPluginLocked() { return m_fPluginLocked; } |
| 34 |
|
| 35 |
protected: |
| 36 |
DECLARE_MESSAGE_MAP() |
| 37 |
virtual void DoDataExchange(CDataExchange* pDX); |
| 38 |
virtual BOOL OnInitDialog(); |
| 39 |
virtual BOOL PreTranslateMessage(MSG* pMsg); |
| 40 |
|
| 41 |
afx_msg void OnBnClickedOk() {} |
| 42 |
afx_msg void OnBnClickedBtnMasterSend(); |
| 43 |
afx_msg void OnBnClickedBtnMasterPluginDistribution(); |
| 44 |
afx_msg void OnBnClickedCheckPluginLock(); |
| 45 |
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); |
| 46 |
|
| 47 |
int SearchNodeListIndex(WORD wNodeID); |
| 48 |
void SendTextMessage(); |
| 49 |
CString GetNodeType(WORD wNodeType); |
| 50 |
CString GetNodeState(WORD wNodeState); |
| 51 |
|
| 52 |
public: |
| 53 |
CListCtrl m_xNodeList; |
| 54 |
CButton m_xBtnTransfer; |
| 55 |
CButton m_xCheckLock; |
| 56 |
CEdit m_xEditInput; |
| 57 |
CEdit m_xEditConsole; |
| 58 |
CEdit m_xEditSlaves; |
| 59 |
CEdit m_xEditProcessors; |
| 60 |
CEdit m_xEditNodes; |
| 61 |
CEdit m_xEditScore; |
| 62 |
CEdit m_xEditRuntime; |
| 63 |
CEdit m_xEditPlugin; |
| 64 |
CEdit m_xEditTestTime; |
| 65 |
|
| 66 |
protected: |
| 67 |
CCriticalSection m_cs; |
| 68 |
CString m_MsgString; |
| 69 |
BOOL m_fPluginLocked; |
| 70 |
}; |
| 71 |
|
| 72 |
////////////////////////////////////////////////////////////////////////// |
| 73 |
|