Mercurial > flash_v2
comparison host/tools/testtool/win32/PropertiesDialog.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 |
|---|---|
| 24 //####COPYRIGHTEND#### | 24 //####COPYRIGHTEND#### |
| 25 // ConnectionPage.cpp : implementation file | 25 // ConnectionPage.cpp : implementation file |
| 26 // | 26 // |
| 27 | 27 |
| 28 #include "stdafx.h" | 28 #include "stdafx.h" |
| 29 #include "eCosTest.h" | 29 #include "eCosTestPlatform.h" |
| 30 #include "eCosTestSocket.h" | 30 #include "eCosSocket.h" |
| 31 #include "PropertiesDialog.h" | 31 #include "PropertiesDialog.h" |
| 32 #include "LocalPropertiesDialog.h" | 32 #include "LocalPropertiesDialog.h" |
| 33 #include "RemotePropertiesDialog.h" | 33 #include "RemotePropertiesDialog.h" |
| 34 | 34 |
| 35 #ifdef _DEBUG | 35 #ifdef _DEBUG |
| 161 } | 161 } |
| 162 | 162 |
| 163 CeCosDialog::OnInitDialog(); | 163 CeCosDialog::OnInitDialog(); |
| 164 | 164 |
| 165 CComboBox *pCombo=(CComboBox *)GetDlgItem(IDC_TT_PLATFORM); | 165 CComboBox *pCombo=(CComboBox *)GetDlgItem(IDC_TT_PLATFORM); |
| 166 for(unsigned int i=0;i<CeCosTest::TargetTypeMax();i++){ | 166 for(unsigned int i=0;i<CeCosTestPlatform::Count();i++){ |
| 167 pCombo->AddString(CeCosTest::Image(i)); | 167 pCombo->AddString(CeCosTestPlatform::Get(i)->Name()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 UpdateData(false); | 170 UpdateData(false); |
| 171 | 171 |
| 172 ((CSpinButtonCtrl *)GetDlgItem(IDC_TT_SPIN3))->SetRange(1,999); | 172 ((CSpinButtonCtrl *)GetDlgItem(IDC_TT_SPIN3))->SetRange(1,999); |
| 187 SetButtons(); | 187 SetButtons(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void CPropertiesDialog::SetButtons() | 190 void CPropertiesDialog::SetButtons() |
| 191 { | 191 { |
| 192 CString strTarget; | 192 CString strTarget; |
| 193 GetDlgItemText(IDC_TT_PLATFORM,strTarget); | 193 GetDlgItemText(IDC_TT_PLATFORM,strTarget); |
| 194 bool bSim=CeCosTest::IsSim(strTarget); | 194 static const int arIDs[]={IDC_TT_DOWNLOADTIMEOUT,IDC_TT_SPIN4,IDC_TT_DOWNLOADTIMEOUT_COMBO}; |
| 195 static const int arIDs[]={IDC_TT_DOWNLOADTIMEOUT,IDC_TT_SPIN4,IDC_TT_DOWNLOADTIMEOUT_COMBO}; | 195 for(int i=0;i<sizeof arIDs/sizeof arIDs[0];i++){ |
| 196 for(int i=0;i<sizeof arIDs/sizeof arIDs[0];i++){ | 196 GetDlgItem(arIDs[i]) ->EnableWindow(true); |
| 197 GetDlgItem(arIDs[i]) ->EnableWindow(!bSim); | 197 } |
| 198 } | 198 //GetDlgItem(IDC_TT_SETTINGS)->EnableWindow(!bSim || !((CButton *)GetDlgItem(IDC_TT_RADIO_LOCAL))->GetCheck()); |
| 199 GetDlgItem(IDC_TT_SETTINGS)->EnableWindow(!bSim || !((CButton *)GetDlgItem(IDC_TT_RADIO_LOCAL))->GetCheck()); | 199 |
| 200 | 200 bool b=(TIMEOUT_SPECIFIED==((CComboBox*)GetDlgItem(IDC_TT_TIMEOUT_COMBO))->GetCurSel()); |
| 201 bool b=(TIMEOUT_SPECIFIED==((CComboBox*)GetDlgItem(IDC_TT_TIMEOUT_COMBO))->GetCurSel()); | 201 GetDlgItem(IDC_TT_TESTTIMEOUT)->EnableWindow(b); |
| 202 GetDlgItem(IDC_TT_TESTTIMEOUT)->EnableWindow(b); | 202 GetDlgItem(IDC_TT_SPIN3)->EnableWindow(b); |
| 203 GetDlgItem(IDC_TT_SPIN3)->EnableWindow(b); | 203 |
| 204 | 204 b=(TIMEOUT_SPECIFIED==((CComboBox*)GetDlgItem(IDC_TT_DOWNLOADTIMEOUT_COMBO))->GetCurSel()); |
| 205 b=(TIMEOUT_SPECIFIED==((CComboBox*)GetDlgItem(IDC_TT_DOWNLOADTIMEOUT_COMBO))->GetCurSel()); | 205 GetDlgItem(IDC_TT_DOWNLOADTIMEOUT)->EnableWindow(b); |
| 206 GetDlgItem(IDC_TT_DOWNLOADTIMEOUT)->EnableWindow(!bSim && b); | 206 GetDlgItem(IDC_TT_SPIN4)->EnableWindow(b); |
| 207 GetDlgItem(IDC_TT_SPIN4)->EnableWindow(!bSim && b); | |
| 208 } | 207 } |
| 209 | 208 |
| 210 void CPropertiesDialog::OnSettings() | 209 void CPropertiesDialog::OnSettings() |
| 211 { | 210 { |
| 212 if(((CButton *)GetDlgItem(IDC_TT_RADIO_REMOTE))->GetCheck()){ | 211 if(((CButton *)GetDlgItem(IDC_TT_RADIO_REMOTE))->GetCheck()){ |
