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


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

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


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

示例1: 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

示例2: 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

示例3: OnPageChanging

void CUpdateWizard::OnPageChanging(wxWizardEvent& event)
{
	if (m_skipPageChanging)
		return;
	m_skipPageChanging = true;

	if (event.GetPage() == m_pages[0])
	{
		event.Veto();

		PrepareUpdateCheckPage();
		StartUpdateCheck();
	}
	if (event.GetPage() == m_pages[1] && m_pages[1]->GetNext())
	{
		if (!SetLocalFile())
		{
			event.Veto();
			m_skipPageChanging = false;
			return;
		}
	}

	m_skipPageChanging = false;
}
开发者ID:madnessw,项目名称:thesnow,代码行数:25,代码来源:updatewizard.cpp

示例4: 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

示例5: 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

示例6: 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

示例7: OnExit

void CStartDialog::OnExit(wxWizardEvent &event)
{
	int style = wxYES_NO;
	if( wxMessageBox( "Are you sure you want to exit?", "Confirmation", style ) == wxYES )
		EndModal( wxID_CANCEL );
	else
		event.Veto();
}
开发者ID:oneeyeman1,项目名称:BaseballDraft,代码行数:8,代码来源:startdialog.cpp

示例8: 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

示例9: 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

示例10: OnWizardCancel

 // wizard event handlers
 void OnWizardCancel(wxWizardEvent& event)
 {
     if ( wxMessageBox(wxT("Do you really want to cancel?"), wxT("Question"),
                       wxICON_QUESTION | wxYES_NO, this) != wxYES )
     {
         // not confirmed
         event.Veto();
     }
 }
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:10,代码来源:wizard.cpp

示例11: GetName

void PluginWizardPage1::OnValidate(wxWizardEvent &event)
{
	wxString name = GetName();
	name = name.Trim().Trim(false);

	//we dont accept empty plugin names
	if(name.IsEmpty()){
		wxMessageBox(_("Missing plugin name"), wxT("EmbeddedLite"), wxOK | wxICON_WARNING);
		event.Veto();
		return;
	}
	//a valid name must contains only
	//[A-Za-z_]
	if(name.find_first_not_of(wxT("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_")) != wxString::npos){
		wxMessageBox(_("Invalid characters in plugin name\nonly [A-Za-z_0-9] are allowed"), wxT("EmbeddedLite"), wxOK | wxICON_WARNING);
		event.Veto();
		return;
	}
	event.Skip();
}
开发者ID:RVictor,项目名称:EmbeddedLite,代码行数:20,代码来源:pluginwizard_page1.cpp

示例12: OnWizardCancel

void OyunWizardPage::OnWizardCancel(wxWizardEvent &event) {
  if (wxMessageBox(_("Closing this wizard will quit Oyun.\n\n"
                     "Are you sure you want to quit?"),
                   _("Quit"), wxICON_QUESTION | wxYES_NO, this) != wxYES) {
    // User decided to cancel
    event.Veto();
    return;
  }

  // Otherwise, let this go
  event.Skip();
}
开发者ID:cpence,项目名称:oyun,代码行数:12,代码来源:oyunwizardpage.cpp

示例13: OnPageChanging

void NewProjectWizard::OnPageChanging(wxWizardEvent& event)
{
    if ( event.GetDirection() ) {
        // -------------------------------------------------------
        // Switching from the Templates page
        // -------------------------------------------------------
        if ( event.GetPage() == m_wizardPageTemplate ) {
            if ( !CheckProjectTemplate() ) {
                event.Veto();
                return;
            }

        } else if ( event.GetPage() == m_wizardPageDetails ) {
            if( !CheckProjectName() || !CheckProjectPath() ) {
                event.Veto();
                return;
            }
        }
    }
    event.Skip();
}
开发者ID:HTshandou,项目名称:codelite,代码行数:21,代码来源:NewProjectWizard.cpp

示例14: 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

示例15: on_wizardpage_changing

void proxy_wizardpage::on_wizardpage_changing( wxWizardEvent& event )
{
    // If proxy wizardpage values are not valid...
    if ( ! is_proxy_valid() ) 
    {
            wxMessageDialog invalid_proxy_messagedialog ( this,
              _( "Your proxy server is invalid. It must begin with either http:// or https://" ),
              _( "Proxy invalid" ),
              wxOK | wxICON_INFORMATION );
            // ...then show the message dialog...
            invalid_proxy_messagedialog.ShowModal();
            // .. and veto the wizardpagechanging event from moving off this wizardpage.
            event.Veto();
            return;
    }
}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:16,代码来源:proxy_wizardpage.cpp


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