| 304 | } |
| 305 | |
| 306 | void OnDataChange(wxCommandEvent &evt) |
| 307 | { |
| 308 | if (!m_case || !m_caseWin) |
| 309 | return; |
| 310 | |
| 311 | int idx = lstVariables->GetSelection(); |
| 312 | |
| 313 | switch(evt.GetId()) |
| 314 | { |
| 315 | case ID_txtExcelFile: |
| 316 | m_exch.ExcelFile = txtExcelFile->GetValue(); |
| 317 | break; |
| 318 | case ID_txtExcelRange: |
| 319 | { |
| 320 | if (idx < 0 || idx >= (int)m_exch.Vars.size()) |
| 321 | return; |
| 322 | m_exch.Vars[idx].Range = txtExcelRange->GetValue(); |
| 323 | } |
| 324 | break; |
| 325 | case ID_rbgToFrom: |
| 326 | { |
| 327 | if (idx < 0 || idx >= (int)m_exch.Vars.size()) |
| 328 | return; |
| 329 | unsigned long vf = m_ci->Variables[0].Flags(m_exch.Vars[idx].Name); |
| 330 | if ( vf & VF_CALCULATED || vf & VF_LIBRARY ) |
| 331 | { |
| 332 | wxMessageBox("'" + m_ci->Variables[0].Label(m_exch.Vars[idx].Name) + "' is a calculated value or a library selection, and as a result its value cannot be captured from Excel."); |
| 333 | rbgToFrom->SetSelection(0); |
| 334 | } |
| 335 | else |
| 336 | m_exch.Vars[idx].Type = (rbgToFrom->GetSelection()==0) |
| 337 | ? ExcelExchange::SEND_TO : ExcelExchange::CAPTURE_FROM; |
| 338 | } |
| 339 | break; |
| 340 | case ID_chkEnableExch: |
| 341 | m_exch.Enabled = chkEnableExch->GetValue(); |
| 342 | break; |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | void DoSelectVar() |
| 347 | { |
nothing calls this directly
no test coverage detected