void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) { bool bCancelWithoutNextPage = false; wxWizardPageEx* page = GetCurrentPage(); int iRetVal = wxGetApp().SafeMessageBox( _("Do you really want to cancel?"), _("Question"), wxICON_QUESTION | wxYES_NO, this ); // Reenable the next and back buttons if they have been disabled GetNextButton()->Enable(); GetBackButton()->Enable(); // Page specific rules - Disable the validator(s) if (wxYES == iRetVal) { if ((page == m_ProjectInfoPage) || (page == m_AccountManagerInfoPage)) { m_ProjectInfoPage->m_pProjectUrlCtrl->SetValidator(wxDefaultValidator); } else if (page == m_AccountInfoPage) { m_AccountInfoPage->m_pAccountEmailAddressCtrl->SetValidator(wxDefaultValidator); m_AccountInfoPage->m_pAccountPasswordCtrl->SetValidator(wxDefaultValidator); if (IsAttachToProjectWizard) { m_AccountInfoPage->m_pAccountConfirmPasswordCtrl->SetValidator(wxDefaultValidator); } } else if (page == m_ErrProxyPage) { m_ErrProxyPage->m_pProxyHTTPServerCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxyHTTPPortCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxyHTTPUsernameCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxyHTTPPasswordCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxySOCKSServerCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxySOCKSPortCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxySOCKSUsernameCtrl->SetValidator(wxDefaultValidator); m_ErrProxyPage->m_pProxySOCKSPasswordCtrl->SetValidator(wxDefaultValidator); } } // Generic rules bCancelWithoutNextPage |= (page == m_ErrNotDetectedPage); bCancelWithoutNextPage |= (page == m_ErrUnavailablePage); bCancelWithoutNextPage |= (page == m_ErrNoInternetConnectionPage); if (IsAttachToProjectWizard) { bCancelWithoutNextPage |= (page == m_ErrAlreadyExistsPage); } else { bCancelWithoutNextPage |= (page == m_WelcomePage); } if (wxYES != iRetVal) { event.Veto(); } }
void CWizardAttach::_ProcessCancelEvent( wxWizardExEvent& event ) { bool bCancelWithoutNextPage = false; wxWizardPageEx* page = GetCurrentPage(); m_bCancelInProgress = true; int iRetVal = wxGetApp().SafeMessageBox( _("Do you really want to cancel?"), _("Question"), wxICON_QUESTION | wxYES_NO, this ); // Reenable the next and back buttons if they have been disabled GetNextButton()->Enable(); GetBackButton()->Enable(); // Generic rules bCancelWithoutNextPage |= (page == m_ErrNotDetectedPage); bCancelWithoutNextPage |= (page == m_ErrUnavailablePage); bCancelWithoutNextPage |= (page == m_ErrNoInternetConnectionPage); if (IsAttachToProjectWizard) { bCancelWithoutNextPage |= (page == m_ErrAlreadyExistsPage); } else { bCancelWithoutNextPage |= (page == m_ProjectWelcomePage); } if (wxYES != iRetVal) { event.Veto(); m_bCancelInProgress = false; } else { m_bCancelInProgress = true; } }
void CBOINCBaseWizard::SimulateNextButton() { wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_btnNext->GetId()); event.SetEventObject(GetNextButton()); AddPendingEvent(event); }
void CBOINCBaseWizard::SimulateBackButton() { wxButton* btnBack = GetNextButton(); wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, btnBack->GetId()); event.SetEventObject(btnBack); AddPendingEvent(event); }
void CBOINCBaseWizard::DisableNextButton() { GetNextButton()->Disable(); }
void CBOINCBaseWizard::EnableNextButton() { GetNextButton()->Enable(); }