📄 plcinidlg.cpp
字号:
}
void CPlcINIDlg::OnCheck9()
{//子项4
// TODO: Add your control notification handler code here
if((m_pin4.GetCheck()%2)!=0)
{
m_pin4.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.u3_kgbf=1;
}else
{
m_pin4.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.u3_kgbf=0;
}
}
void CPlcINIDlg::OnCheck10()
{//子项5
// TODO: Add your control notification handler code here
if((m_pin5.GetCheck()%2)!=0)
{
m_pin5.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.u4_kgbf=1;
}else
{
m_pin5.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.u4_kgbf=0;
}
}
void CPlcINIDlg::OnCheck11()
{//子项6
// TODO: Add your control notification handler code here
if((m_pin6.GetCheck()%2)!=0)
{
m_pin6.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.u5_kgbf=1;
}else
{
m_pin6.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.u5_kgbf=0;
}
}
void CPlcINIDlg::OnCheck12()
{//子项7
// TODO: Add your control notification handler code here
if((m_pin7.GetCheck()%2)!=0)
{
m_pin7.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.u6_kgbf=1;
}else
{
m_pin7.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.u6_kgbf=0;
}
}
void CPlcINIDlg::OnCheck13()
{//子项8
// TODO: Add your control notification handler code here
if((m_pin8.GetCheck()%2)!=0)
{
m_pin8.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.u7_kgbf=1;
}else
{
m_pin8.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.u7_kgbf=0;
}
}
void CPlcINIDlg::OnChangeEdit1()
{//项总数
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
CString string;
int j;
GetDlgItemText(IDC_EDIT1,wBuf,20);
j=_wtoi(wBuf);
if(j>8) j=8;
if(j<=0) j=1;
theApp.yxtask.con_in[theApp.krnum].B.unit_num=j-1;
}
void CPlcINIDlg::OnChangeEdit2()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT2,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][0]=j-1;
}
void CPlcINIDlg::OnChangeEdit3()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT3,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][2]=j-1;
}
void CPlcINIDlg::OnChangeEdit4()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT4,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][1]=j-1;
}
void CPlcINIDlg::OnChangeEdit5()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT5,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][3]=j-1;
}
void CPlcINIDlg::OnChangeEdit6()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT6,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][4]=j-1;
}
void CPlcINIDlg::OnChangeEdit7()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT7,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][5]=j-1;
}
void CPlcINIDlg::OnChangeEdit8()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT8,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][6]=j-1;
}
void CPlcINIDlg::OnChangeEdit9()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT9,wBuf,20);
j=_wtoi(wBuf);
if(j>256) j=256;
if(j<=0) j=1;
theApp.yxtask.us[theApp.krnum][7]=j-1;
}
void CPlcINIDlg::OnChangeEdit10()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function to send the EM_SETEVENTMASK message to the control
// with the ENM_CHANGE flag ORed into the lParam mask.
// TODO: Add your control notification handler code here
unsigned short wBuf[32];
int j;
CString string;
GetDlgItemText(IDC_EDIT10,wBuf,20);
j=_wtoi(wBuf);
theApp.yxtask.bvtm[theApp.krnum]=j;
}
void CPlcINIDlg::OnCheck14()
{//上升沿计数
// TODO: Add your control notification handler code here
if((m_upmc.GetCheck()%2)!=0)
{
m_upmc.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.upm_enable=1;
}else
{
m_upmc.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.upm_enable=0;
}
}
void CPlcINIDlg::OnCheck15()
{//下降沿计数
// TODO: Add your control notification handler code here
if((m_dnmc.GetCheck()%2)!=0)
{
m_dnmc.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.dnm_enable=1;
}else
{
m_dnmc.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.dnm_enable=0;
}
}
void CPlcINIDlg::OnCheck16()
{//SOE允许
// TODO: Add your control notification handler code here
if((m_soepm.GetCheck()%2)!=0)
{
m_soepm.SetCheck(1);
theApp.yxtask.con_in[theApp.krnum].B.soe_enable=1;
}else
{
m_soepm.SetCheck(0);
theApp.yxtask.con_in[theApp.krnum].B.soe_enable=0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -