📄 password.cpp
字号:
// PASSWORD.cpp : implementation file
//
#include "stdafx.h"
#include "银行储蓄系统.h"
#include "PASSWORD.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPASSWORD dialog
CPASSWORD::CPASSWORD(CWnd* pParent /*=NULL*/)
: CDialog(CPASSWORD::IDD, pParent)
{
//{{AFX_DATA_INIT(CPASSWORD)
m_accnumber = 0;
m_password = 0;
m_pass = 0;
//}}AFX_DATA_INIT
}
void CPASSWORD::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPASSWORD)
DDX_Text(pDX, IDC_EDIT1, m_accnumber);
DDX_Text(pDX, IDC_EDIT2, m_password);
DDX_Text(pDX, IDC_EDIT3, m_pass);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPASSWORD, CDialog)
//{{AFX_MSG_MAP(CPASSWORD)
ON_BN_CLICKED(IDC_CREDIT_BUTTON, OnCreditButton)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPASSWORD message handlers
BOOL CPASSWORD::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_password=0;m_pass=0;
if(tag==1)
{
m_accnumber=aS->AccountNo();
}
else if(tag==2)
{
m_accnumber=aC->AccountNo();
}
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPASSWORD::OnCreditButton()
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
if(m_password==0&&m_pass==0)
{
if(tag==1)
aS->Password(111);
else if(tag==2)
aC->Password(111);
OnOK();
}
else if(m_password==m_pass)
{
if(tag==1)
aS->Password(m_password);
else if(tag==2)
aC->Password(m_password);
OnOK();
}
else if(m_password!=m_pass)
{
m_password=0;
m_pass=0;
MessageBox("密码不正确");
UpdateData(FALSE);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -