• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ wxWizardExEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中wxWizardExEvent的典型用法代码示例。如果您正苦于以下问题:C++ wxWizardExEvent类的具体用法?C++ wxWizardExEvent怎么用?C++ wxWizardExEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了wxWizardExEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnWizEvent

void wxWizardEx::OnWizEvent(wxWizardExEvent& event)
{
    // the dialogs have wxWS_EX_BLOCK_EVENTS style on by default but we want to
    // propagate wxEVT_WIZARD_XXX to the parent (if any), so do it manually
    if ( !(GetExtraStyle() & wxWS_EX_BLOCK_EVENTS) )
    {
        // the event will be propagated anyhow
        event.Skip();
    }
    else
    {
        wxWindow *parent = GetParent();

        if ( !parent || !parent->GetEventHandler()->ProcessEvent(event) )
        {
            event.Skip();
        }
    }

    if ( ( !m_wasModal ) && event.IsAllowed() &&
         ( event.GetEventType() == wxEVT_WIZARDEX_FINISHED || event.GetEventType() == wxEVT_WIZARDEX_CANCEL )
       )
    {
        Destroy();
    }
}
开发者ID:FpgaAtHome,项目名称:seti_fpga,代码行数:26,代码来源:wizardex.cpp


示例2: OnPageChanging

void CErrProxyPage::OnPageChanging( wxWizardExEvent& event ) {
    CMainDocument* pDoc = wxGetApp().GetDocument();
    wxString       strBuffer = wxEmptyString;
    int            iBuffer = 0;

    wxASSERT(pDoc);
    wxASSERT(wxDynamicCast(pDoc, CMainDocument));

    if (event.GetDirection() == true) {
        // Moving to the next page, save state
        pDoc->proxy_info.use_http_proxy = (m_pProxyHTTPServerCtrl->GetValue().Length() > 0);
        pDoc->proxy_info.http_server_name = (const char*)m_pProxyHTTPServerCtrl->GetValue().mb_str();
        pDoc->proxy_info.http_user_name = (const char*)m_pProxyHTTPUsernameCtrl->GetValue().mb_str();
        pDoc->proxy_info.http_user_passwd = (const char*)m_pProxyHTTPPasswordCtrl->GetValue().mb_str();

        strBuffer = m_pProxyHTTPPortCtrl->GetValue();
        strBuffer.ToLong((long*)&iBuffer);
        pDoc->proxy_info.http_server_port = iBuffer;

        pDoc->proxy_info.use_socks_proxy = (m_pProxySOCKSServerCtrl->GetValue().Length() > 0);
        pDoc->proxy_info.socks_server_name = (const char*)m_pProxySOCKSServerCtrl->GetValue().mb_str();
        pDoc->proxy_info.socks5_user_name = (const char*)m_pProxySOCKSUsernameCtrl->GetValue().mb_str();
        pDoc->proxy_info.socks5_user_passwd = (const char*)m_pProxySOCKSPasswordCtrl->GetValue().mb_str();

        strBuffer = m_pProxySOCKSPortCtrl->GetValue();
        strBuffer.ToLong((long*)&iBuffer);
        pDoc->proxy_info.socks_server_port = iBuffer;

        pDoc->SetProxyConfiguration();
    }
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:31,代码来源:ProxyPage.cpp


示例3: OnPageChanged

void CTermsOfUsePage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    PROJECT_CONFIG&        pc = ((CBOINCBaseWizard*)GetParent())->project_config;

    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDirectionsStaticCtrl);

    m_pTitleStaticCtrl->SetLabel(
        _("Terms of Use")
    );

    m_pDirectionsStaticCtrl->SetLabel(
        _("Please read the following terms of use:")
    );

    m_pTermsOfUseCtrl->SetValue(
        wxString(pc.terms_of_use.c_str(), wxConvUTF8)
    );
    m_pTermsOfUseCtrl->SetSelection(0,0);

    m_pAgreeCtrl->SetLabel(
        _("I agree to the terms of use.")
    );
    m_pAgreeCtrl->SetValue(false);


    m_pDisagreeCtrl->SetLabel(
        _("I do not agree with the terms of use.")
    );
    m_pDisagreeCtrl->SetValue(true);
    SetUserAgrees(false);

    Fit();
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:35,代码来源:TermsOfUsePage.cpp


