Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
118
Server/AdminTool/AdminToolClient/GAdminInfoEditDlg.cpp
Normal file
118
Server/AdminTool/AdminToolClient/GAdminInfoEditDlg.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
// GAdminInfoEditDlg.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "AdminToolClient.h"
|
||||
#include "GAdminInfoEditDlg.h"
|
||||
#include "PacketManager.h"
|
||||
#include "CharacterDoc.h"
|
||||
#include "GlobalFunctions.h"
|
||||
|
||||
|
||||
|
||||
// CGAdminInfoEditDlg <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
IMPLEMENT_DYNAMIC(CGAdminInfoEditDlg, CDialog)
|
||||
CGAdminInfoEditDlg::CGAdminInfoEditDlg(CString strServerGroup, CString strUID, CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CGAdminInfoEditDlg::IDD, pParent)
|
||||
, m_strServerGroup(strServerGroup)
|
||||
, m_strUID(strUID)
|
||||
{
|
||||
}
|
||||
|
||||
CGAdminInfoEditDlg::~CGAdminInfoEditDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void CGAdminInfoEditDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_GAMIE_ADMINLV_CB, m_ctrlAdminLV);
|
||||
DDX_Control(pDX, IDC_GAMIE_LIMITSTART_IP, m_ctrlStartIP);
|
||||
DDX_Control(pDX, IDC_GAMIE_LIMITEND_IP, m_ctrlEndIP);
|
||||
DDX_Text(pDX, IDC_GAMIE_GROUP_EDIT, m_strServerGroup);
|
||||
DDX_Text(pDX, IDC_GAMIE_UID_EDIT, m_strUID);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGAdminInfoEditDlg, CDialog)
|
||||
ON_BN_CLICKED(IDC_GAMIE_EDIT_BTN, OnBnClickedGamieEditBtn)
|
||||
ON_BN_CLICKED(IDC_GAMIE_CANCEL_BTN, OnBnClickedGamieCancelBtn)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CGAdminInfoEditDlg <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
BOOL CGAdminInfoEditDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
m_ctrlAdminLV.InsertString(0, _T("Supporter"));
|
||||
m_ctrlAdminLV.InsertString(1, _T("Admin LV1"));
|
||||
m_ctrlAdminLV.InsertString(2, _T("Admin LV2"));
|
||||
m_ctrlAdminLV.InsertString(3, _T("Admin LV3"));
|
||||
m_ctrlAdminLV.InsertString(4, _T("Developer"));
|
||||
|
||||
SetWindowText(GetLocalString("IDD_GADMININFOEDITDLG"));
|
||||
|
||||
SetUIString(this->m_hWnd, IDC_GAMEADMINEDIT_01, "IDC_GAMEADMINEDIT_01");
|
||||
SetUIString(this->m_hWnd, IDC_GAMEADMINEDIT_02, "IDC_GAMEADMINEDIT_02");
|
||||
SetUIString(this->m_hWnd, IDC_GAMEADMINEDIT_03, "IDC_GAMEADMINEDIT_03");
|
||||
|
||||
UpdateData(false);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CGAdminInfoEditDlg::OnBnClickedGamieEditBtn()
|
||||
{
|
||||
UpdateData(true);
|
||||
|
||||
if(CB_ERR != m_ctrlAdminLV.GetCurSel() && !m_strUID.IsEmpty())
|
||||
{
|
||||
unsigned long dwServerGroup;
|
||||
CCharacterDoc::GetInstance().GetServerIndex(m_strServerGroup, dwServerGroup);
|
||||
|
||||
TCHAR szStartIP[PktAdminMgr::MAX_IP], szEndIP[PktAdminMgr::MAX_IP];
|
||||
|
||||
if(m_ctrlStartIP.IsBlank())
|
||||
_sntprintf(szStartIP, PktAdminMgr::MAX_IP, _T("NULL"));
|
||||
|
||||
if(m_ctrlEndIP.IsBlank())
|
||||
_sntprintf(szEndIP, PktAdminMgr::MAX_IP, _T("NULL"));
|
||||
|
||||
if(!(m_ctrlStartIP.IsBlank() && m_ctrlEndIP.IsBlank()))
|
||||
{
|
||||
m_ctrlStartIP.GetWindowText(szStartIP, PktAdminMgr::MAX_IP);
|
||||
m_ctrlEndIP.GetWindowText(szEndIP, PktAdminMgr::MAX_IP);
|
||||
}
|
||||
|
||||
CPacketMgr::GetInstance()->SendGameAdmin(PktAdminMgr::PktGameAdmin::EDIT, dwServerGroup,
|
||||
_ttol(m_strUID), m_ctrlAdminLV.GetCurSel() + 1, szStartIP, szEndIP);
|
||||
|
||||
OnOK();
|
||||
}
|
||||
}
|
||||
|
||||
void CGAdminInfoEditDlg::OnBnClickedGamieCancelBtn()
|
||||
{
|
||||
this->OnCancel();
|
||||
}
|
||||
|
||||
void CGAdminInfoEditDlg::OnOK()
|
||||
{
|
||||
//CDialog::OnOK();
|
||||
}
|
||||
|
||||
BOOL CGAdminInfoEditDlg::PreTranslateMessage(MSG* pMsg)
|
||||
{
|
||||
if((WM_KEYDOWN == pMsg->message) && (VK_RETURN == pMsg->wParam))
|
||||
{
|
||||
if(pMsg->hwnd == GetDlgItem(IDC_GAMIE_LIMITEND_IP)->m_hWnd)
|
||||
{
|
||||
OnBnClickedGamieEditBtn();
|
||||
}
|
||||
}
|
||||
|
||||
return CDialog::PreTranslateMessage(pMsg);
|
||||
}
|
||||
Reference in New Issue
Block a user