本文整理汇总了C++中IsOK函数的典型用法代码示例。如果您正苦于以下问题:C++ IsOK函数的具体用法?C++ IsOK怎么用?C++ IsOK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IsOK函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Start
/*-----------------------------------------------------------------------------
Function Name: Start()
Arugments: void
Returns: bool, true if we start our thread
Access: Public
Purpose: public interface to start the work
Created: 3/4/04 p.faby
Modified:
-------------------------------------------------------------------------------*/
bool WinMXThreadedLauncher::StartLaunch()
{
bool result = false;
m_currentProcToFix=0;
m_numberOfProcsLaunched= 0;
if(IsOK())
{
result = StartThread();
}
return result;
}
开发者ID:vdrive,项目名称:TrapperKeeper,代码行数:22,代码来源:WinMXThreadedLauncher.cpp
示例17:
const wxString &CILSLadderInfo::FindDisplayName
(const wxString &sLSname) const
{
if(IsOK() && !m_mapNameToDisplay.size())
{
_BuildNameToDisplay();
}
std::map<const wxString ,const wxString &>::const_iterator itr =
m_mapNameToDisplay.find(sLSname);
const wxString &sRtn = (itr == m_mapNameToDisplay.end())
? mainApp::EMPTY_STRING : itr->second;
return sRtn;
}
开发者ID:ncbi,项目名称:osiris,代码行数:13,代码来源:CILSLadderInfo.cpp
示例18: INITMAP
bool CDirList::Traverse(
const wxString &sDirInput,
const wxString &sDirOutput,
int nFileType)
{
INITMAP();
Cleanup();
if(!nFileType)
{
nFileType = FILE_ANY;
}
m_nFileType = nFileType;
if(!wxDir::Exists(sDirInput)) //wxFileName::Mkdir(sDirInput,0755,wxPATH_MKDIR_FULL))
{
m_nStatus = DIRLIST_INPUT_NOT_EXIST;
}
else if(!wxFileName::Mkdir(sDirOutput,0755,wxPATH_MKDIR_FULL))
{
m_nStatus = DIRLIST_OUTPUT_NOT_EXIST;
}
else
{
wxFileName fnIn(sDirInput);
wxFileName fnOut(sDirOutput);
m_sDirInput = fnIn.GetFullPath();
m_sDirOutput = fnOut.GetFullPath();
m_sDirSave.Empty();
m_sDirLoad.Empty();
// for each input file, remove base input and last dir
// append to output dir
nwxFileUtil::EndWithSeparator(&m_sDirOutput);
nwxFileUtil::NoEndWithSeparator(&m_sDirInput);
m_sDirInputBase = fnIn.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
nwxFileUtil::EndWithSeparator(&m_sDirInputBase);
if(m_parmOsiris.GetTimeStampSubDir())
{
CreateFileName(true);
}
else
{
ClearTimeStamp();
}
wxDir dirIn(sDirInput);
OnDir(sDirInput);
dirIn.Traverse(*this,wxEmptyString,wxDIR_DIRS);
m_nStatus = m_vpDir->empty() ? DIRLIST_EMPTY : DIRLIST_OK;
m_setDirs.clear();
}
return IsOK();
};
开发者ID:HelloWilliam,项目名称:osiris,代码行数:51,代码来源:CDirList.cpp
示例19: DisplayInfoMessage
/* Export data in Pcbnew format
* remember Pcbnew uses a Y reversed axis, so we must negate all Y coordinates
*/
void GERBVIEW_FRAME::ExportDataInPcbnewFormat( wxCommandEvent& event )
{
int layercount = 0;
// Count the Gerber layers which are actually currently used
for( LAYER_NUM ii = FIRST_LAYER; ii < NB_GERBER_LAYERS; ++ii )
{
if( g_GERBER_List[ii] != NULL )
layercount++;
}
if( layercount == 0 )
{
DisplayInfoMessage( this,
_( "None of the Gerber layers contain any data" ) );
return;
}
wxString fileName;
wxString path = wxGetCwd();;
wxFileDialog filedlg( this, _( "Board file name:" ),
path, fileName, LegacyPcbFileWildcard,
wxFD_SAVE );
if( filedlg.ShowModal() == wxID_CANCEL )
return;
fileName = filedlg.GetPath();
/* Install a dialog frame to choose the mapping
* between gerber layers and Pcbnew layers
*/
LAYERS_MAP_DIALOG* layerdlg = new LAYERS_MAP_DIALOG( this );
int ok = layerdlg->ShowModal();
layerdlg->Destroy();
if( ok != wxID_OK )
return;
if( wxFileExists( fileName ) )
{
if( !IsOK( this, _( "OK to change the existing file ?" ) ) )
return;
}
GBR_TO_PCB_EXPORTER gbr_exporter( this, fileName );
gbr_exporter.ExportPcb( layerdlg->GetLayersLookUpTable(),
layerdlg->GetCopperLayersCount() );
}
开发者ID:barrem,项目名称:kicad-source-mirror,代码行数:54,代码来源:export_to_pcbnew.cpp
示例20: _
/*
* Change the number of parts per package.
*/
bool DIALOG_EDIT_COMPONENT_IN_LIBRARY::ChangeNbUnitsPerPackage( int MaxUnit )
{
LIB_PART* part = m_Parent->GetCurPart();
if( !part || part->GetUnitCount() == MaxUnit || MaxUnit < 1 )
return false;
if( MaxUnit < part->GetUnitCount()
&& !IsOK( this, _( "Delete extra parts from component?" ) ) )
return false;
part->SetUnitCount( MaxUnit );
return true;
}
开发者ID:asutp,项目名称:kicad-source-mirror,代码行数:17,代码来源:dialog_edit_component_in_lib.cpp
注:本文中的IsOK函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论