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


C++ IsOK函数代码示例

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


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

示例1: OnOK

void CNBSelectDeviceDlg::OnOK(UINT /*wNotifyCode*/, int /*wID*/, HWND /*hwndCtl*/)
{
	if(!IsOK())
		return;

	m_listDevicesSelected.clear();
	m_listDevicesSelected = m_wndListSingle.GetSelectedDiskObjectList();

	EndDialog(IDOK);
}
开发者ID:Nevermore2015,项目名称:ndas4windows,代码行数:10,代码来源:nbdevicelistdlg.cpp

示例2: while

void KVSimReader_MMM_asym::ReadFile(){

	while (IsOK()){
		while (ReadEvent()){
			if (nevt%1000==0) Info("ReadFile","%d evts lus",nevt);
			if (HasToFill()) FillTree();
		}
	}	
	
}
开发者ID:pwigg,项目名称:kaliveda,代码行数:10,代码来源:KVSimReader_MMM_asym.cpp

示例3: OnOKClick

void DIALOG_EDITOR_DATA::OnOKClick( wxCommandEvent& event )
{
    if( !IsOK() )
    {
        wxMessageBox( _("Bad or missing parameters!") );
        return;
    }

    EndModal( wxID_OK );
}
开发者ID:jerkey,项目名称:kicad,代码行数:10,代码来源:regulators_funct.cpp

示例4: _GetFilePath

wxString CVolume::_GetFilePath(const wxChar *pFileName) const
{
  wxString sRtn;
  if(IsOK() && m_sPath.Len())
  {
    sRtn = GetPathPrefix(m_sPath);
    sRtn.Append(pFileName);
  }
  return sRtn;
}
开发者ID:ImAWolf,项目名称:osiris,代码行数:10,代码来源:CVolumes.cpp

示例5: DeleteAllFootprintFilter

void DIALOG_EDIT_COMPONENT_IN_LIBRARY::DeleteAllFootprintFilter( wxCommandEvent& event )
{
    if( IsOK( this, _( "OK to delete the footprint filter list ?" ) ) )
    {
        m_FootprintFilterListBox->Clear();
        m_ButtonDeleteAllFootprintFilter->Enable( false );
        m_ButtonDeleteOneFootprintFilter->Enable( false );
        m_buttonEditOneFootprintFilter->Enable( false );
    }
}
开发者ID:asutp,项目名称:kicad-source-mirror,代码行数:10,代码来源:dialog_edit_component_in_lib.cpp

示例6: DisplayError

void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_ID aLayer )
{
    if( IsCopperLayer( aLayer ) )
    {
        DisplayError( this, _( "Copper layer global delete not allowed!" ) );
        return;
    }

    wxString msg = wxString::Format(
        _( "Delete everything on layer %s?" ),
        GetChars( GetBoard()->GetLayerName( aLayer ) ) );

    if( !IsOK( this, msg ) )
        return;

    PICKED_ITEMS_LIST   pickList;
    ITEM_PICKER         picker( NULL, UR_DELETED );
    BOARD_ITEM*         PtNext;

    for( BOARD_ITEM* item = GetBoard()->m_Drawings;  item;  item = PtNext )
    {
        PtNext = item->Next();

        switch( item->Type() )
        {
        case PCB_LINE_T:
        case PCB_TEXT_T:
        case PCB_DIMENSION_T:
        case PCB_TARGET_T:
            if( item->GetLayer() == aLayer )
            {
                item->UnLink();
                picker.SetItem( item );
                pickList.PushItem( picker );
            }

            break;

        default:
        {
            wxString msg;
            msg.Printf( wxT("Delete_Drawings_All_Layer() error: unknown type %d"),
                        item->Type() );
            wxMessageBox( msg );
            break;
        }
        }
    }

    if( pickList.GetCount() )
    {
        OnModify();
        SaveCopyInUndoList(pickList, UR_DELETED);
    }
}
开发者ID:michaellis,项目名称:kicad-source-mirror,代码行数:55,代码来源:editedge.cpp

示例7: Decode

