⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 setwnddlg.cpp

📁 波峰焊后台控制软件-中文版
💻 CPP
📖 第 1 页 / 共 4 页
字号:
	{
         m_english.SetCheck(1);
         m_chinese.SetCheck(0);
		 theApp.ver=0;
	}else
	{
         m_english.SetCheck(0);
         m_chinese.SetCheck(1);
		 theApp.ver=1;		 
	}	
	theApp.ver_sum++;
}

void CSetWndDlg::On2tempCheck() 
{//二温区
	// TODO: Add your control notification handler code here
	theApp.temp_type=0;
	if(theApp.temp_type==0)//温区类型
	{//二温区
       m_2temp.SetCheck(1);
       m_3temp.SetCheck(0);
	}else
	{//三温区
       m_2temp.SetCheck(0);
       m_3temp.SetCheck(1);
	}
}

void CSetWndDlg::On3tempCheck() 
{
	// TODO: Add your control notification handler code here
	theApp.temp_type=1;
	if(theApp.temp_type==0)//温区类型
	{//二温区
       m_2temp.SetCheck(1);
       m_3temp.SetCheck(0);
	}else
	{//三温区
       m_2temp.SetCheck(0);
       m_3temp.SetCheck(1);
	}
}

void CSetWndDlg::OnHwaveCheck() 
{
	// TODO: Add your control notification handler code here
    theApp.wave_type=0;
	if(theApp.wave_type==0)//波峰类型
	{//高波
       m_hwave.SetCheck(1);
       m_dwave.SetCheck(0);
	}else
	{//双波
       m_hwave.SetCheck(0);
       m_dwave.SetCheck(1);
	}
}

void CSetWndDlg::OnDwaveCheck() 
{
	// TODO: Add your control notification handler code here
    theApp.wave_type=1;
	if(theApp.wave_type==0)//波峰类型
	{//高波
       m_hwave.SetCheck(1);
       m_dwave.SetCheck(0);
	}else
	{//双波
       m_hwave.SetCheck(0);
       m_dwave.SetCheck(1);
	}
}

void CSetWndDlg::OnPwCheck() 
{
	// TODO: Add your control notification handler code here
	theApp.pw_type=0;
	if(theApp.pw_type==0)//助焊方法
	{//喷雾
       m_pw_sel.SetCheck(1);
       m_fp_sel.SetCheck(0);
	}else
	{//发泡
       m_pw_sel.SetCheck(0);
       m_fp_sel.SetCheck(1);
	}
	
}

void CSetWndDlg::OnFpCheck() 
{
	// TODO: Add your control notification handler code here
	theApp.pw_type=1;
	if(theApp.pw_type==0)//助焊方法
	{//喷雾
       m_pw_sel.SetCheck(1);
       m_fp_sel.SetCheck(0);
	}else
	{//发泡
       m_pw_sel.SetCheck(0);
       m_fp_sel.SetCheck(1);
	}	
}

void CSetWndDlg::OnLeftCheck() 
{//左进
	// TODO: Add your control notification handler code here
	theApp.Rbt_type=0;
	if(theApp.Rbt_type==0)
	{
       m_left_sel.SetCheck(1);
       m_right_sel.SetCheck(0);
	}else
	{
       m_left_sel.SetCheck(0);
       m_right_sel.SetCheck(1);
	}	
}

void CSetWndDlg::OnRightCheck() 
{//右进
	// TODO: Add your control notification handler code here
	theApp.Rbt_type=1;
	if(theApp.Rbt_type==0)
	{
       m_left_sel.SetCheck(1);
       m_right_sel.SetCheck(0);
	}else
	{
       m_left_sel.SetCheck(0);
       m_right_sel.SetCheck(1);
	}		
}

void CSetWndDlg::OnSlUpEnable()
{// 锡炉升降  允许
	// TODO: Add your control notification handler code here
    theApp.sl_up_timer =300;
	if(theApp.sl_up_timer<2)
	{
       m_up_enable.SetCheck(0);
       m_up_disable.SetCheck(1);		
	}else
	{
       m_up_enable.SetCheck(1);
       m_up_disable.SetCheck(0);

	}
}

void CSetWndDlg::OnSlUpDisable()
{// 锡炉升降  禁止
	// TODO: Add your control notification handler code here
    theApp.sl_up_timer =1;
	if(theApp.sl_up_timer<2)
	{
       m_up_enable.SetCheck(0);
       m_up_disable.SetCheck(1);		
	}else
	{
       m_up_enable.SetCheck(1);
       m_up_disable.SetCheck(0);
	}
}

void CSetWndDlg::OnAutoEnable() 
{// 自动开机 允许
	// TODO: Add your control notification handler code here
    theApp.Auto_Flag =1;
	if(theApp.Auto_Flag==0 )
	{
       m_auto_enable.SetCheck(0);
       m_auto_disable.SetCheck(1);		
	}else
	{
       m_auto_enable.SetCheck(1);
       m_auto_disable.SetCheck(0);
	}	
}

void CSetWndDlg::OnAutoDisable()
{//  自动开机禁止
	 // TODO: Add your control notification handler code here
    theApp.Auto_Flag =0;
	if(theApp.Auto_Flag==0 )
	{
       m_auto_enable.SetCheck(0);
       m_auto_disable.SetCheck(1);		
	}else
	{
       m_auto_enable.SetCheck(1);
       m_auto_disable.SetCheck(0);
	}	
}

void CSetWndDlg::OnChangeSlFanEdit() 
{
	// 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
    double  dx;
    unsigned short wBuf[32];
	GetDlgItemText(IDC_SL_FAN_EDIT,wBuf,20);
	dx=(double)_wtoi(wBuf);
	if(dx<0) dx=0;
	if(dx>300) dx=300;
    theApp.RLFanSet=dx;	
}


