📄 crosssetdlg.cpp
字号:
// CrossSetDlg.cpp : implementation file
//
#include "stdafx.h"
#include "CrossSimulation1.h"
#include "CrossSetDlg.h"
#include "LaneTrafficSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCrossSetDlg dialog
CCrossSetDlg::CCrossSetDlg(CWnd* pParent /*=NULL*/)
: CDialog(CCrossSetDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CCrossSetDlg)
m_EastLaneNumber = 0;
m_EastLaneWidth = 0.0f;
m_WestLaneNumber = 0;
m_WestLaneWidth = 0.0f;
m_SouthLaneNumber = 0;
m_SouthLaneWidth = 0.0f;
m_NorthLaneNumber = 0;
m_NorthLaneWidth = 0.0f;
//}}AFX_DATA_INIT
}
void CCrossSetDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCrossSetDlg)
DDX_Text(pDX, IDC_EDIT1, m_EastLaneNumber);
DDV_MinMaxUInt(pDX, m_EastLaneNumber, 2, 6);
DDX_Text(pDX, IDC_EDIT2, m_EastLaneWidth);
DDV_MinMaxFloat(pDX, m_EastLaneWidth, 3.f, 3.75f);
DDX_Text(pDX, IDC_EDIT3, m_WestLaneNumber);
DDV_MinMaxUInt(pDX, m_WestLaneNumber, 2, 6);
DDX_Text(pDX, IDC_EDIT4, m_WestLaneWidth);
DDV_MinMaxFloat(pDX, m_WestLaneWidth, 3.f, 3.75f);
DDX_Text(pDX, IDC_EDIT5, m_SouthLaneNumber);
DDV_MinMaxUInt(pDX, m_SouthLaneNumber, 2, 6);
DDX_Text(pDX, IDC_EDIT6, m_SouthLaneWidth);
DDV_MinMaxFloat(pDX, m_SouthLaneWidth, 3.f, 3.75f);
DDX_Text(pDX, IDC_EDIT7, m_NorthLaneNumber);
DDV_MinMaxUInt(pDX, m_NorthLaneNumber, 2, 6);
DDX_Text(pDX, IDC_EDIT8, m_NorthLaneWidth);
DDV_MinMaxFloat(pDX, m_NorthLaneWidth, 3.f, 3.75f);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CCrossSetDlg, CDialog)
//{{AFX_MSG_MAP(CCrossSetDlg)
ON_BN_CLICKED(IDC_CHECK7, OnCheck7)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCrossSetDlg message handlers
BOOL CCrossSetDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_EastLaneNumber=4;
m_EastLaneWidth=3.5;
m_WestLaneNumber=4;
m_WestLaneWidth=3.5;
m_NorthLaneNumber=4;
m_NorthLaneWidth=3.5;
m_SouthLaneNumber=4;
m_SouthLaneWidth=3.5;
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CCrossSetDlg::OnCheck7()
{
// TODO: Add your control notification handler code here
CLaneTrafficSet dlg;
if(dlg.DoModal()==IDOK)
{
m_EastLaneTraffic=dlg.m_EastLaneTraffic;
m_WestLaneTraffic=dlg.m_WestLaneTraffic;
m_SouthLaneTraffic=dlg.m_SouthLaneTraffic;
m_NorthLaneTraffic=dlg.m_NorthLaneTraffic;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -