| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "afxwin.h" |
| 4 |
#include "ImageEx.h" |
| 5 |
|
| 6 |
////////////////////////////////////////////////////////////////////////// |
| 7 |
|
| 8 |
class CStatusView : public CDialog, CStringConvert |
| 9 |
{ |
| 10 |
DECLARE_DYNAMIC(CStatusView) |
| 11 |
|
| 12 |
public: |
| 13 |
CStatusView(CWnd* pParent = NULL); |
| 14 |
virtual ~CStatusView(); |
| 15 |
enum { IDD = IDD_STATUS_VIEW }; |
| 16 |
|
| 17 |
void SetNodeType(WORD wNodeType); |
| 18 |
void SetNodeID(WORD wNodeID); |
| 19 |
void SetNodeState(WORD wNodeState); |
| 20 |
void SetLocalAddress(DWORD dwAddress); |
| 21 |
void SetMasterAddress(DWORD dwAddress); |
| 22 |
void SetUDPPort(WORD wPort); |
| 23 |
void SetTCPPort(WORD wPort); |
| 24 |
|
| 25 |
void SetPluginInfo(const PLUGIN_INFO &info); |
| 26 |
void SetPluginState(BOOL fLock); |
| 27 |
void PluginInfoClear(); |
| 28 |
void ResetMasterAddress(); |
| 29 |
void ResetNodeID(); |
| 30 |
void DeletePluginList(); |
| 31 |
void AddPluginList(const CString &csModule); |
| 32 |
void SelectPluginList(UINT nIndex); |
| 33 |
void SetReloadBtn(BOOL fEnable); |
| 34 |
|
| 35 |
protected: |
| 36 |
DECLARE_MESSAGE_MAP() |
| 37 |
virtual void DoDataExchange(CDataExchange* pDX); |
| 38 |
virtual BOOL OnInitDialog(); |
| 39 |
|
| 40 |
afx_msg void OnBnClickedOk() {} |
| 41 |
afx_msg void OnBnClickedBtnStatusPluginReload(); |
| 42 |
afx_msg void OnCbnSelchangeCmbStatusPlugin(); |
| 43 |
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); |
| 44 |
|
| 45 |
void RuntimeTimer(); |
| 46 |
static void WINAPI doRuntimeTimer(LPVOID pvContext, BOOLEAN fTimeout); |
| 47 |
|
| 48 |
public: |
| 49 |
CComboBox m_xCmbPlugin; |
| 50 |
CButton m_xBtnPluginReload; |
| 51 |
CStatic m_xImageType; |
| 52 |
CEdit m_xEditNodeID; |
| 53 |
CEdit m_xEditPluginVersion; |
| 54 |
CEdit m_xEditPluginType; |
| 55 |
CEdit m_xEditPluginText; |
| 56 |
CEdit m_xEditNodeState; |
| 57 |
CEdit m_xEditLocalAddress; |
| 58 |
CEdit m_xEditMasterAddress; |
| 59 |
CEdit m_xEditUDPClientPort; |
| 60 |
CEdit m_xEditTCPPort; |
| 61 |
CEdit m_xEditRuntime; |
| 62 |
|
| 63 |
protected: |
| 64 |
typedef std::tr1::shared_ptr<CImageExResource> CImgExResPtr; |
| 65 |
|
| 66 |
WORD m_wNodeType; |
| 67 |
DWORD m_dwStartTime; |
| 68 |
HICON m_hBtnIcon; |
| 69 |
HANDLE m_hTimer; |
| 70 |
WCS_STATUS m_wcsStatus; |
| 71 |
CStopwatch m_Stopwatch; |
| 72 |
}; |
| 73 |
|
| 74 |
////////////////////////////////////////////////////////////////////////// |