void CSetWndDlg::OnInitFlash() 
{
	CString   string;
	double  dx;

    theApp.WeekPageNo=theApp.Week;
    hbrush=CreateSolidBrush(RGB(212, 208, 200));
    editbrush=CreateSolidBrush(RGB(247, 249, 232));

	string.Format(_T("%4.1f"),theApp.rh1_temper_set);
    SetDlgItemText(IDC_SETRH1,string);
	string.Format(_T("%4.1f"),theApp.rh2_temper_set);
    SetDlgItemText(IDC_SETRH2,string);
	string.Format(_T("%4.1f"),theApp.rh3_temper_set);
    SetDlgItemText(IDC_SETRH3,string);

	string.Format(_T("%4.1f"),theApp.sl_temper_set);
    SetDlgItemText(IDC_SETSL, string);
	string.Format(_T("%4.1f"),theApp.ws1_temper_set);
    SetDlgItemText(IDC_SETWS1,string);
	string.Format(_T("%4.1f"),theApp.ws2_temper_set);
    SetDlgItemText(IDC_SETWS2, string);
	string.Format(_T("%4.1f"),theApp.trans_speed_set);
    SetDlgItemText(IDC_SETTRANS,string);
	string.Format(_T("%4.0f"),theApp.fan_set);
	SetDlgItemText(IDC_FAN_EDIT, string);

	string.Format(_T("%4d"),theApp.PW_Count);
    SetDlgItemText(IDC_PWBM_NUM, string);
	string.Format(_T("%04d"), theApp.PW_Length);
    SetDlgItemText(IDC_PWBOARDEDIT,string);
	string.Format(_T("%04d"), theApp.PW_With);
    SetDlgItemText(IDC_PWWITH,string);
	string.Format(_T("%04d"), theApp.Bjmd_speed);
    SetDlgItemText(IDC_BJMA,string);
	string.Format(_T("%04d"), theApp.N2_Speed);
    SetDlgItemText(IDC_N2OUT,string);
	string.Format(_T("%04d"), theApp.Sx_Speed);
    SetDlgItemText(IDC_SXOUT,string);

	m_silder_rh1.SetRange(0,3000,TRUE);
	m_silder_rh1.SetTicFreq(10);
	m_silder_rh1.SetLineSize(1);
	m_silder_rh1.SetPageSize(100);
    m_silder_rh1.SetPos((int)(theApp.rh1_temper_set*10));

	m_silder_rh2.SetRange(0,3000,TRUE);
	m_silder_rh2.SetTicFreq(10);
	m_silder_rh2.SetLineSize(1);
	m_silder_rh2.SetPageSize(100);
    m_silder_rh2.SetPos((int)(theApp.rh2_temper_set*10));

	m_silder_rh3.SetRange(0,3000,TRUE);
	m_silder_rh3.SetTicFreq(10);
	m_silder_rh3.SetLineSize(1);
	m_silder_rh3.SetPageSize(100);
    m_silder_rh3.SetPos((int)(theApp.rh3_temper_set*10));




	m_silder_sl.SetRange(0,3000,TRUE);
	m_silder_sl.SetTicFreq(10);
	m_silder_sl.SetLineSize(1);
	m_silder_sl.SetPageSize(100);
    m_silder_sl.SetPos((int)(theApp.sl_temper_set*10));


    m_silder_ws1.SetRange(0,500,TRUE);
	m_silder_ws1.SetTicFreq(10);
	m_silder_ws1.SetLineSize(1);
	m_silder_ws1.SetPageSize(100);
    m_silder_ws1.SetPos((int)(theApp.ws1_temper_set*10));

    m_silder_ws2.SetRange(0,500,TRUE);
	m_silder_ws2.SetTicFreq(10);
	m_silder_ws2.SetLineSize(1);
	m_silder_ws2.SetPageSize(100);
    m_silder_ws2.SetPos((int)(theApp.ws2_temper_set*10));

    m_silder_trans.SetRange(0,3000,TRUE);
	m_silder_trans.SetTicFreq(10);
	m_silder_trans.SetLineSize(1);
	m_silder_trans.SetPageSize(100);
    m_silder_trans.SetPos((int)(theApp.trans_speed_set));

	m_fan_slider.SetRange(0,3000,TRUE);
	m_fan_slider.SetTicFreq(10);
	m_fan_slider.SetLineSize(1);
	m_fan_slider.SetPageSize(100);
	m_fan_slider.SetPos((int)(theApp.fan_set));

	m_pwbm.SetRange(-1000,1000,TRUE);
	m_pwbm.SetTicFreq(10);
	m_pwbm.SetLineSize(1);
	m_pwbm.SetPageSize(100);
    m_pwbm.SetPos((int)(theApp.PW_Count));

	m_pwlen.SetRange(-1000,1000,TRUE);
	m_pwlen.SetTicFreq(10);
	m_pwlen.SetLineSize(1);
	m_pwlen.SetPageSize(100);
    m_pwlen.SetPos((int)(theApp.PW_Length));	

	m_pwwith.SetRange(-1000,1000,TRUE);
	m_pwwith.SetTicFreq(10);
	m_pwwith.SetLineSize(1);
	m_pwwith.SetPageSize(100);
    m_pwwith.SetPos((int)(theApp.PW_With));	

	m_jjrun.SetRange(0,1000,TRUE);
	m_jjrun.SetTicFreq(10);
	m_jjrun.SetLineSize(1);
	m_jjrun.SetPageSize(100);
    m_jjrun.SetPos((int)(theApp.jjrun_len));	


	m_jjback.SetRange(0,1000,TRUE);
	m_jjback.SetTicFreq(10);
	m_jjback.SetLineSize(1);
	m_jjback.SetPageSize(100);
    m_jjback.SetPos((int)(theApp.jjback_len));	


	m_bjmd.SetRange(0,1000,TRUE);
	m_bjmd.SetTicFreq(10);
	m_bjmd.SetLineSize(1);
	m_bjmd.SetPageSize(100);
    m_bjmd.SetPos((int)(theApp.Bjmd_speed));	

	m_n2out.SetRange(0,1000,TRUE);
	m_n2out.SetTicFreq(10);
	m_n2out.SetLineSize(1);
	m_n2out.SetPageSize(100);
    m_n2out.SetPos((int)(theApp.N2_Speed));	

	m_sxspeed.SetRange(0,1000,TRUE);
	m_sxspeed.SetTicFreq(10);
	m_sxspeed.SetLineSize(1);
	m_sxspeed.SetPageSize(100);
    m_sxspeed.SetPos((int)(theApp.Sx_Speed));	

    m_warntabctl.type=1;	
    if(theApp.WarnPageNo==0x03)
	{
		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);
	}
	if(theApp.FLRType==0)
	{
       m_fwd.SetCheck(1);
       m_rev.SetCheck(0);
	}else
	{
       m_fwd.SetCheck(0);
       m_rev.SetCheck(1);
	}
	if(theApp.tktz_enable==0)
	{
		m_tktz_enable.SetCheck(0);
		m_tktz_disable.SetCheck(1);
	}else
	{
		m_tktz_enable.SetCheck(1);
		m_tktz_disable.SetCheck(0);
	}


	if(theApp.ver==0)
	{
         m_english.SetCheck(1);
         m_chinese.SetCheck(0);
	}else
	{
         m_english.SetCheck(0);
         m_chinese.SetCheck(1);
	}	

	if(theApp.temp_type==0)//温区类型
	{//二温区
       m_2temp.SetCheck(1);
       m_3temp.SetCheck(0);
	}else
	{//三温区
       m_2temp.SetCheck(0);
       m_3temp.SetCheck(1);
	}

	if(theApp.wave_type==0)//波峰类型
	{//高波
       m_hwave.SetCheck(1);
       m_dwave.SetCheck(0);
	}else
	{//双波
       m_hwave.SetCheck(0);
       m_dwave.SetCheck(1);
	}

	if(theApp.pw_type==0)//助焊方法
	{//喷雾
       m_pw_sel.SetCheck(1);
       m_fp_sel.SetCheck(0);
	}else
	{//发泡
       m_pw_sel.SetCheck(0);
       m_fp_sel.SetCheck(1);
	}

	if(theApp.Rbt_type==0)
	{
       m_left_sel.SetCheck(1);
       m_right_sel.SetCheck(0);
	}else
	{
       m_left_sel.SetCheck(0);
       m_right_sel.SetCheck(1);
	}	

	if(theApp.sl_up_timer<2)
	{
       m_up_enable.SetCheck(0);
       m_up_disable.SetCheck(1);		
	}else
	{
       m_up_enable.SetCheck(1);
       m_up_disable.SetCheck(0);

	}


    if(theApp.WorkMode==0)
	{
         m_workmode1.SetCheck(1);
         m_workmode2.SetCheck(0);
	}else
	{
         m_workmode1.SetCheck(0);
         m_workmode2.SetCheck(1);
	}
	if(theApp.test_flag[0]==0)  m_chktemp1.SetCheck(0);
	       else               m_chktemp1.SetCheck(1);
	if(theApp.test_flag[1]==0)  m_chktemp2.SetCheck(0);
	       else               m_chktemp2.SetCheck(1);
	if(theApp.test_flag[2]==0)  m_chktemp3.SetCheck(0);
	       else               m_chktemp3.SetCheck(1);

    dx=theApp.trans_scale;
	dx=dx*10000;
    string.Format(_T("%5.0f"),dx);
	SetDlgItemText(IDC_TRANSSCALE,string); 
	string.Format(_T("%5d"), theApp.outsum);
    SetDlgItemText(IDC_OUTSET_EDIT,string);
	string.Format(_T("%5d"), theApp.outoffset);
    SetDlgItemText(IDC_OUTOFFSET_EDIT,string);

	string.Format(_T("%5d"), theApp.boardbase);
    SetDlgItemText(IDC_BOARD_BASE,string);


	string.Format(_T("%4.0f"),theApp.RLFanSet);
    SetDlgItemText(IDC_SL_FAN_EDIT,string);





	m_resetout.m_nColor=89;
	m_resetout.m_JFlag=0xff;

    OnWeekFlash();
    OnWarnFlash();
    theApp.ControlMode= Set_Window;
    theApp.pass_para=0;

	if(theApp.Auto_Flag==0 )
	{
       m_auto_enable.SetCheck(0);
       m_auto_disable.SetCheck(1);		
	}else
	{
       m_auto_enable.SetCheck(1);
       m_auto_disable.SetCheck(0);
	}	

    if(theApp.m_UserPower.KeepTime>0)
	{
		if(	theApp.m_UserPower.Operators[theApp.m_UserPower.CurOperatorid].oven_enable!=0)
		{
           m_rlt.EnableWindow(TRUE);
		}else m_rlt.EnableWindow(FALSE);
	}else m_rlt.EnableWindow(FALSE);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -