本文整理汇总了C++中CCANMonitorApp::pouGetFlagsPtr方法的典型用法代码示例。如果您正苦于以下问题:C++ CCANMonitorApp::pouGetFlagsPtr方法的具体用法?C++ CCANMonitorApp::pouGetFlagsPtr怎么用?C++ CCANMonitorApp::pouGetFlagsPtr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCANMonitorApp
的用法示例。
在下文中一共展示了CCANMonitorApp::pouGetFlagsPtr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnClose
//.........这里部分代码省略.........
if ((*ppTempMsgSg)->bGetDBAcitveFlagStatus() == TRUE)
{
pFrame->vPostMsgToSendMsgDlg(m_sDbParams.m_eBus);
}
// Check if the modified file is being loaded or not.
//If yes then prompt the user whether he wants to
//import it or not.
CStringArray omImportedDBNames;
CMsgSignal** m_ppsMSTemp = (CMsgSignal**)(m_sDbParams.m_ppvImportedDBs);
if ((*m_ppsMSTemp) != NULL)
{
(*m_ppsMSTemp)->vGetDataBaseNames(&omImportedDBNames);
for (INT nDBCount = 0; nDBCount < omImportedDBNames.GetSize();
nDBCount++)
{
if (m_sDbParams.m_omDBPath ==
omImportedDBNames.GetAt(nDBCount))
{
CString omText;
omText.Format( _T("File \"%s\" has been modified which is currently being loaded.\nDo you want to re-import it to reflect the changes?"),
m_sDbParams.m_omDBPath);
if (MessageBox(omText, "", MB_ICONQUESTION | MB_YESNO) == IDYES)
{
switch (m_sDbParams.m_eBus)
{
case CAN:
{
pFrame->dLoadDataBaseFile(m_sDbParams.m_omDBPath, FALSE);
}
break;
case J1939:
{
pFrame->dLoadJ1939DBFile(m_sDbParams.m_omDBPath, FALSE);
}
break;
};
}
}
}
}
//Checking ends
// Set the modified flag as saved
if (NULL != (*ppTempMsgSg))
{
(*ppTempMsgSg)->vSetModifiedFlag(TRUE);
}
}
else if( bRetVal == IDNO )
{
// if this is new database
// then delete the memory and the file itself
if ( pFrame->vGetNewDatabaseFlag())
{
// This file is no longer required
CFile::Remove( m_sDbParams.m_omDBPath );
pFrame->vSetNewDatabaseFlag(FALSE);
}
}
}
else
{
// If the user just creates new database,
// and closes the window
// delete the file
if ( pFrame->vGetNewDatabaseFlag() )
{
// This file is no longer required
CFile::Remove( m_sDbParams.m_omDBPath );
pFrame->vSetNewDatabaseFlag(FALSE);
}
}
// delete previously allocated memory if any
(*ppTempMsgSg)->bDeAllocateMemoryInactive();
// Reset the flag to indicate the closing of database window
if (m_sDbParams.m_eBus == CAN)
{
CFlags* pFlags = theApp.pouGetFlagsPtr();
if ( pFlags != NULL )
{
pFlags->vSetFlagStatus( DBOPEN, FALSE );
}
}
else if (m_sDbParams.m_eBus == J1939)
{
CMsgSignalDBWnd::sm_bValidJ1939Wnd = FALSE;
}
CMDIChildWnd::OnClose();
}
}
示例2: OnBnClickedCbtnDissociate
//.........这里部分代码省略.........
CStringArray aomstrDBFiles;
(*(CMsgSignal**)(m_sDbParams.m_ppvImportedDBs))->vGetDataBaseNames(&aomstrDBFiles);
//Delete the file path from the List box
int nTotalCount = aomStrFilesDissociated.GetSize();
CString omStrTempFile;
for(int nCount=0 ; nCount<nTotalCount ; nCount++)
{
omStrTempFile = aomStrFilesDissociated.GetAt(nCount);
int nIndex = 0;
if( (nIndex = m_omDissociateDbLst.FindString(0,
omStrTempFile)) != LB_ERR )
{
//Delete the file path from the list box
m_omDissociateDbLst.DeleteString(nIndex);
int nStoredFile = aomstrDBFiles.GetSize();
CString omStrTemp;
BOOL bRemoved = FALSE;
for(int nTemp = 0 ; nTemp < nStoredFile && bRemoved != TRUE; nTemp++)
{
omStrTemp = aomstrDBFiles.GetAt(nTemp);
if(!(omStrTemp.Compare(omStrTempFile)))
{
aomstrDBFiles.RemoveAt(nTemp);
bRemoved = TRUE;
}
}
}
}
//Set the new file name array
(*(CMsgSignal**)(m_sDbParams.m_ppvImportedDBs))->vSetDataBaseNames(&aomstrDBFiles);
// Send a message to Tx Window about database change
if( pMainFrame != nullptr)
{
eUSERSELCTION eUserSel = eDATABASEIMPORTCMD;
pMainFrame->m_objTxHandler.vPostMessageToTxWnd(WM_USER_CMD, (WPARAM)eUserSel,0);
}
////Delete Signal watch list and Graph window list
//// Check for Signal Watch & DLL load Condition
//
BOOL bUserOption = FALSE;
if(pMainFrame->m_psSignalWatchList != nullptr)
{
if(theApp.m_bFromAutomation == FALSE)
bUserOption = AfxMessageBox(_(defIMPORT_WARNING),
MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION) ==
IDYES;
// If user wants to clear
if(bUserOption == TRUE )
{
// Clear Signal Watch List
pMainFrame->vUpdateSWList();
}
}
//Added by Arun to update Data Handler Main entry list.
pMainFrame->vUpdateMainEntryListInWaveDataHandler();
pMainFrame->vClearSignalInfoList();
if(!pMainFrame->m_ouWaveTransmitter.bIsBlockEnabled())
{
theApp.pouGetFlagsPtr()->vSetFlagStatus( SEND_SIGNAL_MSG, FALSE );
}
//Update Message windows
pMainFrame->vUpdateAllMsgWndInterpretStatus(m_sDbParams.m_eBus, FALSE);
// Check for Graph list
for(register int nBusID = CAN; nBusID < AVAILABLE_PROTOCOLS; nBusID++)
{
if( pMainFrame->m_odGraphList[nBusID].m_omElementList.GetSize() > 0 )
{
// Get the delete confirmation from the user
if(theApp.m_bFromAutomation == FALSE)
bUserOption = AfxMessageBox(_(defIMPORT_WARNING_GRAPH),
MB_YESNO | MB_DEFBUTTON1 | MB_ICONQUESTION) ==
IDYES;
// If user wants to clear
if(bUserOption == TRUE )
{
// Clear Graph List for all buses.
for(register int nID = CAN; nID < AVAILABLE_PROTOCOLS; nID++)
{
pMainFrame->m_odGraphList[nID].m_omElementList.RemoveAll();
}
// Send the Message to the Left View to Update List for all buses
if( pMainFrame != nullptr )
{
pMainFrame->vPostConfigChangeCmdToSigGrphWnds(FALSE);
}
}
break;
}
}
}
}