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

📄 disposedialog.cpp

📁 线材切割
💻 CPP
字号:
// DisposeDialog.cpp : implementation file
//

#include "stdafx.h"
#include "SteelCut.h"
#include "DisposeDialog.h"
#include "SteelCutSys.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDisposeDialog dialog


CDisposeDialog::CDisposeDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CDisposeDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDisposeDialog)
	m_edit_ddia = _T("");
	m_edit_dmax = _T("");
	m_edit_dmin = _T("");
	//}}AFX_DATA_INIT
	m_csTitle = "配置";
}


void CDisposeDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDisposeDialog)
	DDX_Text(pDX, IDC_EDIT_DDIA, m_edit_ddia);
	DDX_Text(pDX, IDC_EDIT_DMAX, m_edit_dmax);
	DDX_Text(pDX, IDC_EDIT_DMIN, m_edit_dmin);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDisposeDialog, CDialog)
	//{{AFX_MSG_MAP(CDisposeDialog)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDisposeDialog message handlers

void CDisposeDialog::OnOK() 
{
	// TODO: Add extra validation here
	CDialog::OnOK();

	CString	type;
	CSteelCutSys	sys;
	char	*chType = (char*)malloc(100);
	char	*chValue = (char*)malloc(100);
	
	UpdateData(TRUE);
	this->GetWindowText(type);
	*chType = NULL;
	strcat(chType,type);
	
	if(strcmp(m_edit_ddia,""))
	{
		*chValue = NULL;
		strcat(chValue,m_edit_ddia);	
		sys.UpdateINIFile(chType,CUT_DIA,chValue);
	}

	if(strcmp(m_edit_ddia,"") && strcmp(m_edit_dmax,""))
	{
		*chValue = NULL;
		strcat(chValue,m_edit_dmax);	
		sys.UpdateINIFile(chType,WEAR_LEN_MAX,chValue);
	}

	if(strcmp(m_edit_ddia,"") && strcmp(m_edit_dmin,""))
	{
		*chValue = NULL;
		strcat(chValue,m_edit_dmin);	
		sys.UpdateINIFile(chType,WEAR_LEN_MIN,chValue);
	}

	free(chType);
	free(chValue);


}

BOOL CDisposeDialog::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	this->SetWindowText(m_csTitle);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

int CDisposeDialog::SetDlgTitle(CString csTitle)
{
	m_csTitle = csTitle;
	return 1;
}

⌨️ 快捷键说明

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