//_____________________________________________________________________________
Int_t THaTotalShower::Decode( const THaEvData& evdata )
{
  // Decode total shower detector. Calls Decode() of fPreShower and fShower.
  // Return the return value of fShower->Decode().

  if( !IsOK() ) 
    return -1;

  fPreShower->Decode( evdata );
  return fShower->Decode( evdata );
}
开发者ID:hansenjo,项目名称:analyzer,代码行数:12,代码来源:THaTotalShower.C

示例8: _

void SCH_EDIT_FRAME::OnAppendProject( wxCommandEvent& event )
{
    wxString msg = _( "This operation cannot be undone. "
            "Besides, take into account that hierarchical sheets will not be appended.\n\n"
            "Do you want to save the current document before proceeding?" );

    if( IsOK( this, msg ) )
        OnSaveProject( event );

    AppendOneEEProject();
}
开发者ID:p12tic,项目名称:kicad-source-mirror,代码行数:11,代码来源:files-io.cpp

示例9: OnRevertFieldChanges

void DIALOG_BOM_EDITOR::OnRevertFieldChanges( wxCommandEvent& event )
{
    if( m_bom->HaveFieldsChanged() )
    {
        if( IsOK( this, _( "Revert all component table changes?" ) ) )
        {
            m_bom->RevertFieldChanges();
            Update();
        }
    }
}
开发者ID:hyOzd,项目名称:kicad-source-mirror,代码行数:11,代码来源:dialog_bom_editor.cpp

示例10: GetWksFileName

void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
{
    wxFileName fn = GetWksFileName();
    wxString name = GetWksFileName();
    wxString path;

    if( fn.IsAbsolute() )
    {
        path = fn.GetPath();
        name = fn.GetFullName();
    }
    else
    {
        path = m_projectPath;
    }

    // Display a file picker dialog
    wxFileDialog fileDialog( this, _( "Select Page Layout Description File" ),
                             path, name, PageLayoutDescrFileWildcard(),
                             wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );

    if( fileDialog.ShowModal() != wxID_OK )
        return;

    wxString fileName = fileDialog.GetPath();

    // Try to remove the path, if the path is the current working dir,
    // or the dir of kicad.pro (template), and use a relative path
    wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( fileName, m_projectPath );

    // For Win/Linux/macOS compatibility, a relative path is a good idea
    if( shortFileName != GetWksFileName() && shortFileName != fileName )
    {
        wxString msg = wxString::Format( _(
                "The page layout description file name has changed.\n"
                "Do you want to use the relative path:\n"
                "\"%s\"\n"
                "instead of\n"
                "\"%s\"?" ), GetChars( shortFileName ), GetChars( fileName ) );

        if( !IsOK( this, msg ) )
            shortFileName = fileName;
    }

    SetWksFileName( shortFileName );

    if( m_pagelayout == NULL )
        m_pagelayout = new WORKSHEET_LAYOUT;

    m_pagelayout->SetPageLayout( fileName );

    GetPageLayoutInfoFromDialog();
    UpdatePageLayoutExample();
}
开发者ID:Lotharyx,项目名称:kicad-source-mirror,代码行数:54,代码来源:dialog_page_settings.cpp

示例11: wxMessageBox

