예제 #1
0
파일: RESULTFM.CPP 프로젝트: kosfango/fips
// ================================================
	void resultfm::OnOK()
// ================================================
{
char buf[1000];
char tabs[1000];
int	 i;

	if (!TestConsistency())
		return;

	m_edit_format.GetWindowText(buf,999);
	for (i=0;i<(int)strlen(buf);i++)
		if (!strchr(" ASETIDKXY",buf[i]))
				ERR_MSG2_RET("E_ILLRCCIS",buf[i]);

	m_edit_tabs.GetWindowText(tabs,999);
	for (i=0;i<(int)strlen(tabs);i++)
		if (tabs[i]!=',' &&	!isdigit(tabs[i]))
			ERR_MSG2_RET("E_ILLRSCCIS",tabs[i]);

	resultdisp.RemoveAll();
	resultdisp.AddTail(buf);
	resultdisp.AddTail(tabs);
	resultdisp.SaveToFile("resudisp.cfg");

	KillTimer(2345);
	CDialog::OnOK();
}
예제 #2
0
void CLoadSavePropPage::OnBnClickedButtonSave()
{
    const int MAX_BUFFER_SIZE = 1024;

    CFileDialog FileDialog(FALSE);
    CString strBuffer;

    FileDialog.GetOFN().lpstrFile = strBuffer.GetBuffer(MAX_BUFFER_SIZE);
    FileDialog.GetOFN().nMaxFile = MAX_BUFFER_SIZE;
    FileDialog.GetOFN().lpstrDefExt = TEXT(".txt");
    FileDialog.GetOFN().lpstrFilter = TEXT("Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0\0");

    INT_PTR nRet = FileDialog.DoModal();
    strBuffer.ReleaseBuffer();

    if (nRet == IDOK)
    {
        CString strFileName = FileDialog.GetPathName();
        
        CString strText;
        m_TextEdit.GetWindowText(strText);

        CStrList StrList;
        StrList.SetText(strText);

        StrList.SaveToFile(strFileName, false);
    }
}
예제 #3
0
파일: CFG_RING.CPP 프로젝트: kosfango/fips
// ========================================================================
	void cfg_ring::OnOK()
// ========================================================================
{
int		from=0,to=0;

	UpdateData(1);
	if (m_nr_m1.IsEmpty() || m_pause_m1.IsEmpty() || m_nr_m2.IsEmpty() ||
		m_pause_m2.IsEmpty() || m_nr_isdn.IsEmpty() || m_pause_isdn.IsEmpty())
			ERR_MSG_RET("E_PFUAE");
	sscanf(m_from,"%d",&from);
	sscanf(m_to,"%d",&to);
	if (m_for1 || m_for2)
	{
		if (from<1)	ERR_MSG_RET("E_WFSPCA");
		if (to<1 || to<from)	ERR_MSG_RET("E_WFSPCA");
	}

	set_cfg(CFG_INCOMIN,"Modem1",m_nr_m1+","+m_pause_m1);
	set_cfg(CFG_INCOMIN,"Modem2",m_nr_m2+","+m_pause_m2);
	set_cfg(CFG_INCOMIN,"ISDN",m_nr_isdn+","+m_pause_isdn);
	
	income_times.defaultindex=m_disable.GetCheck();
	income_times.reserved3=0;
	if (m_for1)	income_times.reserved3 |=1;
	if (m_for2)	income_times.reserved3 |=2;
	income_times.reserved4=from;
	income_times.reserved5=to;
	income_times.SaveToFile("incomet.cfg");
	gIncomeDevicesHaveChanged=1;
	
	if(m_bCloseOnOk)
		CDialog::OnOK();
}
예제 #4
0
파일: RECEIVER.CPP 프로젝트: kosfango/fips
// ===========================================================================
	void receiver::OnOK()
// ===========================================================================
{
	Agroups.SaveToFile("receiver.cfg");
	if(m_bCloseOnOk)
		CDialog::OnOK();
}
예제 #5
0
파일: RESULTFM.CPP 프로젝트: kosfango/fips
// ================================================
	void resultfm::OnDefault()
// ================================================
{
	m_edit_format.SetWindowText("ATSTI");
	m_edit_tabs.SetWindowText("72,154");
	resultdisp.RemoveAll();
	resultdisp.AddTail("ATSTI");
	resultdisp.AddTail("72,154");
	resultdisp.SaveToFile("resudisp.cfg");
}
예제 #6
0
파일: CFGEXFR.CPP 프로젝트: kosfango/fips
// =================================================================
	void cfgexfr::OnOK()
// =================================================================
{
CString str;

	m_edit_path.GetWindowText(str);
	if (strchr(str,'\\'))
		ERR_MSG_RET("E_DMNCAP");

	if (strchr(str,':'))
		ERR_MSG_RET("E_DMNCAP");

	exfrcfg.RemoveAll();
	exfrcfg.AddTail(str);
	exfrcfg.AddTail(m_check_16bit.GetCheck() ? "1" : "0");
	exfrcfg.SaveToFile("exfrtool.cfg");
	CDialog::OnOK();
}