📄 dlglock.cpp
字号:
{
InitDataDefineProc();
CDialog::OnInitDialog();
char headName[60];
strcpy(headName, dlgName);
strcat(headName,"闭锁条件设置");
SetWindowText(headName);
OnSelchangeCheckBhNum();
OnSelchangeCheckYxNum();
OnSelchangeCheckYcNum();
DispDblinkDefineButton();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void dlglock::OnSelchangeCheckBhNum()
{
// TODO: Add your control notification handler code here
BYTE i;
m_CheckBhNum = (int)SendDlgItemMessage(IDC_CheckBhNum,CB_GETCURSEL,0,0L);
if (m_CheckBhNum == CB_ERR) return;
for (i=0;i<LOCKVQC_BHNUM;i++){
if (i>=m_CheckBhNum) GetDlgItem(IDC_CheckBhRec1+i)->EnableWindow(FALSE);
else GetDlgItem(IDC_CheckBhRec1+i)->EnableWindow(TRUE);
}
}
void dlglock::OnSelchangeCheckYxNum()
{
// TODO: Add your control notification handler code here
BYTE i;
m_CheckYxNum = (int)SendDlgItemMessage(IDC_CheckYxNum,CB_GETCURSEL,0,0L);
if (m_CheckYxNum == CB_ERR) return;
for (i=0;i<LOCKVQC_YXNUM;i++){
if (i<m_CheckYxNum) {
GetDlgItem(IDC_CheckYxRec1+i)->EnableWindow(TRUE);
GetDlgItem(IDC_CheckYxStatus1+i)->EnableWindow(TRUE);
GetDlgItem(IDC_IsNeedManClearYx1+i)->EnableWindow(TRUE);
}
else {
GetDlgItem(IDC_CheckYxRec1+i)->EnableWindow(FALSE);
GetDlgItem(IDC_CheckYxStatus1+i)->EnableWindow(FALSE);
GetDlgItem(IDC_IsNeedManClearYx1+i)->EnableWindow(FALSE);
}
}
}
void dlglock::OnSelchangeCheckYcNum()
{
// TODO: Add your control notification handler code here
BYTE i;
m_CheckYcNum = (int)SendDlgItemMessage(IDC_CheckYcNum,CB_GETCURSEL,0,0L);
if (m_CheckYcNum == CB_ERR) return;
for (i=0;i<LOCKVQC_YXNUM;i++){
if (i<m_CheckYcNum) {
GetDlgItem(IDC_CheckYcRec1+i)->EnableWindow(TRUE);
GetDlgItem(IDC_CheckYcType1+i)->EnableWindow(TRUE);
GetDlgItem(IDC_CheckYcValue1+i)->EnableWindow(TRUE);
}
else {
GetDlgItem(IDC_CheckYcRec1+i)->EnableWindow(FALSE);
GetDlgItem(IDC_CheckYcType1+i)->EnableWindow(FALSE);
GetDlgItem(IDC_CheckYcValue1+i)->EnableWindow(FALSE);
}
}
}
void dlglock::OnCheckBhRec1()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckBhRec1), "保护1",dlgName, "保护单元1", &lockSet.CheckBhRec[0], DATA_TYPE_BH);
}
void dlglock::OnCheckBhRec2()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckBhRec2), "保护2",dlgName, "保护单元2", &lockSet.CheckBhRec[1], DATA_TYPE_BH);
}
void dlglock::OnCheckBhRec3()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckBhRec3), "保护3",dlgName, "保护单元3", &lockSet.CheckBhRec[2], DATA_TYPE_BH);
}
void dlglock::OnCheckBhRec4()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckBhRec4), "保护4",dlgName, "保护单元4", &lockSet.CheckBhRec[3], DATA_TYPE_BH);
}
void dlglock::OnCheckYcRec1()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec1), "遥测1",dlgName, "遥测闭锁量1", &lockSet.CheckYcRec[0], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec2()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec2), "遥测2",dlgName, "遥测闭锁量2", &lockSet.CheckYcRec[1], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec3()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec3), "遥测3",dlgName, "遥测闭锁量3", &lockSet.CheckYcRec[2], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec4()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec4), "遥测4",dlgName, "遥测闭锁量4", &lockSet.CheckYcRec[3], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec5()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec5), "遥测5",dlgName, "遥测闭锁量5", &lockSet.CheckYcRec[4], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec6()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec6), "遥测6",dlgName, "遥测闭锁量6", &lockSet.CheckYcRec[5], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec7()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec7), "遥测7",dlgName, "遥测闭锁量7", &lockSet.CheckYcRec[6], DATA_TYPE_YC);
}
void dlglock::OnCheckYcRec8()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYcRec8), "遥测8",dlgName, "遥测闭锁量8", &lockSet.CheckYcRec[7], DATA_TYPE_YC);
}
void dlglock::OnCheckYxRec1()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec1), "闭锁1",dlgName, "闭锁信号1", &lockSet.CheckYxRec[0], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec2()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec2), "闭锁2",dlgName, "闭锁信号2", &lockSet.CheckYxRec[1], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec3()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec3), "闭锁3",dlgName, "闭锁信号3", &lockSet.CheckYxRec[2], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec4()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec4), "闭锁4",dlgName, "闭锁信号4", &lockSet.CheckYxRec[3], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec5()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec5), "闭锁5",dlgName, "闭锁信号5", &lockSet.CheckYxRec[4], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec6()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec6), "闭锁6",dlgName, "闭锁信号6", &lockSet.CheckYxRec[5], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec7()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec7), "闭锁7",dlgName, "闭锁信号7", &lockSet.CheckYxRec[6], DATA_TYPE_YXDEV);
}
void dlglock::OnCheckYxRec8()
{
// TODO: Add your control notification handler code here
DoDataDblinkDefineProc(GetDlgItem(IDC_CheckYxRec8), "闭锁8",dlgName, "闭锁信号8", &lockSet.CheckYxRec[7], DATA_TYPE_YXDEV);
}
void dlglock::DispDblinkDefineButton()
{
int i;
char szText[128];
for (i=0;i<LOCKVQC_YXNUM;i++){
lockSet.CheckYxRec[i].GetName(szText);
GetDlgItem(IDC_CheckYxRec1+i)->SetWindowText(szText);
}
for (i=0;i<LOCKVQC_YCNUM;i++){
lockSet.CheckYcRec[i].GetName(szText);
GetDlgItem(IDC_CheckYcRec1+i)->SetWindowText(szText);
}
for (i=0;i<LOCKVQC_BHNUM;i++){
lockSet.CheckBhRec[i].GetName(szText);
GetDlgItem(IDC_CheckBhRec1+i)->SetWindowText(szText);
}
}
void dlglock::OnReSet()
{
// TODO: Add your control notification handler code here
lockSet.Lock_Condition::Lock_Condition();
DispDblinkDefineButton();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -