e6ea9b2ccd
- nel caso di calcolo diretto della licenza il nome del file di licenza coincide con quello del file dati e non si incrementa il conto.
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : KeyGeneratorDlg.cpp Data : 11.09.14 Versione : 1.5i2
|
|
// Contenuto : Dichiarazione della classe dialogo generatore chiavi.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 11.09.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
//----------------------------------------------------------------------------
|
|
// KeyMaker class
|
|
class KeyMaker
|
|
{
|
|
public :
|
|
KeyMaker(void) ;
|
|
bool SetCustomer( const std::string& sCustomer) ;
|
|
bool SetLockId( const std::string& sLockId2) ;
|
|
bool SetProduct( const std::string& sProd) ;
|
|
bool SetVersion( const std::string& sVer) ;
|
|
bool SetLevel( const std::string& sLev) ;
|
|
bool SetExpirDays( int nExpDays) ;
|
|
bool SetOptions( unsigned int nOpt1, unsigned int nOpt2) ;
|
|
bool SetOptExpirDays( int nOptExpDays) ;
|
|
bool CalcKey( void) ;
|
|
bool GetKey( std::string& sKey) ;
|
|
bool SaveData( bool bSpecial) ;
|
|
|
|
private :
|
|
bool DiffLicence( const char* szFile) ;
|
|
bool WriteLicence( const char* szSec, const char* szFile, bool bAll) ;
|
|
|
|
private :
|
|
std::string m_sCustomer ;
|
|
std::string m_sLockId ;
|
|
std::string m_sLockId2 ;
|
|
std::string m_sScramKey ;
|
|
std::string m_sKey ;
|
|
int m_nProd ;
|
|
int m_nVer ;
|
|
int m_nLev ;
|
|
int m_nExpDays ;
|
|
unsigned int m_nOpt1 ;
|
|
unsigned int m_nOpt2 ;
|
|
int m_nOptExpDays ;
|
|
} ;
|