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


C++ wxWizardEvent::GetDirection方法代码示例

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


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

示例1: OnWizardPageChanging

void SelGenSchemaPage::OnWizardPageChanging(wxWizardEvent &event)
{
	if(event.GetDirection() && m_allSchemas->GetSelection() == wxNOT_FOUND)
	{
		wxMessageBox(_("Please select an item to move to next step."), _("No choice made"), wxICON_WARNING | wxOK, this);
		event.Veto();
	}
	else if(event.GetDirection())
	{
		if(m_allSchemas->GetSelection() > 0)
		{
			wparent->OIDSelectedSchema = schemasHM[schemasNames[m_allSchemas->GetSelection()]];
			wparent->schemaName = schemasNames[m_allSchemas->GetSelection()];
			wxArrayString tables = ddImportDBUtils::getTablesNames(wparent->getConnection(), wparent->schemaName);
			wparent->getDesign()->unMarkSchemaOnAll();
			wparent->getDesign()->markSchemaOn(tables);
		}
		else
		{
			wparent->OIDSelectedSchema = -1;
			wparent->schemaName = _("");
		}
		wparent->page4->populateGrid();
	}
}
开发者ID:AnnaSkawinska,项目名称:pgadmin3,代码行数:25,代码来源:ddGenerationWizard.cpp

示例2: OnWizardPageChanging

void WizardPageFlagsConfig::OnWizardPageChanging( wxWizardEvent& event )
{
    uint32_t mask = ( 1 << m_pItem->m_width ) - 1;
    mask = mask << m_pItem->m_pos;

    if ( event.GetDirection() ) {  // Forward

        if ( flagtype_value == m_pItem->m_type ) {
            wxString str = m_textField->GetValue();
            if ( !str.IsNumber() ) {
                event.Veto();
            }
            else {
                m_value = vscp_readStringValue( str );
                m_value = ( m_value << m_pItem->m_pos ) & mask;
            }
        }
        else if ( flagtype_choice == m_pItem->m_type ) {
            m_value = m_listBox->GetSelection();
            m_value = ( m_value << m_pItem->m_pos ) & mask;
        }
        else {  // Boolean
            m_value = ( m_boolChoice->GetValue() ? 1 : 0 );
            m_value = ( m_value << m_pItem->m_pos ) & mask;
        }

    }
    else { // Backward

    }
}
开发者ID:ajje,项目名称:vscp,代码行数:31,代码来源:canalconfobj.cpp

示例3: OnPageChanging

