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>
90 lines
2.2 KiB
C++
90 lines
2.2 KiB
C++
// ConnectDlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "AuthDBManager.h"
|
|
#include "ConnectDlg.h"
|
|
#include "AuthDBManagerDlg.h"
|
|
#include ".\connectdlg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CConnectDlg dialog
|
|
|
|
|
|
CConnectDlg::CConnectDlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CConnectDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CConnectDlg)
|
|
m_AuthUserName = _T("");
|
|
m_AuthUserPass = _T("");
|
|
m_DataBaseName = _T("");
|
|
m_DataSourceName = _T("");
|
|
m_ServerName = _T("");
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void CConnectDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CConnectDlg)
|
|
DDX_Control(pDX, ID_SELECT_TYPE, m_SelectControl);
|
|
DDX_Text(pDX, ID_AUTHUSER_NAME, m_AuthUserName);
|
|
DDX_Text(pDX, ID_AUTHUSER_PASS, m_AuthUserPass);
|
|
DDX_Text(pDX, ID_DATABASE_NAME, m_DataBaseName);
|
|
DDX_Text(pDX, ID_DATASOURCE_NAME, m_DataSourceName);
|
|
DDX_Text(pDX, ID_SERVER_NAME, m_ServerName);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CConnectDlg, CDialog)
|
|
//{{AFX_MSG_MAP(CConnectDlg)
|
|
// NOTE: the ClassWizard will add message map macros here
|
|
//}}AFX_MSG_MAP
|
|
ON_BN_CLICKED(IDOK, OnBnClickedOk)
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CconnectDlg message handlers
|
|
|
|
BOOL CConnectDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
// TODO: Add extra initialization here
|
|
m_SelectControl.InsertString(0, "ODBC");
|
|
m_SelectControl.InsertString(1, "OLE DB");
|
|
m_SelectControl.InsertString(2, "Source Prompt");
|
|
|
|
m_SelectControl.SetCurSel(0);
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void CConnectDlg::OnOK()
|
|
{
|
|
// TODO: Add extra validation here
|
|
CAuthDBManagerApp* pAppWnd = (CAuthDBManagerApp*)AfxGetApp();
|
|
CAuthDBManagerDlg* pDlgWnd = (CAuthDBManagerDlg*)pAppWnd->m_pMainWnd;
|
|
|
|
UpdateData();
|
|
|
|
pDlgWnd->ConnectDB(m_SelectControl.GetCurSel(), m_DataSourceName, m_ServerName, m_DataBaseName, m_AuthUserName, m_AuthUserPass);
|
|
|
|
CDialog::OnOK();
|
|
}
|
|
|
|
void CConnectDlg::OnBnClickedOk()
|
|
{
|
|
// TODO: 여기에 컨트롤 알림 처리기 코드를 추가합니다.
|
|
OnOK();
|
|
}
|