2024-12-21 10:04:04 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "Define.h"
|
|
|
|
|
|
#include "ServiceInfo.h"
|
|
|
|
|
|
#include "SubControlBaseView.h"
|
|
|
|
|
|
#include "OXGridList.h"
|
|
|
|
|
|
#include "OXGridEdit.h"
|
|
|
|
|
|
#include <map>
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// CSubControlGaShowHideView <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
|
|
|
|
|
|
|
|
|
|
|
class CSubControlGaShowHideView : public CSubControlBaseView
|
|
|
|
|
|
{
|
|
|
|
|
|
DECLARE_DYNAMIC(CSubControlGaShowHideView)
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
// SERVER
|
|
|
|
|
|
typedef std::pair<INT, INT> TP_LISTELEM;
|
|
|
|
|
|
typedef std::vector<TP_LISTELEM> TP_LISTAUTO;
|
|
|
|
|
|
typedef TP_LISTAUTO::iterator TP_LISTAUTO_ITR;
|
|
|
|
|
|
typedef TP_LISTAUTO::const_iterator TP_LISTAUTO_CTR;
|
|
|
|
|
|
typedef std::map<INT, SERVERINFO> TP_LISTSERV;
|
|
|
|
|
|
typedef TP_LISTSERV::iterator TP_LISTSERV_ITR;
|
|
|
|
|
|
typedef TP_LISTSERV::const_iterator TP_LISTSERV_CTR;
|
|
|
|
|
|
typedef std::vector<SERVERINFO> TP_LISTSERVAUTO;
|
|
|
|
|
|
typedef TP_LISTSERVAUTO::iterator TP_LISTSERVAUTO_ITR;
|
|
|
|
|
|
typedef TP_LISTSERVAUTO::const_iterator TP_LISTSERVAUTO_CTR;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
class CSortList
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
bool operator()(const TP_LISTELEM& pLv, const TP_LISTELEM& pRv) const {
|
|
|
|
|
|
if (static_cast<INT>(pLv.first) < static_cast<INT>(pRv.first)) {
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
enum EF_UI_SIZE // UI ũ<><C5A9> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
{
|
|
|
|
|
|
EV_UIS_LIST_PAD_TOP = 30, // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_UIS_LIST_PAD_X = 10, // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> X
|
|
|
|
|
|
EV_UIS_LIST_PAD_Y = 10, // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> Y
|
|
|
|
|
|
EV_UIS_LIST_WTH = 285, // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20>ʺ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
EV_UIS_GROUP_PAD_TOP = 25, // <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_UIS_GROUP_PAD_X = 10, // <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> X
|
|
|
|
|
|
EV_UIS_GROUP_PAD_Y = 10, // <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> Y
|
|
|
|
|
|
EV_UIS_GROUP_GAP_X = 10, // <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> X
|
|
|
|
|
|
|
|
|
|
|
|
EV_UIS_RADIO_PAD_LFT = 20, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ư <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_UIS_RADIO_PAD_TOP = 50, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ư <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_UIS_RADIO_PAD_Y = 25, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ư <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD> Y
|
|
|
|
|
|
EV_UIS_RADIO_WTH = 200, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ư <20>ʺ<EFBFBD>
|
|
|
|
|
|
EV_UIS_RADIO_HGT = 15, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ư <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
EV_UIS_REQUESTBUTTON_PAD_A = 10, // <20><><EFBFBD><EFBFBD> <20><>ư <20>ܺ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_UIS_REQUESTBUTTON_WTH = 80, // <20><><EFBFBD><EFBFBD> <20><>ư <20>ʺ<EFBFBD>
|
|
|
|
|
|
EV_UIS_REQUESTBUTTON_HGT = 20, // <20><><EFBFBD><EFBFBD> <20><>ư <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
};
|
|
|
|
|
|
enum EF_REQUESTTYPE // <20><>û <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
{
|
|
|
|
|
|
EV_RQT_SHOW, // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_RQT_HIDE, // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
EV_RQT_CNT,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
CSubControlGaShowHideView(CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
|
|
|
|
|
virtual ~CSubControlGaShowHideView();
|
|
|
|
|
|
|
|
|
|
|
|
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
|
|
|
|
|
enum { IDD = IDD_CTRLFRM_GASHOWHIDE };
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
void UpdateData();
|
|
|
|
|
|
|
|
|
|
|
|
void DoPopupMenu();
|
|
|
|
|
|
void DeleteCurSelItem();
|
|
|
|
|
|
|
|
|
|
|
|
void SetSession(CNetSession* pSession) {m_pSession = pSession;}
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void AddGridList(const struct SERVERINFO* pServerInfo);
|
|
|
|
|
|
void ClearGridList() { m_GridList.DeleteAllItems(); }
|
|
|
|
|
|
|
|
|
|
|
|
static LRESULT CALLBACK GridListSubProc(HWND hWnd, UINT pMessage, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
COXGridList m_GridList;
|
|
|
|
|
|
COXGridEdit m_GridEdit;
|
|
|
|
|
|
|
|
|
|
|
|
TP_LISTSERV m_ListServ;
|
|
|
|
|
|
|
|
|
|
|
|
EF_REQUESTTYPE m_RequestType;
|
|
|
|
|
|
|
|
|
|
|
|
WNDPROC m_OldGridListSubProc;
|
|
|
|
|
|
|
|
|
|
|
|
CNetSession* m_pSession;
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
|
|
|
|
|
|
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
|
protected:
|
|
|
|
|
|
virtual void OnOK();
|
|
|
|
|
|
virtual void OnCancel();
|
|
|
|
|
|
public:
|
|
|
|
|
|
virtual BOOL OnInitDialog();
|
|
|
|
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
|
|
|
|
afx_msg void OnPaint();
|
|
|
|
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
|
|
|
|
afx_msg void OnBnClickedGaShowHideRequest();
|
|
|
|
|
|
afx_msg void OnBnClickedRadioGroup(UINT pCtrlID);
|
|
|
|
|
|
afx_msg void OnDestroy();
|
|
|
|
|
|
afx_msg void OnPopupGaShowHideDeleteItem();
|
|
|
|
|
|
};
|