示例4: OnPageChanging

void CTermsOfUsePage::OnPageChanging( wxWizardExEvent& event ) {
    CWizardAttach*  pWA = ((CWizardAttach*)GetParent());

    wxASSERT(pWA);
    wxASSERT(wxDynamicCast(pWA, CWizardAttach));

    // If the user has left the terms of use disagree radio button
    // selected, then the next button is disabled and needs to be
    // re-enabled if the back button is pressed.
    pWA->EnableNextButton();

    if (event.GetDirection() == false) return;

    if (!CHECK_CLOSINGINPROGRESS()) {
        // We are leaving this page.

        // Determine if the account settings are already pre-populated.
        //   If so, advance to the Account Manager Processing page or the
        //   Project Processing page.
        if ( pWA->m_bCredentialsCached || pWA->m_bCredentialsDetected) {
            SetCredentialsAlreadyAvailable(true);
        } else {
            SetCredentialsAlreadyAvailable(false);
        }
    }
}
开发者ID:AltroCoin,项目名称:altrocoin,代码行数:26,代码来源:TermsOfUsePage.cpp


示例5: OnPageChanged

void CAccountManagerInfoPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;
    wxLogTrace(wxT("Function Start/End"), wxT("CAccountManagerInfoPage::OnPageChanged - Function Begin"));

    unsigned int      i;
    ALL_PROJECTS_LIST pl;
    CMainDocument*    pDoc = wxGetApp().GetDocument();

    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDescriptionStaticCtrl);
    wxASSERT(m_pProjectUrlStaticCtrl);
    wxASSERT(m_pProjectUrlCtrl);


    m_pTitleStaticCtrl->SetLabel(
        _("Choose an account manager")
    );
    m_pDescriptionStaticCtrl->SetLabel(
        _("To choose an account manager, click its name or \ntype its URL below.")
    );
    m_pProjectUrlStaticCtrl->SetLabel(
        _("Account Manager &URL:")
    );

    // Populate the virtual list control with project information
    //
    if (!m_bAccountManagerListPopulated) {
        pDoc->rpc.get_all_projects_list(pl);
        for (i=0; i<pl.account_managers.size(); i++) {
            wxLogTrace(
                wxT("Function Status"),
                wxT("CAccountManagerInfoPage::OnPageChanged - Name: '%s', URL: '%s', Supported: '%d'"),
                wxString(pl.account_managers[i]->name.c_str(), wxConvUTF8).c_str(),
                wxString(pl.account_managers[i]->url.c_str(), wxConvUTF8).c_str(),
                true
            );

            m_pProjectListCtrl->Append(
                wxString(pl.account_managers[i]->url.c_str(), wxConvUTF8),
                wxString(pl.account_managers[i]->name.c_str(), wxConvUTF8),
                wxString(pl.account_managers[i]->image.c_str(), wxConvUTF8),
                wxString(pl.account_managers[i]->description.c_str(), wxConvUTF8),
                false,
                false,
                false,
                true
            );
        }
        m_bAccountManagerListPopulated = true;
    }

    Layout();
    FitInside();
    m_pProjectListCtrl->SetFocus();

    wxLogTrace(wxT("Function Start/End"), wxT("CAccountManagerInfoPage::OnPageChanged - Function End"));
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:57,代码来源:AccountManagerInfoPage.cpp


示例6: OnPageChanging

void CAccountManagerInfoPage::OnPageChanging( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    CWizardAttach* pWA = ((CWizardAttach*)GetParent());
	CAcctMgrListItem* pItem = (CAcctMgrListItem*)(m_pProjectListCtrl->GetClientData(m_pProjectListCtrl->GetSelection()));

    // Update authoritative data in CWizardAttach
	pWA->SetProjectURL(pItem->GetURL());
	pWA->SetProjectName(pItem->GetName());
}
开发者ID:Ocode,项目名称:boinc,代码行数:10,代码来源:AccountManagerInfoPage.cpp


示例7: _ProcessCancelEvent

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();
    }
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:52,代码来源:WizardAttach.cpp


示例8: OnFinished

void CWizardAttach::OnFinished( wxWizardExEvent& event ) {

    if (IsAccountManagerWizard) {
        // Attached to an account manager
        if (!GetReturnURL().empty() && GetAttachedToProjectSuccessfully()) {
            wxLaunchDefaultBrowser(GetReturnURL());
        }
    } else {
        // Attached to a project
        if (GetAccountCreatedSuccessfully() && GetAttachedToProjectSuccessfully()) {
            wxLaunchDefaultBrowser(GetProjectURL() + wxT("account_finish.php?auth=") + GetProjectAuthenticator());
        }
    }

    // Let the framework clean things up.
    event.Skip();
}
开发者ID:Ocode,项目名称:boinc,代码行数:17,代码来源:WizardAttach.cpp


示例9: OnPageChanged

void CProjectProcessingPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;
 
    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pProgressIndicator);

    m_pTitleStaticCtrl->SetLabel(
        _("Communicating with project\nPlease wait...")
    );

    SetProjectCommunitcationsSucceeded(false);
    SetProjectUnavailable(false);
    SetProjectAccountAlreadyExists(false);
    SetNextState(ATTACHPROJECT_INIT);
 
    CProjectProcessingPageEvent TransitionEvent(wxEVT_PROJECTPROCESSING_STATECHANGE, this);
    AddPendingEvent(TransitionEvent);

    Fit();
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:20,代码来源:ProjectProcessingPage.cpp


示例10: OnPageChanged

void CAccountManagerProcessingPage::OnPageChanged( wxWizardExEvent& event )
{
    if (event.GetDirection() == false) return;
 
    CWizardAttach* pWA = ((CWizardAttach*)GetParent());
    
    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pPleaseWaitStaticCtrl);
    wxASSERT(m_pProgressIndicator);
    wxASSERT(pWA);
        
    if (!pWA->m_strProjectName.IsEmpty()) {
        wxString str;

        // %s is the project name
        //    i.e. 'BOINC', 'GridRepublic'
        str.Printf(_("Communicating with %s."), pWA->m_strProjectName.c_str());

        m_pTitleStaticCtrl->SetLabel(
            str
        );
    } else {
        m_pTitleStaticCtrl->SetLabel(
            _("Communicating with server.")
        );
    }

    m_pPleaseWaitStaticCtrl->SetLabel(
        _("Please wait...")
    );

    SetProjectCommunicationsSucceeded(false);
    SetProjectUnavailable(false);
    SetProjectAccountAlreadyExists(false);
    SetNextState(ATTACHACCTMGR_INIT);
 
    CAccountManagerProcessingPageEvent TransitionEvent(wxEVT_ACCOUNTMANAGERPROCESSING_STATECHANGE, this);
    AddPendingEvent(TransitionEvent);

    Fit();
}
开发者ID:Ashod,项目名称:Boinc,代码行数:41,代码来源:AccountManagerProcessingPage.cpp


示例11: OnPageChanging

void CTermsOfUsePage::OnPageChanging( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    CWizardAttachProject*  pWAP = ((CWizardAttachProject*)GetParent());

    wxASSERT(pWAP);
    wxASSERT(wxDynamicCast(pWAP, CWizardAttachProject));


    if (!CHECK_CLOSINGINPROGRESS()) {
        // We are leaving this page.

        // Determine if the account settings are already pre-populated.
        //   If so, advance to the Account Manager Processing page or the
        //   Project Processing page.
        if ( pWAP->m_bCredentialsCached || pWAP->m_bCredentialsDetected) {
            SetCredentialsAlreadyAvailable(true);
        } else {
            SetCredentialsAlreadyAvailable(false);
        }
    }
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:22,代码来源:TermsOfUsePage.cpp


示例12: OnPageChanged

void CErrNotFoundPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;


    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDirectionsStaticCtrl);

    m_pTitleStaticCtrl->SetLabel(
        _("Login Failed.")
    );
    if (((CWizardAttach*)GetParent())->project_config.uses_username) {
        m_pDirectionsStaticCtrl->SetLabel(
            _("Check the username and password, and try again.")
        );
    } else {
        m_pDirectionsStaticCtrl->SetLabel(
            _("Check the email address and password, and try again.")
        );
    }

    Fit();
}
开发者ID:bryanjp3,项目名称:boinc,代码行数:22,代码来源:NotFoundPage.cpp


