00001 #if !defined(AFX_STATDETECTORDLG_H__80DF71D6_83E9_4446_BD1B_D6E8985A9548__INCLUDED_) 00002 #define AFX_STATDETECTORDLG_H__80DF71D6_83E9_4446_BD1B_D6E8985A9548__INCLUDED_ 00003 00004 #if _MSC_VER > 1000 00005 #pragma once 00006 #endif // _MSC_VER > 1000 00007 // StatDetectorDlg.h : header file 00008 // 00009 00011 // CStatDetectorDlg dialog 00012 00013 #include "MiscCtrls\DialogExt.h" 00014 #include "GridCtrl_src\GridCtrl.h" 00015 #include "afxcoll.h" // for CObArray 00016 00019 class CStatDetectorDlg : public CDialogExt 00020 { 00021 // Construction 00022 public: 00023 int m_RoadLength; 00024 CStatDetectorDlg(CWnd* pParent = NULL); // standard constructor 00025 00026 // Dialog Data 00027 //{{AFX_DATA(CStatDetectorDlg) 00028 enum { IDD = IDD_STATDETECTORS }; 00029 int m_nFixCols; 00030 int m_nFixRows; 00031 int m_nCols; 00032 int m_nRows; 00033 CObArray m_vStatDetectors; 00034 //}}AFX_DATA 00035 CGridCtrl m_Grid; 00036 00037 00038 // Overrides 00039 virtual void OnValidate (UINT &nID, CString &strMessage); 00040 // ClassWizard generated virtual function overrides 00041 //{{AFX_VIRTUAL(CStatDetectorDlg) 00042 protected: 00043 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 00044 //}}AFX_VIRTUAL 00045 00046 // Implementation 00047 protected: 00048 00049 // Generated message map functions 00050 //{{AFX_MSG(CStatDetectorDlg) 00051 virtual BOOL OnInitDialog(); 00052 afx_msg void OnBtnAdddet(); 00053 afx_msg void OnBtnDeldet(); 00054 void OnGridEndEdit(NMHDR *pNotifyStruct, LRESULT* pResult); 00055 //}}AFX_MSG 00056 DECLARE_MESSAGE_MAP() 00057 private: 00058 WORD MapStringToDetType(CString str); 00059 WORD MapStringToVehType(CString str); 00060 void SetParamData(int row, int col, int val); 00061 void SetParamData(int row, int col, CString str); 00062 CString MapDetTypeToString(WORD type); 00063 CString MapVehTypeToString(WORD type); 00064 void LoadStatDetectorsIntoGrid(); 00065 void SetCells(bool bAddDelete); 00066 void SetGridHeadings(); 00067 00068 int m_NoStatDetectors; 00069 CStringArray m_sDirections; 00070 CStringArray m_sStatDetectorTypes; 00071 CStringArray m_sVehicleTypes; 00072 CStringArray m_sColumnHeaders; 00073 }; 00074 00075 //{{AFX_INSERT_LOCATION}} 00076 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. 00077 00078 #endif // !defined(AFX_STATDETECTORDLG_H__80DF71D6_83E9_4446_BD1B_D6E8985A9548__INCLUDED_)