void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
{
    wxString netlistFileName = m_NetlistFilenameCtrl->GetValue();
    wxFileName fn = netlistFileName;

    if( !fn.IsOk() )
    {
        wxMessageBox( _("Please, choose a valid netlist file") );
        return;
    }

    if( !fn.FileExists() )
    {
        wxMessageBox( _("The netlist file does not exist") );
        return;
    }

    // Give the user a chance to bail out when making changes from a netlist.
    if( !m_checkDryRun->GetValue() && !m_silentMode
            && !m_parent->GetBoard()->IsEmpty()
            && !IsOK( NULL, _( "The changes made by reading the netlist cannot be undone.  Are you "
                               "sure you want to read the netlist?" ) ) )
        return;

    m_MessageWindow->Clear();
    REPORTER& reporter = m_MessageWindow->Reporter();

    wxBusyCursor busy;

    wxString msg;
    msg.Printf( _( "Reading netlist file \"%s\".\n" ), GetChars( netlistFileName ) );
    reporter.Report( msg, REPORTER::RPT_INFO );

    if( m_Select_By_Timestamp->GetSelection() == 1 )
        msg = _( "Using time stamps to match components and footprints.\n" );
    else
        msg = _( "Using references to match components and footprints.\n" );

    reporter.Report( msg, REPORTER::RPT_INFO );
    m_MessageWindow->SetLazyUpdate( true ); // use a "lazy" update to speed up the creation of the report
    // (The window is not updated for each message)

    m_parent->ReadPcbNetlist( netlistFileName, wxEmptyString, &reporter,
                              m_ChangeExistingFootprintCtrl->GetSelection() == 1,
                              m_DeleteBadTracks->GetSelection() == 1,
                              m_RemoveExtraFootprintsCtrl->GetSelection() == 1,
                              m_Select_By_Timestamp->GetSelection() == 1,
                              m_rbSingleNets->GetSelection() == 1,
                              m_checkDryRun->GetValue() );
    // The creation of the report was made without window update:
    // the full page must be displayed
    m_MessageWindow->Flush();
}
开发者ID:pipatron,项目名称:kicad-source-mirror,代码行数:53,代码来源:dialog_netlist.cpp

示例12: FineProcess

//_____________________________________________________________________________
Int_t THaTotalShower::FineProcess( TClonesArray& tracks )
{
  // Fine processing. 
  // Call fPreShower->FineProcess() and fShower->FineProcess() in turn.
  // Return return value of fShower->FineProcess().

  if( !IsOK() )
    return -1;

  fPreShower->FineProcess( tracks );
  return fShower->FineProcess( tracks );
}
开发者ID:hansenjo,项目名称:analyzer,代码行数:13,代码来源:THaTotalShower.C

示例13: _

bool WinEDA_PcbFrame::Delete_Module(MODULE * module, wxDC * DC)
/**************************************************************/
/*
Commande Delete Module :
	Suppression d'une empreinte
	les pointeurs divers sont mis a jour
*/
{
EDA_BaseStruct * PtBack, *PtNext;
wxString msg;
	/* Si l'empreinte est selectee , on ne peut pas l'effacer ! */
	if ( module == NULL ) return FALSE;

	/* Confirmation de l'effacement */
	module->Display_Infos(this);

	msg << _("Delete Module") << wxT(" ") << module->m_Reference->m_Text
			<< wxT("  (") << _("Value ") << module->m_Value->m_Text
			<< wxT(") ?");
	if( !IsOK(this, msg ) )
	{
		return FALSE;
	}

	m_CurrentScreen->SetModify();

	/* Erase rastnest if needed */
	if(g_Show_Ratsnest) DrawGeneralRatsnest(DC);

	/* Effacement du module a l'ecran */
	if ( DC ) module->Draw(DrawPanel, DC, wxPoint(0,0), GR_XOR);

	/* Suppression du chainage */
	PtBack = module->Pback;
	PtNext = module->Pnext;
	if( PtBack == (EDA_BaseStruct*) m_Pcb )
		{
		m_Pcb->m_Modules = (MODULE*)PtNext;
		}
	else
		{
		PtBack->Pnext = PtNext;
		}
	if(PtNext) PtNext->Pback = PtBack;

	/* Sauvegarde en buffer des undelete */
	SaveItemEfface( module, 1);

	m_Pcb->m_Status_Pcb = 0 ;
	build_liste_pads() ;
	ReCompile_Ratsnest_After_Changes( DC );
	return TRUE;
}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:53,代码来源:modules.cpp

