当前位置: 首页>>代码示例>>C++>>正文


C++ wxWizardExEvent类代码示例

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


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


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