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:
137
Server/ToolProject/GameDBTool/CharSearch.cpp
Normal file
137
Server/ToolProject/GameDBTool/CharSearch.cpp
Normal file
@@ -0,0 +1,137 @@
|
||||
// CharSearch.cpp : 구현 파일입니다.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "GameDBTool.h"
|
||||
#include "CharSearch.h"
|
||||
|
||||
#include "GameDBTool.h"
|
||||
#include "GameDBToolDlg.h"
|
||||
#include ".\charsearch.h"
|
||||
|
||||
IMPLEMENT_DYNAMIC(CCharSearch, CDialog)
|
||||
CCharSearch::CCharSearch(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CCharSearch::IDD, pParent)
|
||||
, m_Data(_T(""))
|
||||
{
|
||||
}
|
||||
|
||||
CCharSearch::~CCharSearch()
|
||||
{
|
||||
}
|
||||
|
||||
void CCharSearch::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_SEARCH_TYPE, m_SearchType);
|
||||
DDX_Text(pDX, IDC_DATA, m_Data);
|
||||
DDX_Control(pDX, IDC_ALIGN_TYPE, m_AlignType);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CCharSearch, CDialog)
|
||||
ON_BN_CLICKED(IDC_SEARCH, OnBnClickedSearch)
|
||||
ON_WM_CTLCOLOR()
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
BOOL CCharSearch::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
m_SearchType.InsertString(0, "CID");
|
||||
m_SearchType.InsertString(1, "Under Inputed CID");
|
||||
m_SearchType.InsertString(2, "Over Inputed CID");
|
||||
m_SearchType.InsertString(3, "Character Name");
|
||||
m_SearchType.InsertString(4, "Character Level");
|
||||
m_SearchType.InsertString(5, "Under Inputed Level");
|
||||
m_SearchType.InsertString(6, "Over Inputed Level");
|
||||
m_SearchType.SetCurSel(0);
|
||||
|
||||
m_AlignType.InsertString(0, "Descending Series");
|
||||
m_AlignType.InsertString(1, "Ascending Series");
|
||||
m_AlignType.SetCurSel(0);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CCharSearch::OnBnClickedSearch()
|
||||
{
|
||||
CGameDBToolApp* pAppWnd = (CGameDBToolApp*)AfxGetApp();
|
||||
CGameDBToolDlg* pDlgWnd = (CGameDBToolDlg*)pAppWnd->m_pMainWnd;
|
||||
|
||||
UpdateData();
|
||||
|
||||
int CurSel = m_SearchType.GetCurSel();
|
||||
if(CB_ERR == CurSel)
|
||||
return;
|
||||
|
||||
CGameDBToolDlg::AlignType AlignType = (m_AlignType.GetCurSel() == 0) ? CGameDBToolDlg::AlignType::ASC : CGameDBToolDlg::AlignType::DESC;
|
||||
|
||||
switch(CurSel)
|
||||
{
|
||||
case 0: // 캐릭터 아이디
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::CID, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "UID");
|
||||
break;
|
||||
|
||||
case 1: // 캐릭터 아이디이하
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::CIDBelow, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "UID");
|
||||
break;
|
||||
|
||||
case 2: // 캐릭터 아이디이상
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::CIDAbove, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "UID");
|
||||
break;
|
||||
|
||||
case 3: // 캐릭터 이름
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::Name, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "Name");
|
||||
break;
|
||||
|
||||
case 4: // 캐릭터 레벨
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::Level, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "Level");
|
||||
break;
|
||||
|
||||
case 5: // 캐릭터 이하
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::LevelBelow, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "Level");
|
||||
break;
|
||||
|
||||
case 6: // 캐릭터 이상
|
||||
pDlgWnd->SetSearch(CGameDBToolDlg::SearchType::LevelAbove, m_Data.GetBuffer(0));
|
||||
pDlgWnd->SetAlign(AlignType, "Level");
|
||||
break;
|
||||
}
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
|
||||
HBRUSH CCharSearch::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
|
||||
{
|
||||
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
|
||||
|
||||
// TODO: 여기서 DC의 특성을 변경합니다.
|
||||
|
||||
HBRUSH m_hBrush;
|
||||
|
||||
m_hBrush = CreateSolidBrush(RGB( 255, 169, 128));
|
||||
|
||||
switch( nCtlColor ){
|
||||
case CTLCOLOR_DLG:
|
||||
pDC->SetBkColor(RGB( 255, 255, 255));
|
||||
pDC->SetTextColor(RGB( 0, 0, 0));
|
||||
return m_hBrush;
|
||||
break;
|
||||
case CTLCOLOR_STATIC:
|
||||
pDC->SetBkColor(RGB( 255, 169, 128));
|
||||
pDC->SetTextColor(RGB( 0, 0, 0));
|
||||
return m_hBrush;
|
||||
break;
|
||||
default:
|
||||
return hbr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user