示例13: OnPageChanged

void CProjectWelcomePage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;
    wxLogTrace(wxT("Function Start/End"), wxT("CProjectWelcomePage::OnPageChanged - Function Begin"));

    CWizardAttach* pWA  = ((CWizardAttach*)GetParent());

    wxString buf;
    buf.Printf(_("Welcome to %s."), pWA->GetProjectName().c_str());
    title_ctrl->SetLabel(buf);

    intro_ctrl->SetLabel(_("You have volunteered to compute for this project:"));
    project_name1_ctrl->SetLabel(_("Name:"));
    project_name2_ctrl->SetLabel(pWA->GetProjectName());
    if (!pWA->GetProjectInstitution().IsEmpty()) {
        project_inst1_ctrl->SetLabel(_("Home:"));
        project_inst2_ctrl->SetLabel(pWA->GetProjectInstitution());
    }
    if (!pWA->GetProjectDescription().IsEmpty()) {
        project_desc1_ctrl->SetLabel(_("Description:"));
        project_desc2_ctrl->SetLabel(pWA->GetProjectDescription());
    }
    project_url1_ctrl->SetLabel(_("URL:"));
    project_url2_ctrl->SetLabel(pWA->GetProjectURL());
    if (!pWA->GetProjectUserName().IsEmpty()) {
        user_name1_ctrl->SetLabel(_("User:"));
        user_name2_ctrl->SetLabel(pWA->GetProjectUserName());
    }

    if (!pWA->IsProjectKnown()) {
        warning_ctrl->SetLabel(_("WARNING: This project is not registered with BOINC.  Make sure you trust it before continuing."));

    }
    continue_ctrl->SetLabel(
        _("To continue, click Next.")
    );

    Layout();
    wxLogTrace(wxT("Function Start/End"), wxT("CProjectWelcomePage::OnPageChanged - Function End"));
}
开发者ID:Ocode,项目名称:boinc,代码行数:39,代码来源:ProjectWelcomePage.cpp


示例14: OnPageChanged

void CProjectPropertiesPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;
 
    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pProgressIndicator);

    m_pTitleStaticCtrl->SetLabel(
        _("Communicating with project\nPlease wait...")
    );

    SetProjectPropertiesSucceeded(false);
    SetProjectPropertiesURLFailure(false);
    SetProjectPropertiesCommunicationFailure(false);
    SetProjectAccountCreationDisabled(false);
    SetProjectClientAccountCreationDisabled(false);
    SetNetworkConnectionNotDetected(false);
    SetNextState(PROJPROP_INIT);

    CProjectPropertiesPageEvent TransitionEvent(wxEVT_PROJECTPROPERTIES_STATECHANGE, this);
    AddPendingEvent(TransitionEvent);

    Fit();
}
开发者ID:hanxue,项目名称:Boinc,代码行数:23,代码来源:ProjectPropertiesPage.cpp


示例15: _ProcessCancelEvent

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;
    }
}
开发者ID:Ocode,项目名称:boinc,代码行数:36,代码来源:WizardAttach.cpp


示例16: OnPageChanged

void CErrAlreadyExistsPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDirectionsStaticCtrl);

    if (((CBOINCBaseWizard*)GetParent())->project_config.uses_username) {
        m_pTitleStaticCtrl->SetLabel(
            _("Username already in use")
        );
        m_pDirectionsStaticCtrl->SetLabel(
            _("An account with that username already exists and has a\ndifferent password than the one you entered.\n\nPlease visit the project's web site and follow the instructions there.")
        );
    } else {
        m_pTitleStaticCtrl->SetLabel(
            _("Email address already in use")
        );
        m_pDirectionsStaticCtrl->SetLabel(
            _("An account with that email address already exists and has a\ndifferent password than the one you entered.\n\nPlease visit the project's web site and follow the instructions there.")
        );
    }

    Fit();
}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:24,代码来源:AlreadyExistsPage.cpp


示例17: OnPageChanging

void CAccountInfoPage::OnPageChanging( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    CWizardAttach*         pWA = ((CWizardAttach*)GetParent());
    PROJECT_CONFIG&        pc = pWA->project_config;
    wxString               strTitle;
    wxString               strMessage = wxT("");
    bool                   bDisplayError = false;
    wxString               strBaseConfigLocation = wxString(wxT("/Wizards"));
    wxConfigBase*          pConfig = wxConfigBase::Get(FALSE);

    if (!CHECK_CLOSINGINPROGRESS()) {
        // We are leaving this page, so store the email address for future
        // use.
        pConfig->SetPath(strBaseConfigLocation);
        pConfig->Write(wxT("DefaultEmailAddress"), m_strAccountEmailAddress);
        pConfig->Write(wxT("DefaultUsername"), m_strAccountUsername);

        pConfig->Flush();
        
        // Construct potiental dialog title
        if (IS_ATTACHTOPROJECTWIZARD()) {
            strTitle = _("Add project");
        } else if (IS_ACCOUNTMANAGERWIZARD() && IS_ACCOUNTMANAGERUPDATEWIZARD()) {
            strTitle = _("Update account manager");
        } else if (IS_ACCOUNTMANAGERWIZARD()) {
            strTitle = _("Use account manager");
        }
 
        // Verify minimum username length
        if (!m_pAccountUseExistingCtrl->GetValue()) {
            if (!(m_pAccountPasswordCtrl->GetValue().Length() > 0)) {
                if (pc.uses_username) {
                    if (IS_ATTACHTOPROJECTWIZARD()) {
                        strMessage.Printf(
                            _("The minimum username length for this project is 1. Please enter a different username.")
                        );
                    }
                    if (IS_ACCOUNTMANAGERWIZARD()) {
                        strMessage.Printf(
                            _("The minimum username length for this account manager is 1. Please enter a different username.")
                        );
                    }
                } else {
                    if (IS_ATTACHTOPROJECTWIZARD()) {
                        strMessage.Printf(
                            _("The minimum email address length for this project is 1. Please enter a different email address.")
                        );
                    }
                    if (IS_ACCOUNTMANAGERWIZARD()) {
                        strMessage.Printf(
                            _("The minimum email address length for this account manager is 1. Please enter a different email address.")
                        );
                    }
                }
                bDisplayError = true;
            }
        }

        // Verify minimum password length
        if (!m_pAccountUseExistingCtrl->GetValue()) {
            if (m_pAccountPasswordCtrl->GetValue().Length() < (size_t)pc.min_passwd_length) {
                if (IS_ATTACHTOPROJECTWIZARD()) {
                    strMessage.Printf(
                        _("The minimum password length for this project is %d. Please enter a different password."),
                        pc.min_passwd_length
                    );
                }
                if (IS_ACCOUNTMANAGERWIZARD()) {
                    strMessage.Printf(
                        _("The minimum password length for this account manager is %d. Please enter a different password."),
                        pc.min_passwd_length
                    );
                }

                bDisplayError = true;
            }
        }

        // Verify that the password and confirmation password math.
        if (!IS_ACCOUNTMANAGERWIZARD() && m_pAccountCreateCtrl->GetValue()) {
            if (m_pAccountPasswordCtrl->GetValue() != m_pAccountConfirmPasswordCtrl->GetValue()) {
                strMessage = _("The password and confirmation password do not match. Please type them again.");
                bDisplayError = true;
            }
        }
 
        if (bDisplayError) {
            wxGetApp().SafeMessageBox(
                strMessage,
                strTitle,
                wxICON_ERROR | wxOK,
                this
            );
            event.Veto();
        }
    }
}
开发者ID:niclaslockner,项目名称:boinc,代码行数:98,代码来源:AccountInfoPage.cpp


示例18: OnPageChanged

void CAccountInfoPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;

    CWizardAttach*   pWA = ((CWizardAttach*)GetParent());
    CSkinAdvanced*   pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
    CSkinWizardATAM* pSkinWizardATAM = wxGetApp().GetSkinManager()->GetWizards()->GetWizardATAM();
    PROJECT_CONFIG&  pc = pWA->project_config;
    wxString         strBaseConfigLocation = wxString(wxT("/Wizards"));
    wxConfigBase*    pConfig = wxConfigBase::Get(FALSE);
 
    wxASSERT(pSkinAdvanced);
    wxASSERT(pSkinWizardATAM);
    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pCookieDetectionFailedStaticCtrl);
    wxASSERT(m_pCookieDetectionFailedCtrl);
    wxASSERT(m_pAccountQuestionStaticCtrl);
    wxASSERT(m_pAccountInformationStaticCtrl);
    wxASSERT(m_pAccountCreateCtrl);
    wxASSERT(m_pAccountUseExistingCtrl);
    wxASSERT(m_pAccountEmailAddressStaticCtrl);
    wxASSERT(m_pAccountEmailAddressCtrl);
    wxASSERT(m_pAccountUsernameStaticCtrl);
    wxASSERT(m_pAccountUsernameCtrl);
    wxASSERT(m_pAccountPasswordStaticCtrl);
    wxASSERT(m_pAccountPasswordCtrl);
    wxASSERT(m_pAccountConfirmPasswordStaticCtrl);
    wxASSERT(m_pAccountConfirmPasswordCtrl);
    wxASSERT(m_pAccountPasswordRequirmentsStaticCtrl);
    wxASSERT(m_pAccountManagerLinkLabelStaticCtrl);
    wxASSERT(m_pAccountForgotPasswordCtrl);
    wxASSERT(wxDynamicCast(pSkinAdvanced, CSkinAdvanced));
    wxASSERT(wxDynamicCast(pSkinWizardATAM, CSkinWizardATAM));


    // We are entering this page, so reterieve the previously used email
    // address and/or username.
    pConfig->SetPath(strBaseConfigLocation);
    m_strAccountEmailAddress = pConfig->Read(wxT("DefaultEmailAddress"));
    m_strAccountUsername = pConfig->Read(wxT("DefaultUsername"));

    // Setup the desired controls and default values.
    static bool bRunOnce = true;
    if (bRunOnce) {
        bRunOnce = false;
        if (!IS_ACCOUNTMANAGERWIZARD()) {
            m_pAccountCreateCtrl->SetValue(true);
            m_pAccountUseExistingCtrl->SetValue(false);
        }
    }

    if (IS_ACCOUNTMANAGERWIZARD()) {
        if (!(pWA->m_bCookieRequired && !pWA->m_bCredentialsDetected)) {
            m_pCookieDetectionFailedStaticCtrl->Hide();
            m_pCookieDetectionFailedCtrl->Hide();
        } else {
            m_pCookieDetectionFailedStaticCtrl->Show();
            m_pCookieDetectionFailedCtrl->Show();
        }

        m_pAccountQuestionStaticCtrl->Hide();
        m_pAccountCreateCtrl->SetValue(false);
        m_pAccountCreateCtrl->Hide();
        m_pAccountUseExistingCtrl->SetValue(true);
        m_pAccountUseExistingCtrl->Hide();
        m_pAccountConfirmPasswordStaticCtrl->Hide();
        m_pAccountConfirmPasswordCtrl->Hide();
        m_pAccountPasswordRequirmentsStaticCtrl->Hide();

        if (pWA->m_bCookieRequired && !pWA->m_bCredentialsDetected) {
            m_pAccountManagerLinkLabelStaticCtrl->Hide();
            m_pAccountForgotPasswordCtrl->Hide();
        }
    } else {
        m_pCookieDetectionFailedStaticCtrl->Hide();
        m_pCookieDetectionFailedCtrl->Hide();
        if (pc.account_creation_disabled || pc.client_account_creation_disabled) {
            m_pAccountCreateCtrl->SetValue(false);
            m_pAccountCreateCtrl->Hide();
            m_pAccountUseExistingCtrl->SetValue(true);
            m_pAccountUseExistingCtrl->Hide();
        } else {
            m_pAccountCreateCtrl->Show();
            m_pAccountCreateCtrl->Enable();
            m_pAccountUseExistingCtrl->Show();
        }
        m_pAccountManagerLinkLabelStaticCtrl->Hide();
    }

    wxString str;
    wxString name = wxString(pc.name.c_str(), wxConvUTF8);
    str.Printf(_("Identify your account at %s"), name.c_str());
    m_pTitleStaticCtrl->SetLabel(str);

    if (!IS_ACCOUNTMANAGERWIZARD() && !IS_ACCOUNTMANAGERUPDATEWIZARD()) {
		if (pc.client_account_creation_disabled) {
			m_pAccountQuestionStaticCtrl->SetLabel(
				_("Please enter your account information\n(to create an account, visit the project's web site)")
			);
		} else if (pc.account_creation_disabled) {
			m_pAccountQuestionStaticCtrl->SetLabel(
//.........这里部分代码省略.........
开发者ID:niclaslockner,项目名称:boinc,代码行数:101,代码来源:AccountInfoPage.cpp


示例19: OnPageChanged

void CAccountManagerInfoPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;
    wxLogTrace(wxT("Function Start/End"), wxT("CAccountManagerInfoPage::OnPageChanged - Function Begin"));

    unsigned int      i;
    ALL_PROJECTS_LIST pl;
    CMainDocument*    pDoc = wxGetApp().GetDocument();

    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDescriptionStaticCtrl);
    wxASSERT(m_pProjectDetailsStaticCtrl);
    wxASSERT(m_pProjectDetailsDescriptionCtrl);
    wxASSERT(m_pOpenWebSiteButton);
    wxASSERT(m_pProjectUrlStaticCtrl);
    wxASSERT(m_pProjectUrlCtrl);


    m_pTitleStaticCtrl->SetLabel(
        _("Choose an account manager")
    );
    m_pDescriptionStaticCtrl->SetLabel(
        _("To choose an account manager, click its name or \ntype its URL below.")
    );

    m_pProjectDetailsStaticCtrl->SetLabel(
        _("Account manager details:")
    );

    m_pProjectUrlStaticCtrl->SetLabel(
        _("Account manager &URL:")
    );

    m_pOpenWebSiteButton->SetLabel(
        _("Open web page")
    );

    m_pOpenWebSiteButton->SetToolTip( _("Visit this account manager's web site"));

    // Populate the list box with project information
    //
    if (!m_bAccountManagerListPopulated) {
        pDoc->rpc.get_all_projects_list(pl);
        for (i=0; i<pl.account_managers.size(); i++) {
            wxLogTrace(
                wxT("Function Status"),
                wxT("CAccountManagerInfoPage::OnPageChanged - Name: '%s', URL: '%s', Supported: '%d'"),
                wxString(pl.account_managers[i]->name.c_str(), wxConvUTF8).c_str(),
                wxString(pl.account_managers[i]->url.c_str(), wxConvUTF8).c_str(),
                true
            );

            CAcctMgrListItem* pItem = new CAcctMgrListItem();

            pItem->SetURL( pl.account_managers[i]->url.c_str() );
            pItem->SetName( pl.account_managers[i]->name.c_str() );
            pItem->SetImage( pl.account_managers[i]->image.c_str() );
            pItem->SetDescription( pl.account_managers[i]->description.c_str() );

            
            m_pProjectListCtrl->Append(
                wxString(pl.account_managers[i]->name.c_str(), wxConvUTF8),
                pItem
            );
        }

        // Pre select the first element
        if (m_pProjectListCtrl->GetCount()) {
            m_pProjectListCtrl->SetSelection(0);
            CAcctMgrListItem* pItem = (CAcctMgrListItem*)(m_pProjectListCtrl->GetClientData(0));
            SetProjectURL(pItem->GetURL());
            m_pProjectDetailsDescriptionCtrl->SetValue(pItem->GetDescription());
        }

        TransferDataToWindow();

        m_bAccountManagerListPopulated = true;
    }

    Layout();
    FitInside();
    m_pProjectListCtrl->SetFocus();

    wxLogTrace(wxT("Function Start/End"), wxT("CAccountManagerInfoPage::OnPageChanged - Function End"));
}
开发者ID:Ashod,项目名称:Boinc,代码行数:84,代码来源:AccountManagerInfoPage.cpp


示例20: OnPageChanged

void CProjectInfoPage::OnPageChanged( wxWizardExEvent& event ) {
    if (event.GetDirection() == false) return;
    wxLogTrace(wxT("Function Start/End"), wxT("CProjectInfoPage::OnPageChanged - Function Begin"));

    unsigned int                i, j, k;
    bool                        bSupportedPlatformFound = false;
    bool                        bProjectSupportsNvidiaGPU = false;
    bool                        bProjectSupportsATIGPU = false;
    bool                        bProjectSupportsMulticore = false;
    ALL_PROJECTS_LIST           pl;
    CMainDocument*              pDoc = wxGetApp().GetDocument();

    wxASSERT(pDoc);
    wxASSERT(wxDynamicCast(pDoc, CMainDocument));
    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDescriptionStaticCtrl);
    wxASSERT(m_pProjectListCtrl);
    wxASSERT(m_pProjectUrlStaticCtrl);
    wxASSERT(m_pProjectUrlCtrl);

    m_pTitleStaticCtrl->SetLabel(
        _("Choose a project")
    );
    m_pDescriptionStaticCtrl->SetLabel(
        _("To choose a project, click its name or type its URL below.")
    );
    m_pProjectUrlStaticCtrl->SetLabel(
        _("Project &URL:")
    );


    // Populate the virtual list control with project information
    //
    if (!m_bProjectListPopulated) {
        std::vector<std::string> &client_platforms = pDoc->state.platforms;
        pDoc->rpc.get_all_projects_list(pl);

        for (i=0; i<pl.projects.size(); i++) {
            bSupportedPlatformFound = false;
            bProjectSupportsNvidiaGPU = false;
            bProjectSupportsATIGPU = false;
            bProjectSupportsMulticore = false;

            wxLogTrace(
                wxT("Function Status"),
                wxT("CProjectInfoPage::OnPageChanged - Name: '%s', URL: '%s'"),
                wxString(pl.projects[i]->name.c_str(), wxConvUTF8).c_str(),
                wxString(pl.projects[i]->url.c_str(), wxConvUTF8).c_str()
            );

            std::vector<std::string> &project_platforms = pl.projects[i]->platforms;

            // Can the core client support a platform that this project
            //   supports?
            for (j = 0; j < client_platforms.size(); j++) {
                for (k = 0; k < project_platforms.size(); k++) {
                    wxString strClientPlatform = wxString(client_platforms[j].c_str(), wxConvUTF8);
                    wxString strProjectPlatform = wxString(project_platforms[k].c_str(), wxConvUTF8);
                    wxString strRootProjectPlatform = strProjectPlatform.SubString(0, strProjectPlatform.Find(_T("[")) - 1);

                    if (strProjectPlatform.Find(_T("[cuda")) != wxNOT_FOUND) {
                        if ((pDoc->state.have_cuda) && (strClientPlatform == strRootProjectPlatform)) {
                            bProjectSupportsNvidiaGPU = true;
                            bSupportedPlatformFound = true;
                        }
                    }

                    if (strProjectPlatform.Find(_T("[ati")) != wxNOT_FOUND) {
                        if ((pDoc->state.have_ati) && (strClientPlatform == strRootProjectPlatform)) {
                            bProjectSupportsATIGPU = true;
                            bSupportedPlatformFound = true;
                        }
                    }

                    if (strProjectPlatform.Find(_T("[mt")) != wxNOT_FOUND) {
                        if ((pDoc->host.p_ncpus >= 4) && (strClientPlatform == strRootProjectPlatform)) {
                            bProjectSupportsMulticore = true;
                            bSupportedPlatformFound = true;
                        }
                    }

                    if (strClientPlatform == strRootProjectPlatform) {
                        bSupportedPlatformFound = true;
                    }
                }
            }

            wxLogTrace(
                wxT("Function Status"),
                wxT("CProjectInfoPage::OnPageChanged - Nvidia: '%d', ATI: '%d', Multicore: '%d', Platform: '%d'"),
                bProjectSupportsNvidiaGPU,
                bProjectSupportsATIGPU,
                bProjectSupportsMulticore,
                bSupportedPlatformFound
            );

            m_pProjectListCtrl->Append(
                wxString(pl.projects[i]->url.c_str(), wxConvUTF8),
                wxString(pl.projects[i]->name.c_str(), wxConvUTF8),
                wxString(pl.projects[i]->image.c_str(), wxConvUTF8),
//.........这里部分代码省略.........
开发者ID:flywingsky,项目名称:native-boinc-for-android,代码行数:101,代码来源:ProjectInfoPage.cpp



注:本文中的wxWizardExEvent类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ wxXmlNode类代码示例发布时间:2022-05-31
下一篇:
C++ wxWizardEvent类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap