📄 setwnddlg.cpp
字号:
// 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_ONSET5,wBuf,20);
theApp.WeekSetON[theApp.WeekPageNo][4]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOffset1()
{
// 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_OFFSET1,wBuf,20);
theApp.WeekSetOF[theApp.WeekPageNo][0]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOffset2()
{
// 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_OFFSET2,wBuf,20);
theApp.WeekSetOF[theApp.WeekPageNo][1]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOffset3()
{
// 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_OFFSET3,wBuf,20);
theApp.WeekSetOF[theApp.WeekPageNo][2]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOffset4()
{
// 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_OFFSET4,wBuf,20);
theApp.WeekSetOF[theApp.WeekPageNo][3]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnChangeOffset5()
{
// 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_OFFSET5,wBuf,20);
theApp.WeekSetOF[theApp.WeekPageNo][4]=theApp.ReadWeekData(wBuf);
}
void CSetWndDlg::OnWarnFlash()
{//
CString string,str;
double dx,dy,dt;
long lx;
int i,j,k;
m_warnchk.SetCheck(theApp.WarnSetPM[theApp.WarnPageNo]);
dx=theApp.WarnSetON[theApp.WarnPageNo];
string.Format(_T("%3.1f"),dx);
SetDlgItemText(IDC_UPWARNEDIT,string);
dx=theApp.WarnSetOF[theApp.WarnPageNo];
string.Format(_T("%3.1f"),dx);
SetDlgItemText(IDC_DNWARNEDIT,string);
if(theApp.WarnPageNo==0x03)
{
dx=theApp.RLSet;
string.Format(_T("%3.1f"),dx);
SetDlgItemText(IDC_RLTEMPER,string);
m_rltempers.ShowWindow(SW_SHOW);
m_rlt.ShowWindow(SW_SHOW);
m_rlpass.ShowWindow(SW_SHOW);
}else
{
m_rltempers.ShowWindow(SW_HIDE);
m_rlt.ShowWindow(SW_HIDE);
m_rlpass.ShowWindow(SW_HIDE);
}
}
void CSetWndDlg::OnChangeUpwarnedit()
{
// 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_UPWARNEDIT,wBuf,20);
theApp.WarnSetON[theApp.WarnPageNo]=(theApp.ReadDataChar(wBuf))/10.0;
}
void CSetWndDlg::OnChangeDnwarnedit()
{
// 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_DNWARNEDIT,wBuf,20);
theApp.WarnSetOF[theApp.WarnPageNo]=(theApp.ReadDataChar(wBuf))/10.0;
}
void CSetWndDlg::OnWarnchk()
{
// TODO: Add your control notification handler code here
theApp.WarnSetPM[theApp.WarnPageNo]=m_warnchk.GetCheck()%2;
}
void CSetWndDlg::OnChangeRltemper()
{
// 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];
double dx;
CString string;
if(theApp.WarnPageNo==0x03)
{
GetDlgItemText(IDC_RLTEMPER,wBuf,20);
if(theApp.m_UserPower.KeepTime>0)
{
if( theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].oven_enable!=0)
{
theApp.RLSet=(theApp.ReadDataChar(wBuf))/10.0;
}else
{
// AfxMessageBox(_T("无此权限!"));
}
}else
{//请登录
// AfxMessageBox(_T("请登录!"));
}
}
}
void CSetWndDlg::OnChangeRlpass()
{
// 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
if(theApp.WarnPageNo==0x03)
{
unsigned short wBuf[32];
GetDlgItemText(IDC_RLPASS,wBuf,20);
theApp.RLPass=theApp.ReadDataChar(wBuf);
}
}
void CSetWndDlg::OnFwdCheck()
{//正转
// TODO: Add your control notification handler code here
/* if(m_transoff.m_nColor!=29)
{
if(theApp.FLRType==0)
{
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}else
{
m_fwd.SetCheck(0);
m_rev.SetCheck(1);
}
return;
}
*/
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,136))
{
if(theApp.FLRType==0)
{
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}else
{
m_fwd.SetCheck(0);
m_rev.SetCheck(1);
}
return;
}
if((m_fwd.GetCheck()%2)!=0)
{
theApp.FLRType=0;
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}
if(theApp.FLRType==0)
{
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}else
{
m_fwd.SetCheck(0);
m_rev.SetCheck(1);
}
}
void CSetWndDlg::OnRevCheck()
{//反转
// TODO: Add your control notification handler code here
/* if(m_transoff.m_nColor!=29)
{
if(theApp.FLRType==0)
{
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}else
{
m_fwd.SetCheck(0);
m_rev.SetCheck(1);
}
return;
}
*/
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,136))
{
if(theApp.FLRType==0)
{
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}else
{
m_fwd.SetCheck(0);
m_rev.SetCheck(1);
}
return;
}
if((m_rev.GetCheck()%2)!=0)
{
theApp.FLRType=1;
m_rev.SetCheck(1);
m_fwd.SetCheck(0);
}
if(theApp.FLRType==0)
{
m_fwd.SetCheck(1);
m_rev.SetCheck(0);
}else
{
m_fwd.SetCheck(0);
m_rev.SetCheck(1);
}
}
void CSetWndDlg::OnTktzEnable()
{
// TODO: Add your control notification handler code here
if((m_tktz_enable.GetCheck()%2)!=0)
{
m_tktz_enable.SetCheck(1);
m_tktz_disable.SetCheck(0);
theApp.tktz_enable=0x01;
}else
{
m_tktz_enable.SetCheck(0);
m_tktz_disable.SetCheck(1);
theApp.tktz_enable=0x00;
}
}
void CSetWndDlg::OnTktzDisable()
{
// TODO: Add your control notification handler code here
if((m_tktz_disable.GetCheck()%2)!=0)
{
m_tktz_enable.SetCheck(0);
m_tktz_disable.SetCheck(1);
theApp.tktz_enable=0x00;
}else
{
m_tktz_enable.SetCheck(1);
m_tktz_disable.SetCheck(0);
theApp.tktz_enable=0x01;
}
}
void CSetWndDlg::OnWorkmode1()
{
// TODO: Add your control notification handler code here
if((m_workmode1.GetCheck()%2)!=0)
{
theApp.WorkMode=0;
m_workmode1.SetCheck(1);
}
if(theApp.WorkMode==0)
{
m_workmode1.SetCheck(1);
m_workmode2.SetCheck(0);
}else
{
m_workmode1.SetCheck(0);
m_workmode2.SetCheck(1);
}
}
void CSetWndDlg::OnWorkmode2()
{
// TODO: Add your control notification handler code here
if((m_workmode2.GetCheck()%2)!=0)
{
theApp.WorkMode=1;
m_workmode2.SetCheck(1);
}
if(theApp.WorkMode==0)
{
m_workmode1.SetCheck(1);
m_workmode2.SetCheck(0);
}else
{
m_workmode1.SetCheck(0);
m_workmode2.SetCheck(1);
}
}
void CSetWndDlg::OnChktemp1()
{//测试一
// TODO: Add your control notification handler code here
if((m_chktemp1.GetCheck()%2)==0)
{
m_chktemp1.SetCheck(0);
theApp.test_flag[0]=0;
}else
{
m_chktemp1.SetCheck(1);
theApp.test_flag[0]=1;
}
}
void CSetWndDlg::OnChktemp2()
{//测试二
// TODO: Add your control notification handler code here
if((m_chktemp2.GetCheck()%2)==0)
{
m_chktemp2.SetCheck(0);
theApp.test_flag[1]=0;
}else
{
m_chktemp2.SetCheck(1);
theApp.test_flag[1]=1;
}
}
void CSetWndDlg::OnChktemp3()
{//测试三
// TODO: Add your control notification handler code here
if((m_chktemp3.GetCheck()%2)==0)
{
m_chktemp3.SetCheck(0);
theApp.test_flag[2]=0;
}else
{
m_chktemp3.SetCheck(1);
theApp.test_flag[2]=1;
}
}
void CSetWndDlg::OnChangeTransscale()
{
// 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];
double dx;
GetDlgItemText(IDC_TRANSSCALE,wBuf,20);
dx=(double)_wtoi(wBuf);
if(dx>20000) dx=20000;
if(dx<1000) dx=1000;
theApp.trans_scale=dx/10000;
if(theApp.yxtask.BitTestChar(theApp.yxtask.yxbuf,136)) theApp.TransOn();
// if(m_transon.m_nColor==28) theApp.TransOn();
}
void CSetWndDlg::OnChangeOutsetEdit()
{//产量设定
// 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_OUTSET_EDIT,wBuf,20);
theApp.outsum=_wtoi(wBuf);
if(theApp.outsum<0) theApp.outsum=0;
}
void CSetWndDlg::OnChangeOutoffsetEdit()
{//产量底数
// 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_OUTOFFSET_EDIT,wBuf,20);
theApp.outoffset=_wtoi(wBuf);
}
void CSetWndDlg::OnResetout()
{
// TODO: Add your control notification handler code here
theApp.BoardInCount=theApp.outoffset;
}
void CSetWndDlg::OnChangeBoardBase()
{//板宽基数
// 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;
GetDlgItemText(IDC_BOARD_BASE,wBuf,20);
i=_wtoi(wBuf);
if(i>300) i=300;
if(i<0) i=0;
theApp.boardbase=i;
}
void CSetWndDlg::OnBoardSet()
{
// TODO: Add your control notification handler code here
theApp.yxtask.BitSetChar(theApp.yxtask.krbuf,57);
theApp.boardbase_mulse=0xff;
theApp.boardbase_count=0;
}
void CSetWndDlg::OnChineseCheck()
{//中文
// TODO: Add your control notification handler code here
if((m_chinese.GetCheck()%2)!=0)
{
m_chinese.SetCheck(1);
m_english.SetCheck(0);
theApp.ver=1;
}else
{
m_chinese.SetCheck(0);
m_english.SetCheck(1);
theApp.ver=0;
}
theApp.ver_sum++;
// CString string1,string2;
// string1=_T("\\DiskC\\arj.exe");
// string2=_T("\\DiskC\\ar.exe");
// CFile::Rename( string1, string2 );
}
void CSetWndDlg::OnEngCheck()
{//英文
// TODO: Add your control notification handler code here
if((m_english.GetCheck()%2)!=0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -