EgtInterface 1.6k5 :
- modifiche per gestione DB lavorazioni.
This commit is contained in:
+196
-1
@@ -321,6 +321,13 @@ __stdcall EgtTdbIsCurrToolModified( void)
|
||||
return ( ExeTdbIsCurrToolModified() ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtTdbSetCurrToolParamBool( int nType, BOOL bVal)
|
||||
{
|
||||
return ( ExeTdbSetCurrToolParam( nType, ( bVal != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtTdbSetCurrToolParamInt( int nType, int nVal)
|
||||
@@ -339,7 +346,20 @@ __stdcall EgtTdbSetCurrToolParamDouble( int nType, double dVal)
|
||||
BOOL
|
||||
__stdcall EgtTdbSetCurrToolParamString( int nType, const wchar_t* wsVal)
|
||||
{
|
||||
return ( ExeTdbSetCurrToolParam( nType, wstrztoA( wsVal)) ? TRUE : FALSE) ;
|
||||
return ( ExeTdbSetCurrToolParam( nType, string( wstrztoA( wsVal))) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtTdbGetCurrToolParamBool( int nType, BOOL* pbVal)
|
||||
{
|
||||
if ( pbVal == nullptr)
|
||||
return FALSE ;
|
||||
bool bVal ;
|
||||
if ( ! ExeTdbGetCurrToolParam( nType, bVal))
|
||||
return FALSE ;
|
||||
*pbVal = ( bVal ? TRUE : FALSE) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -406,6 +426,181 @@ __stdcall EgtTdbGetToolHolderDir( wchar_t*& wsTHolderDir)
|
||||
return (( wsTHolderDir == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Machiningss DataBase
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetMachiningNewName( const wchar_t* wsName, wchar_t*& wsNewName)
|
||||
{
|
||||
if ( &wsNewName == nullptr)
|
||||
return FALSE ;
|
||||
string sNewName = wstrztoA( wsName) ;
|
||||
if ( ! ExeMdbGetMachiningNewName( sNewName))
|
||||
return FALSE ;
|
||||
wsNewName = _wcsdup( stringtoW( sNewName)) ;
|
||||
return (( wsNewName == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbAddMachining( const wchar_t* wsName, int nType)
|
||||
{
|
||||
return ( ExeMdbAddMachining( wstrztoA( wsName), nType) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbCopyMachining( const wchar_t* wsSource, const wchar_t* wsName)
|
||||
{
|
||||
return ( ExeMdbCopyMachining( wstrztoA( wsSource), wstrztoA( wsName)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbRemoveMachining( const wchar_t* wsName)
|
||||
{
|
||||
return ( ExeMdbRemoveMachining( wstrztoA( wsName)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetFirstMachining( int nType, wchar_t*& wsName)
|
||||
{
|
||||
if ( &wsName == nullptr)
|
||||
return FALSE ;
|
||||
string sName ;
|
||||
if ( ! ExeMdbGetFirstMachining( nType, sName))
|
||||
return FALSE ;
|
||||
wsName = _wcsdup( stringtoW( sName)) ;
|
||||
return (( wsName == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetNextMachining( int nType, wchar_t*& wsName)
|
||||
{
|
||||
if ( &wsName == nullptr)
|
||||
return FALSE ;
|
||||
string sName ;
|
||||
if ( ! ExeMdbGetNextMachining( nType, sName))
|
||||
return FALSE ;
|
||||
wsName = _wcsdup( stringtoW( sName)) ;
|
||||
return (( wsName == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSetCurrMachining( const wchar_t* wsName)
|
||||
{
|
||||
return ( ExeMdbSetCurrMachining( wstrztoA( wsName)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSaveCurrMachining( void)
|
||||
{
|
||||
return ( ExeMdbSaveCurrMachining() ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbIsCurrMachiningModified( void)
|
||||
{
|
||||
return ( ExeMdbIsCurrMachiningModified() ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSetCurrMachiningParamBool( int nType, BOOL bVal)
|
||||
{
|
||||
return ( ExeMdbSetCurrMachiningParam( nType, ( bVal != FALSE)) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSetCurrMachiningParamInt( int nType, int nVal)
|
||||
{
|
||||
return ( ExeMdbSetCurrMachiningParam( nType, nVal) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSetCurrMachiningParamDouble( int nType, double dVal)
|
||||
{
|
||||
return ( ExeMdbSetCurrMachiningParam( nType, dVal) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSetCurrMachiningParamString( int nType, const wchar_t* wsVal)
|
||||
{
|
||||
return ( ExeMdbSetCurrMachiningParam( nType, string( wstrztoA( wsVal))) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetCurrMachiningParamBool( int nType, BOOL* pbVal)
|
||||
{
|
||||
if ( pbVal == nullptr)
|
||||
return FALSE ;
|
||||
bool bVal ;
|
||||
if ( ! ExeMdbGetCurrMachiningParam( nType, bVal))
|
||||
return FALSE ;
|
||||
*pbVal = ( bVal ? TRUE : FALSE) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetCurrMachiningParamInt( int nType, int* pnVal)
|
||||
{
|
||||
if ( pnVal == nullptr)
|
||||
return FALSE ;
|
||||
return ( ExeMdbGetCurrMachiningParam( nType, *pnVal) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetCurrMachiningParamDouble( int nType, double* pdVal)
|
||||
{
|
||||
if ( pdVal == nullptr)
|
||||
return FALSE ;
|
||||
return ( ExeMdbGetCurrMachiningParam( nType, *pdVal) ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetCurrMachiningParamString( int nType, wchar_t*& wsVal)
|
||||
{
|
||||
if ( &wsVal == nullptr)
|
||||
return FALSE ;
|
||||
string sVal ;
|
||||
if ( ! ExeMdbGetCurrMachiningParam( nType, sVal))
|
||||
return FALSE ;
|
||||
wsVal = _wcsdup( stringtoW( sVal)) ;
|
||||
return (( wsVal == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbSave( void)
|
||||
{
|
||||
return ( ExeMdbSave() ? TRUE : FALSE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtMdbGetMachiningDir( wchar_t*& wsMchDir)
|
||||
{
|
||||
if ( &wsMchDir == nullptr)
|
||||
return FALSE ;
|
||||
string sMchDir ;
|
||||
if ( ! ExeTdbGetToolDir( sMchDir))
|
||||
return FALSE ;
|
||||
wsMchDir = _wcsdup( stringtoW( sMchDir)) ;
|
||||
return (( wsMchDir == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Simulation
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user