//------------------------------------------------------------------------------
void WizCompilerPanel::OnPageChanging(wxWizardEvent& event)
{
    if (event.GetDirection() != 0) // !=0 forward, ==0 backward
    {
        if (GetCompilerID().IsEmpty())
        {
            cbMessageBox(_("You must select a compiler for your project..."), _("Error"), wxICON_ERROR, GetParent());
            event.Veto();
            return;
        }
        if (m_AllowConfigChange && !GetWantDebug() && !GetWantRelease())
        {
            cbMessageBox(_("You must select at least one configuration..."), _("Error"), wxICON_ERROR, GetParent());
            event.Veto();
            return;
        }

        if (m_AllowConfigChange)
        {
            ConfigManager* cfg = Manager::Get()->GetConfigManager(_T("scripts"));

            cfg->Write(_T("/generic_wizard/want_debug"), (bool)GetWantDebug());
            cfg->Write(_T("/generic_wizard/debug_name"), GetDebugName());
            cfg->Write(_T("/generic_wizard/debug_output"), GetDebugOutputDir());
            cfg->Write(_T("/generic_wizard/debug_objects_output"), GetDebugObjectOutputDir());

            cfg->Write(_T("/generic_wizard/want_release"), (bool)GetWantRelease());
            cfg->Write(_T("/generic_wizard/release_name"), GetReleaseName());
            cfg->Write(_T("/generic_wizard/release_output"), GetReleaseOutputDir());
            cfg->Write(_T("/generic_wizard/release_objects_output"), GetReleaseObjectOutputDir());
        }
    }
    WizPageBase::OnPageChanging(event); // let the base class handle it too
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:35,代码来源:wizpage.cpp

示例4: OnPageChanging

void CErrProxyPage::OnPageChanging(wxWizardEvent& 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:phenix3443,项目名称:synecdoche,代码行数:31,代码来源:ProxyPage.cpp

示例5: OnPageChanging

void MyWizard::OnPageChanging(wxWizardEvent &event)
{
	wxWizardPage *wp=event.GetPage();
	EnterLeavePage *elp=dynamic_cast<EnterLeavePage*>(wp);
	if (elp)
	{
		if (event.GetDirection())
		{
			//forward
			bool b=elp->OnLeave(true);
			if (!b) {event.Veto();return;}
			wxWizardPage *nwp=wp->GetNext();
			EnterLeavePage *nelp=dynamic_cast<EnterLeavePage*>(nwp);
			if (nelp)
			{
				bool b=nelp->OnEnter(true);
				if (!b) event.Veto();
			}
		}
		else
		{
			//backward
			bool b=elp->OnLeave(false);
			if (!b) {event.Veto();return;}
			wxWizardPage *nwp=wp->GetPrev();
			EnterLeavePage *nelp=dynamic_cast<EnterLeavePage*>(nwp);
			if (nelp)
			{
				bool b=nelp->OnEnter(false);
				if (!b) event.Veto();
			}
		}
	}
}
开发者ID:DirtGamer301,项目名称:rigs-of-rods,代码行数:34,代码来源:wizard.cpp

示例6: OnPageChanged

void ConnectWizard::OnPageChanged( wxWizardEvent& event ) {
	dout << "> OnPageChanged" << std::endl;
	if( event.GetDirection() ) {
		if( GetCurrentPage()==sessionlistPage ) {
			// just in case
			dout << "stop search" << std::endl;
			d->setup.stopSearch();

			// clear host search list
			dout << "clear list" << std::endl;
			d->sessionsCritSec.Enter();
			d->hosts.clear();
			sessions->Clear();
			sessions->Refresh();
			d->sessionsCritSec.Leave();

			// start new host search
			dout << "start new search" << std::endl;
			long portNum;
			port->GetValue().ToLong( &portNum );

			bool ret = d->setup.startSearch( broadcastRadio->GetValue(),
											 hostName->GetValue().c_str(), portNum );
			if( !ret )
				derr << "Search failed. Take a look at the logs to find out why." << std::endl;
		}
	}

	dout << "< OnPageChanged" << std::endl;
}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:30,代码来源:ConnectWizard.cpp

示例7: OnWizardPageChanging

    void OnWizardPageChanging(wxWizardEvent& event)
    {
        int sel = m_radio->GetSelection();

        if ( sel == Both )
            return;

        if ( event.GetDirection() && sel == Forward )
            return;

        if ( !event.GetDirection() && sel == Backward )
            return;

        wxMessageBox(wxT("You can't go there"), wxT("Not allowed"),
                     wxICON_WARNING | wxOK, this);

        event.Veto();
    }
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:18,代码来源:wizard.cpp

示例8: OnPageChanged

//------------------------------------------------------------------------------
void WizProjectPathPanel::OnPageChanged(wxWizardEvent& event)
{
    if (event.GetDirection() != 0) // !=0 forward, ==0 backward
    {
        wxString dir = Manager::Get()->GetProjectManager()->GetDefaultPath();
        m_pProjectPathPanel->SetPath(dir);
    }
    WizPageBase::OnPageChanged(event); // let the base class handle it too
}
开发者ID:stahta01,项目名称:codeblocks_r7456,代码行数:10,代码来源:wizpage.cpp

示例9: OnPageChanging

void FirstTimeWizard::OnPageChanging( wxWizardEvent& evt )
{
	if( evt.GetPage() == NULL ) return;		// safety valve!

	sptr page = (sptr)evt.GetPage()->GetClientData();

	if( evt.GetDirection() )
	{
		// Moving forward:
		//   Apply settings from the current page...

		if( page >= 0 )
		{
			if( ApplicableWizardPage* page = wxDynamicCast( GetCurrentPage(), ApplicableWizardPage ) )
			{
				if( !page->PrepForApply() || !page->GetApplyState().ApplyAll() )
				{
					evt.Veto();
					return;
				}
			}
		}

		if( page == 0 )
		{
			if( wxFile::Exists(GetUiSettingsFilename()) || wxFile::Exists(GetVmSettingsFilename()) )
			{
				// Asks the user if they want to import or overwrite the existing settings.

				Dialogs::ImportSettingsDialog modal( this );
				if( modal.ShowModal() != wxID_OK )
				{
					evt.Veto();
					return;
				}
			}
		}
	}
	else
	{
		// Moving Backward:
		//   Some specific panels need per-init actions canceled.

		if( page == 1 )
		{
			m_panel_PluginSel.CancelRefresh();
		}
	}
}
开发者ID:AdmiralCurtiss,项目名称:pcsx2,代码行数:49,代码来源:FirstTimeWizard.cpp

示例10: OnPageChanging

void PHPXDebugSetupWizard::OnPageChanging(wxWizardEvent& event)
{
    event.Skip();
    if(event.GetDirection() && event.GetPage() == m_wizardPageIDEKey) {
        // build the text to copy
        wxString content;
        content << "xdebug.remote_enable=1\n";
        content << "xdebug.idekey=\"" << m_textCtrlKey->GetValue() << "\"\n";
        content << "xdebug.remote_host=" << m_textCtrlIP->GetValue() << "\n";
        content << "xdebug.remote_port=" << m_textCtrlPort->GetValue() << "\n";

        m_textCtrlPHPIni->ChangeValue(content);
        CallAfter(&PHPXDebugSetupWizard::SelectAllIniText);
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:15,代码来源:PHPXDebugSetupWizard.cpp

示例11: OnPageChanging

void PluginWizard::OnPageChanging(wxWizardEvent& event)
{
    if ( event.GetDirection() && event.GetPage() == m_pages.at(0)) {
        wxString pluginName = m_textCtrlName->GetValue();
        pluginName.Trim();
        if ( pluginName.IsEmpty() || !::IsValidCppIndetifier(pluginName) ) {
            ::wxMessageBox(_("Invalid plugin name"), "codelite");
            event.Veto();
            return;
        }
    } else if ( event.GetDirection() && event.GetPage() == m_pages.at(1)) {
        if ( !wxDir::Exists( m_dirPickerCodeliteDir->GetPath() ) ) {
            ::wxMessageBox(_("codelite folder does not exists"), "codelite");
            event.Veto();
            return;
        }

        if ( !wxDir::Exists( m_dirPickerPluginPath->GetPath() ) ) {
            ::wxMessageBox(_("The selected plugin folder does not exist"), "codelite");
            event.Veto();
            return;
        }
    }
}
开发者ID:292388900,项目名称:codelite,代码行数:24,代码来源:PluginWizard.cpp

示例12: OnPageChanged

void CErrNotDetectedPage::OnPageChanged(wxWizardEvent& event) {
    if (event.GetDirection() == false) return;

    wxASSERT(m_pTitleStaticCtrl);
    wxASSERT(m_pDirectionsStaticCtrl);

    if (CheckWizardTypeByPage<CWizardAttachProject>(this)) {
        m_pTitleStaticCtrl->SetLabel(_("Project not found"));
        m_pDirectionsStaticCtrl->SetLabel(_("The URL you supplied is not that of a BOINC-based project.\n\nPlease check the URL and try again."));
    } else if (CheckWizardTypeByPage<CWizardAccountManager>(this)) {
        m_pTitleStaticCtrl->SetLabel(_("Account manager not found"));
        m_pDirectionsStaticCtrl->SetLabel(_("The URL you supplied is not that of a BOINC-based account\nmanager.\n\nPlease check the URL and try again."));
    } else {
        wxASSERT(FALSE);
    }
    Fit();
}
开发者ID:phenix3443,项目名称:synecdoche,代码行数:17,代码来源:NotDetectedPage.cpp

示例13: OnNextPage

void ConnectWizard::OnNextPage( wxWizardEvent& event ) {
	dout << "> OnNextPage" << std::endl;
	if( event.GetDirection() ) {
		if( GetCurrentPage()==hostPage ) {
			wxIPV4address addr;
			if( directRadio->GetValue() && addr.Hostname( hostName->GetValue() )==false ) {
		        wxMessageBox(_T("Please enter a valid internet (IP v4) address for the hostname."), _T("Invalid hostname"),
							 wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}
                
			if( addr.Service( port->GetValue() )==false ) {
				wxMessageBox(_T("Please enter a valid port number (between 1 and 65535)."), 
							 _T("Invalid port"),
							 wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}
		} else
		if( GetCurrentPage()==sessionlistPage ) {
			d->setup.stopSearch();

			// session selected?
			int selected = sessions->GetSelection();
			if( selected==wxNOT_FOUND ) {
				wxMessageBox(_T("Please select the host you want to connect to."), 
							 _T("No host selected"),
							 wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}

			// connect finally
			d->con = d->setup.connect( d->hosts[selected] );
			if( d->con.isNull() ) {
				wxMessageBox( _T(d->setup.errorMessage().c_str()),
							  _T("Connection error"),
							  wxICON_ERROR | wxOK, this);
				event.Veto();
				return;
			}
		}
	}	
	dout << "< OnNextPage" << std::endl;
}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:46,代码来源:ConnectWizard.cpp

示例14: OnNextPage

void HostWizard::OnNextPage( wxWizardEvent& event ) {
    if( event.GetDirection() )
        if( GetCurrentPage()==sessionPage ) {
            if( sessionNameEdit->GetValue().Length()==0 ) {
                wxMessageBox(_T("Please enter a session name. Empty session names are not allowed."), _T("Invalid session name"),
                             wxICON_ERROR | wxOK, this);
                event.Veto();
            } else {

                long ret;
                if( !portEdit->GetValue().ToLong( &ret ) || ret<=0 || ret>65535 ) {
                    wxMessageBox(_T("Please enter a valid port number (between 1 and 65535)."), _T("Invalid port"),
                                 wxICON_ERROR | wxOK, this);
                    event.Veto();
                }
            }
        }
}
开发者ID:BackupTheBerlios,项目名称:multicrew-svn,代码行数:18,代码来源:HostWizard.cpp

示例15: OnWizardPageChanging

void DriveSelectPage::OnWizardPageChanging(wxWizardEvent& event)
{
	m_filename = m_drivebox->GetValue();
	m_type     = wxString((char *)m_typebox->GetClientData(m_typebox->GetSelection()), wxConvUTF8);
	m_compress = wxString((char *)m_compbox->GetClientData(m_compbox->GetSelection()), wxConvUTF8);
	if (m_pageType == PT_FORMAT)
		 m_format   = (dsk_format_t)(m_formbox->GetSelection());
	else m_format   = (dsk_format_t)(m_formbox->GetSelection() - 1);

	m_forceHead  = m_head->GetSelection() - 1;
	m_doubleStep = m_dstep->GetValue();

	if (m_filename.IsEmpty() && event.GetDirection())
	{
		wxMessageBox(_T("You have not entered a filename."), _T("Choose disc"),
             wxICON_WARNING | wxOK, this);

        event.Veto();
	}
}
开发者ID:damieng,项目名称:johnelliot,代码行数:20,代码来源:DriveSelectPage.cpp


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