1bb372cd4b
- aggiunto file con classe per disabilitazione e ripristino stato precedente della impostazione di progetto modificato.
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
//----------------------------------------------------------------------------
|
|
// 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 ;
|
|
} ;
|