示例14: offPos

   void 
   AxisRenderable::renderAxisText()
   {
       for(int i=0;i<3;i++)
       {
           // Project the sphere onto the camera
           Ogre::Real left, right, top, bottom;

           Ogre::Vector3 offPos(0,0,0);
           offPos[i] = mLength;
           Ogre::Vector3 textPos = getWorldPosition() + offPos;
           Ogre::Sphere sphere(textPos,AxisTextSize);

           Ogre::Vector2 mCenterPosSC;
           if (mCamera->projectSphere(sphere, &left, &top, &right, &bottom))
           {
               int iLeft, iTop, iWidth, iHeight;
               mViewport->getActualDimensions(iLeft, iTop, iWidth, iHeight);
               size_t szLeft, szRight, szTop, szBottom;

               szLeft = (size_t)(iLeft + ((left + 1) * 0.5 * iWidth));
               szRight = (size_t)(iLeft + ((right + 1) * 0.5 * iWidth));
               szTop = (size_t)(iTop + ((-top + 1) * 0.5 * iHeight));
               szBottom = (size_t)(iTop + ((-bottom + 1) * 0.5 * iHeight));

               mCenterPosSC.x = ( szLeft + szRight ) / 2;
               mCenterPosSC.y = ( szTop + szBottom ) / 2; 
           }

           int nTop = mCenterPosSC.y  - AxisTextSize/2;
           int nLeft = mCenterPosSC.x  - AxisTextSize/2;
           
           mTextRect[i]->setLeft(nLeft);
           mTextRect[i]->setTop(nTop); 

           mTextRect[i]->setWidth(AxisTextSize);
           mTextRect[i]->setHeight(AxisTextSize);
           mTextRect[i]->setCaption(axisText[i]);

   
       }

       for(int i=0;i<3;i++)
       {
           mTextRect[i]->setParameter("colour_top", "0.5 0.7 0.5");
           mTextRect[i]->setParameter("colour_bottom", "0.5 0.7 0.5");
       }
       if(mAxisGizmoSelAxis != 1 && IsOK())
       {
           mTextRect[mAxisGizmoSelAxis]->setParameter("colour_top", "1 1 1");
           mTextRect[mAxisGizmoSelAxis]->setParameter("colour_bottom", "1 1 1");
       }
   }
开发者ID:gitrider,项目名称:wxsj2,代码行数:53,代码来源:Axis3d.cpp

示例15: currentDir

bool CArchiver7ZIP::Extract(LPCTSTR ArcFileName,CConfigManager&,const CConfigExtract& Config,bool bSafeArchive,LPCTSTR OutputDir,CString &strLog)
{
	if(!IsOK()){
		return false;
	}
	if(!bSafeArchive){
		strLog.Format(IDS_ERROR_DANGEROUS_ARCHIVE,ArcFileName);
		return false;
	}

	//出力先移動
	CCurrentDirManager currentDir(OutputDir);

	//===========================
	// DLLに渡すオプションの設定
	//===========================
	TRACE(_T("DLLに渡すオプションの設定\n"));

	CString Param;//コマンドライン パラメータ バッファ

	//解凍パラメータ
	Param+=_T("x ");			//解凍
	if(Config.ForceOverwrite){
		//強制上書き
		Param+=_T("-aoa ");
	}

	Param+=_T("-scsUTF-8 ");	//レスポンスファイルのコードページ指定

	//作業ディレクトリ
	Param+=_T("\"-w");
	Param+=UtilGetTempPath();
	Param+=_T("\" ");

	//アーカイブファイル名指定
	Param+=_T("\"");
	Param+=ArcFileName;
	Param+=_T("\" ");

	ASSERT(!Param.IsEmpty());
	TRACE(_T("ArchiveHandler Commandline Parameter:%s\n"),Param);

	TRACE(_T("ArchiveHandler呼び出し\n"));
	std::vector<BYTE> szLog(LOG_BUFFER_SIZE);
	szLog[0]='\0';
	int Ret=ArchiveHandler(NULL,C2UTF8(Param),(LPSTR)&szLog[0],LOG_BUFFER_SIZE-1);
	CString strTmp;
	UtilToUNICODE(strTmp,&szLog[0],szLog.size()-1,UTILCP_UTF8);
	//strLog=&szLog[0];
	strLog=strTmp;

	return 0==Ret;
}
开发者ID:Claybird,项目名称:lhaforge,代码行数:53,代码来源:Archiver7ZIP.cpp


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