📄 conwnddlg.cpp
字号:
}
}
void CConWndDlg::OnWs2off()
{//波峰二关 //44 45
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].ws2_off_enable!=0)
{
if(m_ws2off.m_nColor!=45)
{
m_ws2off.m_nColor=45;
m_ws2off.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,135);
theApp.YKOUTPUT(YK_WS2_JON,YKOFF);
theApp.ws2_switch=0x00;
if(m_ws2on.m_nColor!=42)
{
m_ws2on.m_nColor=42;
m_ws2on.InvalidateRect (NULL);
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnWs2offf()
{//波峰二关 //44 45
// TODO: Add your control notification handler code here
if(m_ws2off.m_nColor!=45)
{
m_ws2off.m_nColor=45;
m_ws2off.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,135);
theApp.YKOUTPUT(YK_WS2_JON,YKOFF);
theApp.ws2_switch=0x00;
if(m_ws2on.m_nColor!=42)
{
m_ws2on.m_nColor=42;
m_ws2on.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnTranson()
{//传输开 26 28
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].trans_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(m_on.m_nColor==20)
{
if(m_transon.m_nColor!=28)
{
theApp.TransOn();
m_transon.m_nColor=28;
m_transon.InvalidateRect (NULL);
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,136);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,73);
theApp.Contrans_Soe_Flag=0;
theApp.Contrans_Soe_do_Flag=0;
theApp.soe_flag=0;
theApp.YKOUTPUT(YK_TRANS_ACON,YKON);
theApp.Contrans_Count=0;
if(m_transoff.m_nColor!=27)
{
m_transoff.m_nColor=27;
m_transoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{// 请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnTransoff()
{//传输关 27 29
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].trans_off_enable!=0)
{
if(m_transoff.m_nColor!=29)
{
theApp.TransOff();
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,136);
theApp.YKOUTPUT(YK_TRANS_ACON,YKOFF);
m_transoff.m_nColor=29;
m_transoff.InvalidateRect (NULL);
if(m_transon.m_nColor!=26)
{
m_transon.m_nColor=26;
m_transon.InvalidateRect (NULL);
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{// 请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnTransofff()
{//传输关 27 29
// TODO: Add your control notification handler code here
if(m_transoff.m_nColor!=29)
{
theApp.TransOff();
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,136);
theApp.YKOUTPUT(YK_TRANS_ACON,YKOFF);
m_transoff.m_nColor=29;
m_transoff.InvalidateRect (NULL);
if(m_transon.m_nColor!=26)
{
m_transon.m_nColor=26;
m_transon.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnQxon()
{//清洗开
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].lpw_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(m_pwon.m_nColor==48) return;
if(m_on.m_nColor==20)
{
if(m_qxon.m_nColor!=60)
{
m_qxon.m_nColor=60;
m_qxon.InvalidateRect (NULL);
theApp.SelfCheckFlag=0xff;//连喷开
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,141);
if(theApp.pw_type!=0)//助焊方法
{
// theApp.YKOUTPUT(YK_SHIFT,YKON);//喷雾开
}
theApp.plc_control=theApp.plc_control | 0x02;
if(m_qxoff.m_nColor!=59)
{
m_qxoff.m_nColor=59;
m_qxoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnQxoff()
{//连喷关
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].lpw_off_enable!=0)
{
if(m_qxoff.m_nColor!=61)
{
m_qxoff.m_nColor=61;
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,141);
m_qxoff.InvalidateRect (NULL);
theApp.SelfCheckFlag=0;
if(theApp.pw_type!=0)//助焊方法
{
// theApp.YKOUTPUT(YK_SHIFT,YKOFF);//喷雾关
}
theApp.plc_control=theApp.plc_control & 0xfffd;
if(m_qxon.m_nColor!=58)
{
m_qxon.m_nColor=58;
m_qxon.InvalidateRect (NULL);
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnQxofff()
{//连喷关
// TODO: Add your control notification handler code here
if(m_qxoff.m_nColor!=61)
{
m_qxoff.m_nColor=61;
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,141);
m_qxoff.InvalidateRect (NULL);
theApp.SelfCheckFlag=0;
if(theApp.pw_type!=0)//助焊方法
{
// theApp.YKOUTPUT(YK_SHIFT,YKOFF);//喷雾关
}
theApp.plc_control=theApp.plc_control & 0xfffd;
if(m_qxon.m_nColor!=58)
{
m_qxon.m_nColor=58;
m_qxon.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnXzon()
{//洗爪开
// TODO: Add your control notification handler code here
if(m_off.m_nColor==21) return;
if(m_on.m_nColor==20)
{
if(m_xzon.m_nColor!=56)
{
m_xzon.m_nColor=56;
m_xzon.InvalidateRect (NULL);
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,140);
theApp.YKOUTPUT(YK_CFOOT_JON,YKON);
if(m_xzoff.m_nColor!=55)
{
m_xzoff.m_nColor=55;
m_xzoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}
void CConWndDlg::OnXzoff()
{//洗爪关
// TODO: Add your control notification handler code here
if(m_xzoff.m_nColor!=57)
{
m_xzoff.m_nColor=57;
m_xzoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,140);
theApp.YKOUTPUT(YK_CFOOT_JON,YKOFF);
if(m_xzon.m_nColor!=54)
{
m_xzon.m_nColor=54;
m_xzon.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnZmon()
{//调窄 //ZMON.BMP ZMOFF.BMP JZMON.BMP JZMOFF.BMP
// TODO: Add your control notification handler code here
if(m_off.m_nColor==21) return;
if(m_transon.m_nColor==28)
{
theApp.YKOUTPUT(YK_TZ,YKOFF);
theApp.YKOUTPUT(YK_TK,YKOFF);
return;
}
if(m_zmon.m_dot_flag==0)
{//调窄关
m_zmon.m_nColor=50;
m_zmon.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,139);
theApp.YKOUTPUT(YK_TZ,YKOFF);
if(m_zmoff.m_nColor!=53)
{
theApp.YKOUTPUT(YK_TK,YKOFF);
}
}else
{//调窄开
m_zmon.m_nColor=52;///调窄开
m_zmon.InvalidateRect (NULL);
theApp.YKOUTPUT(YK_TZ,YKON);
theApp.YKOUTPUT(YK_TK,YKOFF);
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,139);
if(m_zmoff.m_nColor!=51)
{
m_zmoff.m_nColor=51;//调宽关
m_zmoff.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnZmoff()
{//调宽//ZMON.BMP ZMOFF.BMP JZMON.BMP JZMOFF.BMP
// TODO: Add your control notification handler code here
if(m_off.m_nColor==21) return;
if(m_transon.m_nColor==28)
{
theApp.YKOUTPUT(YK_TZ,YKOFF);
theApp.YKOUTPUT(YK_TK,YKOFF);
return;
}
if(m_zmoff.m_dot_flag==0)
{//调宽关
m_zmoff.m_nColor=51;
m_zmoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,138);
theApp.YKOUTPUT(YK_TK,YKOFF);
if(m_zmon.m_nColor!=52)
{
theApp.YKOUTPUT(YK_TZ,YKOFF);
}
}else
{//调宽开
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,138);
m_zmoff.m_nColor=53;
m_zmoff.InvalidateRect (NULL);
theApp.YKOUTPUT(YK_TK,YKON);
theApp.YKOUTPUT(YK_TZ,YKOFF);
if(m_zmon.m_nColor!=50)
{
m_zmon.m_nColor=50;
m_zmon.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnPwon()
{//喷雾开
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].pw_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(m_qxon.m_nColor==60) return;
if(m_on.m_nColor==20)
{
if(m_pwon.m_nColor!=48)
{
m_pwon.m_nColor=48;
theApp.plc_control=theApp.plc_control | 0x01;
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,137);
m_pwon.InvalidateRect (NULL);
if(m_pwoff.m_nColor!=47)
{
m_pwoff.m_nColor=47;
m_pwoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnPwoff()
{ //喷雾关
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].pw_off_enable!=0)
{
if(m_pwoff.m_nColor!=49)
{
m_pwoff.m_nColor=49;
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,137);
theApp.plc_control=theApp.plc_control & 0xfffe;
m_pwoff.InvalidateRect (NULL);
if(m_pwon.m_nColor!=46)
{
m_pwon.m_nColor=46;
m_pwon.InvalidateRect (NULL);
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnPwofff()
{ //喷雾关
// TODO: Add your control notification handler code here
if(m_pwoff.m_nColor!=49)
{
m_pwoff.m_nColor=49;
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,137);
theApp.plc_control=theApp.plc_control & 0xfffe;
m_pwoff.InvalidateRect (NULL);
if(m_pwon.m_nColor!=46)
{
m_pwon.m_nColor=46;
m_pwon.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnSetUp()
{
theApp.m_auto_m_nColor=m_auto.m_nColor;
theApp.m_manul_m_nColor=m_manul.m_nColor;
theApp.m_on_m_nColor=m_on.m_nColor;
theApp.m_off_m_nColor=m_off.m_nColor;
theApp.m_r1hoton_m_nColor=m_r1hoton.m_nColor;
theApp.m_r1hotoff_m_nColor=m_r1hotoff.m_nColor;
theApp.m_transon_m_nColor=m_transon.m_nColor;
theApp.m_transoff_m_nColor=m_transoff.m_nColor;
theApp.m_slhoton_m_nColor=m_slhoton.m_nColor;
theApp.m_slhotoff_m_nColor=m_slhotoff.m_nColor;
theApp.m_ws1on_m_nColor=m_ws1on.m_nColor;
theApp.m_ws1off_m_nColor=m_ws1off.m_nColor;
theApp.m_ws2on_m_nColor=m_ws2on.m_nColor;
theApp.m_ws2off_m_nColor=m_ws2off.m_nColor;
theApp.m_pwon_m_nColor=m_pwon.m_nColor;
theApp.m_pwoff_m_nColor=m_pwoff.m_nColor;
theApp.m_zmon_m_nColor=m_zmon.m_nColor;
theApp.m_zmoff_m_nColor=m_zmoff.m_nColor;
theApp.m_xzon_m_nColor=m_xzon.m_nColor;
theApp.m_xzoff_m_nColor=m_xzoff.m_nColor;
theApp.m_qxon_m_nColor=m_qxon.m_nColor;
theApp.m_qxoff_m_nColor=m_qxoff.m_nColor;
theApp.m_r2hoton_m_nColor=m_r2hoton.m_nColor;
theApp.m_r2hotoff_m_nColor=m_r2hotoff.m_nColor;
theApp.m_r3hoton_m_nColor=m_r3hoton.m_nColor;
theApp.m_r3hotoff_m_nColor=m_r3hotoff.m_nColor;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -