Include :
- aggiunto file con classe per disabilitazione e ripristino stato precedente della impostazione di progetto modificato.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2017-2017
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EXeSetModifiedOff.h Data : 04.01.17 Versione : 1.6x4
|
||||
// Contenuto : Dichiarazione classe per disabilitazione temporanea
|
||||
// impostazione progetto modificato.
|
||||
//
|
||||
//
|
||||
// Modifiche : 04.01.17 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class SetModifiedOff
|
||||
{
|
||||
public :
|
||||
explicit SetModifiedOff( void) {
|
||||
m_bOldMod = ExeGetEnableModified() ;
|
||||
ExeDisableModified() ;
|
||||
m_nOldCtx = ExeGetCurrentContext() ;
|
||||
}
|
||||
~SetModifiedOff( void) {
|
||||
Reset() ;
|
||||
}
|
||||
void Reset( void) {
|
||||
if ( ! m_bOldMod)
|
||||
return ;
|
||||
int nCurrCtx = ExeGetCurrentContext() ;
|
||||
if ( nCurrCtx != m_nOldCtx)
|
||||
ExeSetCurrentContext( m_nOldCtx) ;
|
||||
ExeEnableModified() ;
|
||||
if ( nCurrCtx != m_nOldCtx)
|
||||
ExeSetCurrentContext( nCurrCtx) ;
|
||||
m_bOldMod = false ;
|
||||
}
|
||||
|
||||
private :
|
||||
bool m_bOldMod ;
|
||||
int m_nOldCtx ;
|
||||
} ;
|
||||
Reference in New Issue
Block a user