📄 conwnddlg.cpp
字号:
}
}
void CConWndDlg::OnR1hotofff()
{//预热1关
// TODO: Add your control notification handler code here
if(m_r1hotoff.m_nColor!=33)
{
m_r1hotoff.m_nColor=33;
m_r1hotoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,130);
theApp.YKOUTPUT(YK_RH1_ACON,YKOFF);/* 预热接触器1 */
theApp.rh1_switch=0x00;
theApp.rh1_count=0;
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,131)==false)
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,132)==false) theApp.FanOff();
}
if(m_r1hoton.m_nColor!=30)
{
m_r1hoton.m_nColor=30;
m_r1hoton.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnR2hoton()
{//预热2开 r2hoton // 64 65
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].rh2_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(m_on.m_nColor==20)
{
if(m_r2hoton.m_nColor!=64)
{
m_r2hoton.m_nColor=64;
m_r2hoton.InvalidateRect (NULL);
theApp.rh2_switch=0xff;
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,131);
theApp.YKOUTPUT(YK_RH2_ACON,YKON);/* 预热接触器2 */
theApp.pid_switch=0xff;
theApp.FanRun_Flag=0xff;
theApp.FanOn();
theApp.rh2_count=0;
if(m_r2hotoff.m_nColor!=63)
{
m_r2hotoff.m_nColor=63;
m_r2hotoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{// 请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnR2hotoff()
{//预热2关
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].rh2_off_enable!=0)
{
if(m_r2hotoff.m_nColor!=65)
{
m_r2hotoff.m_nColor=65;
m_r2hotoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,131);
theApp.YKOUTPUT(YK_RH2_ACON,YKOFF);/* 预热接触器2 */
theApp.rh2_switch=0x00;
theApp.rh2_count=0;
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,130)==false)
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,132)==false) theApp.FanOff();
}
if(m_r2hoton.m_nColor!=62)
{
m_r2hoton.m_nColor=62;
m_r2hoton.InvalidateRect (NULL);
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnR2hotofff()
{//预热2关
// TODO: Add your control notification handler code here
if(m_r2hotoff.m_nColor!=65)
{
m_r2hotoff.m_nColor=65;
m_r2hotoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,131);
theApp.YKOUTPUT(YK_RH2_ACON,YKOFF);/* 预热接触器2 */
theApp.rh2_switch=0x00;
theApp.rh2_count=0;
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,130)==false)
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,132)==false) theApp.FanOff();
}
if(m_r2hoton.m_nColor!=62)
{
m_r2hoton.m_nColor=62;
m_r2hoton.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnR3hoton()
{//预热3开
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].rh3_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(theApp.temp_type==0)return;//二预热
if(m_on.m_nColor==20)
{
if(m_r3hoton.m_nColor!=90)
{
m_r3hoton.m_nColor=90;
m_r3hoton.InvalidateRect (NULL);
theApp.rh3_switch=0xff;
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,132);
theApp.YKOUTPUT(YK_RH3_ACON,YKON);/* 预热接触器2 */
theApp.pid_switch=0xff;
theApp.FanRun_Flag=0xff;
theApp.FanOn();
theApp.rh3_count=0;
if(m_r3hotoff.m_nColor!=93)
{
m_r3hotoff.m_nColor=93;
m_r3hotoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnR3hotoff()
{//预热3关
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].rh3_off_enable!=0)
{
if(m_r3hotoff.m_nColor!=92)
{
m_r3hotoff.m_nColor=92;
m_r3hotoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,132);
theApp.YKOUTPUT(YK_RH3_ACON,YKOFF);/* 预热接触器2 */
theApp.rh3_switch=0x00;
theApp.rh3_count=0;
if(m_r3hoton.m_nColor!=91)
{
m_r3hoton.m_nColor=91;
m_r3hoton.InvalidateRect (NULL);
}
}
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,130)==false)
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,131)==false) theApp.FanOff();
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnR3hotofff()
{//预热3关
// TODO: Add your control notification handler code here
if(m_r3hotoff.m_nColor!=92)
{
m_r3hotoff.m_nColor=92;
m_r3hotoff.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,132);
theApp.YKOUTPUT(YK_RH3_ACON,YKOFF);/* 预热接触器2 */
theApp.rh3_switch=0x00;
theApp.rh3_count=0;
if(m_r3hoton.m_nColor!=91)
{
m_r3hoton.m_nColor=91;
m_r3hoton.InvalidateRect (NULL);
}
}
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,130)==false)
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,131)==false) theApp.FanOff();
}
OnSetUp();
}
void CConWndDlg::OnSlhoton()
{// 锡炉开
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].sl_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(m_on.m_nColor==20)
{
if(m_slhoton.m_nColor!=36)
{
m_slhoton.m_nColor=36;
m_slhoton.InvalidateRect (NULL);
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,133);
theApp.YKOUTPUT(YK_RH_POWER,YKON);
theApp.sl_switch=0xff;
theApp.pid_switch=0xff;
theApp.sl_up_count=0;
theApp.sl_count=0;
m_stsinfo.Invalidate(NULL);
if(m_slhotoff.m_nColor!=35)
{
m_slhotoff.m_nColor=35;
m_slhotoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnSlhotonn()
{// 锡炉开
// TODO: Add your control notification handler code here
if(m_off.m_nColor==21) return;
if(m_on.m_nColor==20)
{
if(m_slhoton.m_nColor!=36)
{
m_slhoton.m_nColor=36;
m_slhoton.InvalidateRect (NULL);
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,133);
theApp.YKOUTPUT(YK_RH_POWER,YKON);
theApp.sl_switch=0xff;
theApp.pid_switch=0xff;
theApp.sl_up_count=0;
// theApp.sl_count=0;
m_stsinfo.Invalidate(NULL);
if(m_slhotoff.m_nColor!=35)
{
m_slhotoff.m_nColor=35;
m_slhotoff.InvalidateRect (NULL);
}
}
}
OnSetUp();
}
void CConWndDlg::OnSlhotoff()
{//锡炉关
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].sl_off_enable!=0)
{
if(m_slhotoff.m_nColor!=37)
{
m_slhotoff.m_nColor=37;
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,133);
m_slhotoff.InvalidateRect (NULL);
theApp.sl_up_count=0;
m_stsinfo.Invalidate(NULL);
theApp.sl_switch=0x00;
theApp.sl_count=0;
if(m_slhotoff.m_nColor==37)
{
theApp.YKOUTPUT(YK_RH_POWER,YKOFF);
}
if(m_slhoton.m_nColor!=34)
{
m_slhoton.m_nColor=34;
m_slhoton.InvalidateRect (NULL);
}
OnWs1offf(); //38 39
OnWs2offf();
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnSlhotofff()
{// 锡炉关
// TODO: Add your control notification handler code here
if(m_slhotoff.m_nColor!=37)
{
m_slhotoff.m_nColor=37;
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,133);
m_slhotoff.InvalidateRect (NULL);
theApp.sl_up_count=0;
m_stsinfo.Invalidate(NULL);
theApp.sl_switch=0x00;
theApp.sl_count=0;
if(m_slhotoff.m_nColor==37)
{
theApp.YKOUTPUT(YK_RH_POWER,YKOFF);
}
if(m_slhoton.m_nColor!=34)
{
m_slhoton.m_nColor=34;
m_slhoton.InvalidateRect (NULL);
}
OnWs1offf(); //38 39
OnWs2offf();
}
OnSetUp();
}
void CConWndDlg::OnWs1on()
{//波峰一开 //40 41
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].ws1_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(theApp.rl_enable==0) return;
if(m_slhoton.m_nColor!=36) return;
if(theApp.wave_type==0)return;//高波
if(m_on.m_nColor==20)
{
if(m_ws1on.m_nColor!=40)
{
m_ws1on.m_nColor=40;
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,134);
m_ws1on.InvalidateRect (NULL);
theApp.YKOUTPUT(YK_WS1_JON,YKON);
theApp.ws1_switch=0xff;
if(m_ws1off.m_nColor!=39)
{
m_ws1off.m_nColor=39;
m_ws1off.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnWs1off()
{//波峰一关 //40 41
// TODO: Add your control notification handler code here
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].ws1_off_enable!=0)
{
if(m_ws1off.m_nColor!=41)
{
m_ws1off.m_nColor=41;
m_ws1off.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,134);
theApp.YKOUTPUT(YK_WS1_JON,YKOFF);
theApp.ws1_switch=0x00;
if(m_ws1on.m_nColor!=38)
{
m_ws1on.m_nColor=38;
m_ws1on.InvalidateRect (NULL);
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
}
}
void CConWndDlg::OnWs1offf()
{//波峰一关 //40 41
// TODO: Add your control notification handler code here
if(m_ws1off.m_nColor!=41)
{
m_ws1off.m_nColor=41;
m_ws1off.InvalidateRect (NULL);
theApp.yxtask.BitClrChar(theApp.yxtask.krbuf,134);
theApp.YKOUTPUT(YK_WS1_JON,YKOFF);
theApp.ws1_switch=0x00;
if(m_ws1on.m_nColor!=38)
{
m_ws1on.m_nColor=38;
m_ws1on.InvalidateRect (NULL);
}
}
OnSetUp();
}
void CConWndDlg::OnWs2on()
{//波峰二开 //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_on_enable!=0)
{
if(m_off.m_nColor==21) return;
if(theApp.rl_enable==0) return;
if(m_slhoton.m_nColor!=36) return;
if(m_on.m_nColor==20)
{
if(m_ws2on.m_nColor!=44)
{
m_ws2on.m_nColor=44;
m_ws2on.InvalidateRect (NULL);
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,135);
theApp.YKOUTPUT(YK_WS2_JON,YKON);
theApp.ws2_switch=0xff;
if(m_ws2off.m_nColor!=43)
{
m_ws2off.m_nColor=43;
m_ws2off.InvalidateRect (NULL);
}
}
}
OnSetUp();
}else
{
AfxMessageBox(_T("No Power!"));
}
}else
{//请登录
CMainFrame* m_pMainWnd=(CMainFrame*)AfxGetMainWnd();
m_pMainWnd->SendMessage(WM_COMMAND,IDC_LOGON);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -