| 1531 | */ |
| 1532 | |
| 1533 | void WConfiguration::OnButtonAddProfileClick( wxCommandEvent& event ) |
| 1534 | { |
| 1535 | wxTextEntryDialog dlg (this, _("Enter new profile name"), _("Add profile")); |
| 1536 | if (dlg.ShowModal()== wxID_OK) |
| 1537 | { |
| 1538 | switch (wxGetApp().GetController().GetConfigManager().AddNewProfile (dlg.GetValue())) |
| 1539 | { |
| 1540 | case 0: |
| 1541 | InitializeData (); |
| 1542 | UnChanged (); |
| 1543 | break; |
| 1544 | case 1: |
| 1545 | { |
| 1546 | wxMessageDialog errDlg (NULL, _("Profile already exists."), _T("Enable Viacam"), wxICON_ERROR ); |
| 1547 | errDlg.ShowModal (); |
| 1548 | } |
| 1549 | break; |
| 1550 | case 2: |
| 1551 | { |
| 1552 | wxMessageDialog errDlg (NULL, _("Invalid profile name."), _T("Enable Viacam"), wxICON_ERROR ); |
| 1553 | errDlg.ShowModal (); |
| 1554 | } |
| 1555 | break; |
| 1556 | default: |
| 1557 | assert (false); |
| 1558 | } |
| 1559 | } |
| 1560 | |
| 1561 | event.Skip(false); |
| 1562 | } |
| 1563 | |
| 1564 | /*! |
| 1565 | * wxEVT_COMMAND_CHOICE_SELECTED event handler for ID_CHOICE_BEHAVIOUR |
nothing calls this directly
no test coverage detected