You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
|
|
#include "stdafx.h"
|
|
#include "LaiPuLaser.h"
|
|
#include "afxdialogex.h"
|
|
#include "DlgAuthorityPar.h"
|
|
#include "AuthorityMgr.h"
|
|
|
|
|
|
IMPLEMENT_DYNAMIC(CDlgAuthorityPar, CDialogEx)
|
|
BEGIN_MESSAGE_MAP(CDlgAuthorityPar, CDialogEx)
|
|
ON_BN_CLICKED(IDOK,OnBnClickedOk)
|
|
ON_CBN_SELCHANGE(IDC_AUTH_TYPE_COMBO, &CDlgAuthorityPar::OnCbnSelchangeAuthTypeCombo)
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
CDlgAuthorityPar::CDlgAuthorityPar(CWnd* pParent /*=NULL*/)
|
|
: CDialogEx(CDlgAuthorityPar::IDD, pParent)
|
|
{
|
|
m_CurAuthorityType = 0;
|
|
}
|
|
|
|
CDlgAuthorityPar::~CDlgAuthorityPar()
|
|
{
|
|
}
|
|
|
|
void CDlgAuthorityPar::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialogEx::DoDataExchange(pDX);
|
|
DDX_Control(pDX, NEW_AUTH_PAR_LIST, m_AuthorityParList);
|
|
DDX_Control(pDX, IDC_AUTH_TYPE_COMBO, m_AuthorityTypeCombo);
|
|
}
|
|
|
|
BOOL CDlgAuthorityPar::OnInitDialog()
|
|
{
|
|
CDialogEx::OnInitDialog();
|
|
|
|
gAuthorityMgr->InitAuthorityParList(m_AuthorityParList);
|
|
gAuthorityMgr->InitAuthorityTypeComb(m_AuthorityTypeCombo);
|
|
UpdateData(FALSE);
|
|
return TRUE;
|
|
}
|
|
|
|
void CDlgAuthorityPar::OnBnClickedOk()
|
|
{
|
|
gAuthorityMgr->UpdateAuthorityPar(m_AuthorityParList,m_CurAuthorityType);
|
|
gAuthorityMgr->SaveAuthorityParaFile();
|
|
OnOK();
|
|
}
|
|
void CDlgAuthorityPar::OnCbnSelchangeAuthTypeCombo()
|
|
{
|
|
gAuthorityMgr->UpdateAuthorityPar(m_AuthorityParList,m_CurAuthorityType);
|
|
m_CurAuthorityType = m_AuthorityTypeCombo.GetCurSel();
|
|
gAuthorityMgr->UpdateAuthorityParList(m_AuthorityParList,m_CurAuthorityType);
|
|
}
|