Mercurial > flash_v2
comparison host/tools/testtool/win32/PlatformDialog.cpp @ 82:6736c52df507 ecos-sw-2000-04-14
Merge from eCos master repository on 2000-04-14-13:35:46-BST
| author | jlarmour |
|---|---|
| date | Tue, 18 Apr 2000 21:51:55 +0000 |
| parents | 435cced73e2f |
| children |
comparison
equal
deleted
inserted
replaced
| 81:89fef2181d7d | 82:6736c52df507 |
|---|---|
| 45 { | 45 { |
| 46 //{{AFX_DATA_INIT(CPlatformDialog) | 46 //{{AFX_DATA_INIT(CPlatformDialog) |
| 47 m_strPlatform=_T(""); | 47 m_strPlatform=_T(""); |
| 48 m_strPrefix=_T(""); | 48 m_strPrefix=_T(""); |
| 49 m_strGDB=_T(""); | 49 m_strGDB=_T(""); |
| 50 m_nType = 0; | 50 m_strInferior = _T(""); |
| 51 m_strPrompt = _T(""); | |
| 52 m_bServerSideGdb = FALSE; | |
| 51 //}}AFX_DATA_INIT | 53 //}}AFX_DATA_INIT |
| 52 } | 54 } |
| 53 | 55 |
| 54 | 56 |
| 55 void CPlatformDialog::DoDataExchange(CDataExchange* pDX) | 57 void CPlatformDialog::DoDataExchange(CDataExchange* pDX) |
| 57 CeCosDialog::DoDataExchange(pDX); | 59 CeCosDialog::DoDataExchange(pDX); |
| 58 //{{AFX_DATA_MAP(CPlatformDialog) | 60 //{{AFX_DATA_MAP(CPlatformDialog) |
| 59 DDX_Text(pDX, IDC_TT_NEW_PLATFORM, m_strPlatform); | 61 DDX_Text(pDX, IDC_TT_NEW_PLATFORM, m_strPlatform); |
| 60 DDX_Text(pDX, IDC_TT_NEW_PLATFORM_PREFIX, m_strPrefix); | 62 DDX_Text(pDX, IDC_TT_NEW_PLATFORM_PREFIX, m_strPrefix); |
| 61 DDX_Text(pDX, IDC_TT_NEW_PLATFORM_GDB, m_strGDB); | 63 DDX_Text(pDX, IDC_TT_NEW_PLATFORM_GDB, m_strGDB); |
| 62 DDX_CBIndex(pDX, IDC_TYPE_COMBO, m_nType); | 64 DDX_Text(pDX, IDC_INFERIOR, m_strInferior); |
| 65 DDX_Text(pDX, IDC_PROMPT, m_strPrompt); | |
| 66 DDX_Check(pDX, IDC_SERVER_SIDE_GDB, m_bServerSideGdb); | |
| 63 //}}AFX_DATA_MAP | 67 //}}AFX_DATA_MAP |
| 64 } | 68 } |
| 65 | 69 |
| 66 | 70 |
| 67 BEGIN_MESSAGE_MAP(CPlatformDialog, CeCosDialog) | 71 BEGIN_MESSAGE_MAP(CPlatformDialog, CeCosDialog) |
| 74 ///////////////////////////////////////////////////////////////////////////// | 78 ///////////////////////////////////////////////////////////////////////////// |
| 75 // CPlatformDialog message handlers | 79 // CPlatformDialog message handlers |
| 76 | 80 |
| 77 BOOL CPlatformDialog::OnInitDialog() | 81 BOOL CPlatformDialog::OnInitDialog() |
| 78 { | 82 { |
| 83 m_strGDB.Replace(_T(";"),_T("\r\n")); | |
| 79 CeCosDialog::OnInitDialog(); | 84 CeCosDialog::OnInitDialog(); |
| 85 | |
| 80 SetWindowText(m_strCaption); | 86 SetWindowText(m_strCaption); |
| 81 if(!m_strPlatform.IsEmpty()){ | 87 if(!m_strPlatform.IsEmpty()){ |
| 82 SetDlgItemText(IDC_TT_NEW_PLATFORM,m_strPlatform); | 88 SetDlgItemText(IDC_TT_NEW_PLATFORM,m_strPlatform); |
| 83 GetDlgItem(IDC_TT_NEW_PLATFORM)->EnableWindow(false); | 89 GetDlgItem(IDC_TT_NEW_PLATFORM)->EnableWindow(false); |
| 84 } | 90 } |
| 85 CMapStringToPtr map; | 91 CMapStringToPtr map; |
| 86 for(unsigned int i=0;i<CeCosTest::TargetTypeMax();i++){ | 92 for(unsigned int i=0;i<CeCosTestPlatform::Count();i++){ |
| 87 map.SetAt(CeCosTest::Target(i).Prefix(),this); | 93 map.SetAt(CeCosTestPlatform::Get(i)->Prefix(),this); |
| 88 } | 94 } |
| 89 for(POSITION pos = map.GetStartPosition(); pos != NULL; ){ | 95 for(POSITION pos = map.GetStartPosition(); pos != NULL; ){ |
| 90 void *p; | 96 void *p; |
| 91 CString str; | 97 CString str; |
| 92 map.GetNextAssoc(pos, str, p); | 98 map.GetNextAssoc(pos, str, p); |
| 107 void CPlatformDialog::OnChangeNewPlatform() | 113 void CPlatformDialog::OnChangeNewPlatform() |
| 108 { | 114 { |
| 109 UpdateData(true); | 115 UpdateData(true); |
| 110 GetDlgItem(IDOK)->EnableWindow(!m_strPlatform.IsEmpty() && !m_strPrefix.IsEmpty()); | 116 GetDlgItem(IDOK)->EnableWindow(!m_strPlatform.IsEmpty() && !m_strPrefix.IsEmpty()); |
| 111 } | 117 } |
| 118 | |
| 119 void CPlatformDialog::OnOK() | |
| 120 { | |
| 121 UpdateData(TRUE); | |
| 122 m_strGDB.Replace(_T("\r\n"),_T(";")); | |
| 123 EndDialog(IDOK); | |
| 124 } |
