📄 setwnddlg.cpp
字号:
GetDlgItemText(IDC_SETRH2,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.rh2_temper_set=((double)_wtoi(wBuf)/10);
if(theApp.rh2_temper_set>300)theApp.rh2_temper_set=300;
m_silder_rh2.SetPos((int)(theApp.rh2_temper_set*10));
}
void CSetWndDlg::OnChangeSetrh3()
{
// 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 i,j,sign;
theApp.rh3_flash=0xff;
GetDlgItemText(IDC_SETRH3,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.rh3_temper_set=((double)_wtoi(wBuf)/10);
if(theApp.rh3_temper_set>300)theApp.rh3_temper_set=300;
m_silder_rh3.SetPos((int)(theApp.rh3_temper_set*10));
}
void CSetWndDlg::OnChangeSetsl()
{
// 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 i,j,sign;
theApp.sl_flash=0xff;
GetDlgItemText(IDC_SETSL,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.sl_temper_set=((double)_wtoi(wBuf)/10);
if(theApp.sl_temper_set>300)theApp.sl_temper_set=300;
m_silder_sl.SetPos((int)(theApp.sl_temper_set*10));
}
void CSetWndDlg::OnChangeSetws1()
{
// 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 i,j,sign;
theApp.ws1_flash=0xff;
GetDlgItemText(IDC_SETWS1,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.ws1_temper_set=((double)_wtoi(wBuf)/10);
m_silder_ws1.SetPos((int)(theApp.ws1_temper_set*10));
}
void CSetWndDlg::OnChangeSetws2()
{
// 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 i,j,sign;
theApp.ws2_flash=0xff;
GetDlgItemText(IDC_SETWS2,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.ws2_temper_set=((double)_wtoi(wBuf)/10);
m_silder_ws2.SetPos((int)(theApp.ws2_temper_set*10));
}
void CSetWndDlg::OnChangeSettrans()
{
// 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 i,j,sign;
theApp.trans_flash=0xff;
GetDlgItemText(IDC_SETTRANS,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.trans_speed_set=((double)_wtoi(wBuf)/10);
m_silder_trans.SetPos((int)(theApp.trans_speed_set));
if(theApp.trans_speed_set>3000)theApp.trans_speed_set=3000;
theApp.TransSpeed();
}
void CSetWndDlg::OnChangeFanEdit()
{
// 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 i,j,sign;
theApp.fan_flash=0xff;
GetDlgItemText(IDC_FAN_EDIT,wBuf,20);
sign=0;
for (i=0; i<31; i++)
{
if(wBuf[i]=='.')
{
sign=0xff;
j=i;
}
if(sign!=0)
{
wBuf[j]=wBuf[i+1];
}
j++;
}
theApp.fan_set=((double)_wtoi(wBuf));
m_fan_slider.SetPos((int)(theApp.fan_set));
if(theApp.fan_set>3000)theApp.fan_set=3000;
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,130))
{
theApp.FanOn();
}else
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,131))
{
theApp.FanOn();
}else
{
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,132)) theApp.FanOn();
}
}
}
void CSetWndDlg::OnChangePwbmNum()
{//喷雾原点
// 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
theApp.pwbm_flash=0xff;
unsigned short wBuf[32];
GetDlgItemText(IDC_PWBM_NUM,wBuf,20);
theApp.PW_Count=_wtoi(wBuf);
if(theApp.PW_Count>1000) theApp.PW_Count=1000;
if(theApp.PW_Count<-1000) theApp.PW_Count=-1000;
m_pwbm.SetPos((int)(theApp.PW_Count));
}
void CSetWndDlg::OnChangePwboardedit()
{//噴雾长度
// 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
theApp.pwlen_flash=0xff;
unsigned short wBuf[32];
GetDlgItemText(IDC_PWBOARDEDIT,wBuf,20);
theApp.PW_Length=_wtoi(wBuf);
if(theApp.PW_Length>1000) theApp.PW_Length=1000;
if(theApp.PW_Length<-1000) theApp.PW_Length=-1000;
m_pwlen.SetPos((int)(theApp.PW_Length));
}
void CSetWndDlg::OnChangePwwith()
{//噴雾宽度
// 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
theApp.pwwith_flash=0xff;
unsigned short wBuf[32];
GetDlgItemText(IDC_PWWITH,wBuf,20);
theApp.PW_With=_wtoi(wBuf);
m_pwwith.SetPos((int)(theApp.PW_With));
}
void CSetWndDlg::OnChangeJjrun()
{//经济超前
// 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
theApp.jjrun_flash=0xff;
unsigned short wBuf[32];
GetDlgItemText(IDC_JJRUN,wBuf,20);
theApp.jjrun_len=_wtoi(wBuf);
m_jjrun.SetPos((int)(theApp.jjrun_len));
}
void CSetWndDlg::OnChangeJjrunBack()
{//经济滞后
// 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];
theApp.jjback_flash=0xff;
GetDlgItemText(IDC_JJRUN_BACK,wBuf,20);
theApp.jjback_len=_wtoi(wBuf);
m_jjback.SetPos((int)(theApp.jjback_len));
}
void CSetWndDlg::OnChangeBjma()
{//步进马达
// 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
theApp.bjmd_flash=0xff;
unsigned short wBuf[32];
GetDlgItemText(IDC_BJMA,wBuf,20);
theApp.Bjmd_speed=_wtoi(wBuf);
if(theApp.Bjmd_speed>1000)theApp.Bjmd_speed=1000;
m_bjmd.SetPos((int)(theApp.Bjmd_speed));
}
void CSetWndDlg::OnChangeN2out()
{//氮气流量
// 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];
theApp.n2out_flash=0xff;
GetDlgItemText(IDC_N2OUT,wBuf,20);
theApp.N2_Speed=_wtoi(wBuf);
if(theApp.N2_Speed>1000)theApp.N2_Speed=1000;
m_n2out.SetPos((int)(theApp.N2_Speed));
}
void CSetWndDlg::OnChangeSxout()
{//松香流量
// 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];
theApp.sxout_flash=0xff;
GetDlgItemText(IDC_SXOUT,wBuf,20);
theApp.Sx_Speed=_wtoi(wBuf);
if(theApp.Sx_Speed>1000)theApp.Sx_Speed=1000;
m_sxspeed.SetPos((int)(theApp.Sx_Speed));
}
void CSetWndDlg::OnWeekFlash()
{//
CString string,str;
double dx,dy,dt;
long lx;
int i,j,k;
m_timerchk1.SetCheck(theApp.WeekSetPM[theApp.WeekPageNo][0]);
m_timerchk2.SetCheck(theApp.WeekSetPM[theApp.WeekPageNo][1]);
m_timerchk3.SetCheck(theApp.WeekSetPM[theApp.WeekPageNo][2]);
m_timerchk4.SetCheck(theApp.WeekSetPM[theApp.WeekPageNo][3]);
m_timerchk5.SetCheck(theApp.WeekSetPM[theApp.WeekPageNo][4]);
for(k=0;k<5;k++)
{
lx=(long)theApp.WeekSetON[theApp.WeekPageNo][k];
j=(lx%60);
i=lx/60;
string.Format(_T("%02d"),i);
str=string+_T(":");
string.Format(_T("%02d"),j);
str=str+string;
SetDlgItemText(WeekOnID[k],str);
lx=(long)theApp.WeekSetOF[theApp.WeekPageNo][k];
j=(lx%60);
i=lx/60;
string.Format(_T("%02d"),i);
str=string+_T(":");
string.Format(_T("%02d"),j);
str=str+string;
SetDlgItemText(WeekOfID[k],str);
}
}
void CSetWndDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if(theApp.WeekPageFalsh!=0)
{
OnWeekFlash();
theApp.WeekPageFalsh=0x00;
}
if(theApp.WarnPageFalsh!=0)
{
OnWarnFlash();
theApp.WarnPageFalsh=0x00;
theApp.RLPass=0;
}
if(m_up_enable.GetCheck()!=0)
{
if(theApp.sl_up_timer==0)
{
m_up_enable.SetCheck(0);
m_up_disable.SetCheck(1);
}
}
if(theApp.openflash!=0)
{
OnInitFlash();
theApp.openflash=0;
}
CDialog::OnTimer(nIDEvent);
}
void CSetWndDlg::OnTimerchk1()
{
// TODO: Add your control notification handler code here
theApp.WeekSetPM[theApp.WeekPageNo][0]=m_timerchk1.GetCheck()%2;
}
void CSetWndDlg::OnTimerchk2()
{
// TODO: Add your control notification handler code here
theApp.WeekSetPM[theApp.WeekPageNo][1]=m_timerchk2.GetCheck()%2;
}
void CSetWndDlg::OnTimerchk3()
{
// TODO: Add your control notification handler code here
theApp.WeekSetPM[theApp.WeekPageNo][2]=m_timerchk3.GetCheck()%2;
}
void CSetWndDlg::OnTimerchk4()
{
// TODO: Add your control notification handler code here
theApp.WeekSetPM[theApp.WeekPageNo][3]=m_timerchk4.GetCheck()%2;
}
void CSetWndDlg::OnTimerchk5()
{
// TODO: Add your control notification handler code here
theApp.WeekSetPM[theApp.WeekPageNo][4]=m_timerchk5.GetCheck()%2;
}
void CSetWndDlg::OnChangeOnset1()
{
// 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];
GetDlgItemText(IDC_ONSET1,wBuf,20);
theApp.WeekSetON[theApp.WeekPageNo][0]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOnset2()
{
// 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];
GetDlgItemText(IDC_ONSET2,wBuf,20);
theApp.WeekSetON[theApp.WeekPageNo][1]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOnset3()
{
// 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];
GetDlgItemText(IDC_ONSET3,wBuf,20);
theApp.WeekSetON[theApp.WeekPageNo][2]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOnset4()
{
// 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];
GetDlgItemText(IDC_ONSET4,wBuf,20);
theApp.WeekSetON[theApp.WeekPageNo][3]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOnset5()
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -