82 lines
1.9 KiB
C++
82 lines
1.9 KiB
C++
// InputElectrodeNumDlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "InputElectrodeNumDlg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
extern int g_iUILanguage;
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CInputElectrodeNumDlg dialog
|
|
|
|
|
|
CInputElectrodeNumDlg::CInputElectrodeNumDlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CInputElectrodeNumDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CInputElectrodeNumDlg)
|
|
m_x = 0;
|
|
m_y = 0;
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void CInputElectrodeNumDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CInputElectrodeNumDlg)
|
|
DDX_Text(pDX, IDC_X, m_x);
|
|
DDX_Text(pDX, IDC_Y, m_y);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CInputElectrodeNumDlg, CDialog)
|
|
//{{AFX_MSG_MAP(CInputElectrodeNumDlg)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CInputElectrodeNumDlg message handlers
|
|
|
|
void CInputElectrodeNumDlg::OnOK()
|
|
{
|
|
// TODO: Add extra validation here
|
|
if (m_x == 0|| m_y == 0)
|
|
{
|
|
if (LANG_ZHCN == g_iUILanguage)
|
|
AfxMessageBox(_T("x和y的值都不能为零."));
|
|
else
|
|
MessageBoxEx(NULL, _T("X or y can not equal to zero"), STRING_MESSAGEBOXEX_TITLE, MB_OK, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
|
|
return;
|
|
}
|
|
|
|
if (m_x == m_y)
|
|
{
|
|
if (LANG_ZHCN == g_iUILanguage)
|
|
AfxMessageBox(_T("x不能等于y."));
|
|
else
|
|
MessageBoxEx(NULL, _T("X can not equal to y"), STRING_MESSAGEBOXEX_TITLE, MB_OK, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US));
|
|
return;
|
|
}
|
|
|
|
CDialog::OnOK();
|
|
}
|
|
|
|
BOOL CInputElectrodeNumDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
// TODO: Add extra initialization here
|
|
m_x = 0;
|
|
m_y = 0;
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|