00001 #if !defined(AFX_TRAFFICCONFIGDLG_H__6AA97537_057C_46E9_B1CC_B08FC4C93A1D__INCLUDED_) 00002 #define AFX_TRAFFICCONFIGDLG_H__6AA97537_057C_46E9_B1CC_B08FC4C93A1D__INCLUDED_ 00003 00004 #if _MSC_VER > 1000 00005 #pragma once 00006 #endif // _MSC_VER > 1000 00007 // TrafficConfigDlg.h : header file 00008 // 00009 00011 // CTrafficConfigDlg dialog 00012 00013 #include "GridCtrl_src/GridCtrl.h" 00014 #include "IDMParameterSet.h" 00015 #include "Parameter.h" 00016 #include "Distribution.h" 00017 00020 class CTrafficConfigDlg : public CDialog 00021 { 00022 // Construction 00023 public: 00024 CTrafficConfigDlg(CWnd* pParent = NULL); // standard constructor 00025 00026 // Dialog Data 00027 //{{AFX_DATA(CTrafficConfigDlg) 00028 enum { IDD = IDD_TRAFFICCONFIG }; 00029 CComboBox m_cmbVehicleClassCopy; 00030 CComboBox m_cmbVehicleClassDefine; 00031 int m_nFixCols; 00032 int m_nFixRows; 00033 int m_nCols; 00034 int m_nRows; 00035 CStringArray m_sDistributions; 00036 CIDMParameterSet m_IDMParams_Car; 00037 CIDMParameterSet m_IDMParams_SmallTruck; 00038 CIDMParameterSet m_IDMParams_LargeTruck; 00039 CIDMParameterSet m_IDMParams_Crane; 00040 CIDMParameterSet m_IDMParams_Lowloader; 00041 //}}AFX_DATA 00042 CGridCtrl m_Grid; 00043 00044 // Overrides 00045 // ClassWizard generated virtual function overrides 00046 //{{AFX_VIRTUAL(CTrafficConfigDlg) 00047 protected: 00048 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 00049 //}}AFX_VIRTUAL 00050 00051 // Implementation 00052 protected: 00053 00054 // Generated message map functions 00055 //{{AFX_MSG(CTrafficConfigDlg) 00056 virtual BOOL OnInitDialog(); 00057 afx_msg void OnBtnCopy(); 00058 afx_msg void OnSelchangeCmbClassCopy(); 00059 afx_msg void OnSelchangeCmbClassDefine(); 00060 void OnGridEndEdit(NMHDR *pNotifyStruct, LRESULT* pResult); 00061 //}}AFX_MSG 00062 DECLARE_MESSAGE_MAP() 00063 private: 00064 CParameter* MapRowToParameter(int row); 00065 void SetParamData(int row, int col, double val); 00066 void SetParamData(int row, int col, CString str); 00067 CIDMParameterSet* MapIDMParamSet(int iSelect); 00068 void LoadRow(int row); 00069 WORD MapDistributionString(CString dist); 00070 CString MapDistributionID(WORD distID); 00071 void LoadParamsIntoGrid(); 00072 void SetCells(); 00073 void SetGridHeadings(); 00074 00075 CIDMParameterSet* m_pCurrentIDMParamSet; 00076 CIDMParameterSet* m_pCopyIDMParamSet; 00077 CStringArray m_sCmbOptions; 00078 CStringArray m_sRowHeaders; 00079 CStringArray m_sColumnHeaders; 00080 }; 00081 00082 //{{AFX_INSERT_LOCATION}} 00083 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00084 00085 #endif // !defined(AFX_TRAFFICCONFIGDLG_H__6AA97537_057C_46E9_B1CC_B08FC4C93A1D__INCLUDED_)