|
|
|
@ -1,16 +1,17 @@
|
|
|
|
|
// SetSaveLineID.cpp : implementation file
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "SetSaveLineID.h"
|
|
|
|
|
|
|
|
|
|
#include "afxdialogex.h"
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <cstdio>
|
|
|
|
|
#include <regex>
|
|
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
#define new DEBUG_NEW
|
|
|
|
|
#undef THIS_FILE
|
|
|
|
|
static char THIS_FILE[] = __FILE__;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// CSetSaveLineID dialog
|
|
|
|
|
|
|
|
|
@ -45,6 +46,8 @@ void CSetSaveLineID::DoDataExchange(CDataExchange* pDX)
|
|
|
|
|
DDX_Text(pDX, IDC_EDIT_LHGT, m_LineHgt);
|
|
|
|
|
//}}AFX_DATA_MAP
|
|
|
|
|
DDX_Control(pDX, IDC_COMBO_LINECE, m_LineCE);
|
|
|
|
|
//DDV_MinMaxDouble(pDX, m_LineHgt, 0.001, 99999.999);
|
|
|
|
|
DDX_Control(pDX, IDC_EDIT_LHGT, heightEdit);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -54,6 +57,7 @@ BEGIN_MESSAGE_MAP(CSetSaveLineID, CBCGPDialog)
|
|
|
|
|
//}}AFX_MSG_MAP
|
|
|
|
|
ON_BN_CLICKED(IDOK, CSetSaveLineID::OnBnClickedOk)
|
|
|
|
|
//ON_BN_CLICKED(IDC_RADIO3, &CSetSaveLineID::OnBnClickedRadio3)
|
|
|
|
|
// ON_EN_CHANGE(IDC_EDIT_LHGT, &CSetSaveLineID::OnEnChangeEditLhgt)
|
|
|
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
@ -144,6 +148,18 @@ void CSetSaveLineID::OnBnClickedOk()
|
|
|
|
|
m_designLineID = GetLineID();
|
|
|
|
|
m_bClosedLine = m_LineCE.GetCurSel();
|
|
|
|
|
|
|
|
|
|
// 判断高度输入是否有效. 整数部分不超过5位数,小数点后1-3位,正数
|
|
|
|
|
string str = "^\\d{0,5}(\\.\\d{1,2})?$";
|
|
|
|
|
regex heightCheck(str);
|
|
|
|
|
CString strHeight;
|
|
|
|
|
heightEdit.GetWindowTextA(strHeight);
|
|
|
|
|
char* temp = strHeight.GetBuffer(strHeight.GetLength());
|
|
|
|
|
string asHeight = temp;
|
|
|
|
|
bool isNumber = regex_match(asHeight,heightCheck);
|
|
|
|
|
if(!isNumber){
|
|
|
|
|
BCGPMessageBox("高度设置不合法,请输入0-99999.99之间的数字");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
CBCGPDialog::OnOK();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|