f81a2f7e8e
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/trunk@15829 c028cbd2-c16b-5b4b-a496-9718f37d4682
57 lines
1.9 KiB
C++
Executable File
57 lines
1.9 KiB
C++
Executable File
#ifndef __UTILS_H
|
|
#define __UTILS_H
|
|
|
|
// lista dei tipi di installazione 0=non si sa, 1=standalone, 2=server, 3=client
|
|
enum InstallationType { it_none, it_standalone, it_server, it_client, it_upgrade = 9 };
|
|
|
|
enum LurchMode {lm_none, lm_service, lm_autostart};
|
|
////////////////////////////////////////////////////////////////////////////////////////////
|
|
//Classe per la gestione dei files di configurazione tipo campo.ini
|
|
class CampoIniFile : public wxObject
|
|
{
|
|
wxString m_strIniName, m_strGroup;
|
|
wxArrayString m_asGroups, m_asEntries;
|
|
|
|
public:
|
|
bool GetFirstGroup(wxString& strGroup, long& nIndex);
|
|
bool GetNextGroup(wxString& strGroup, long& nIndex);
|
|
bool DeleteGroup(const wxString strGroup);
|
|
bool GetFirstEntry(wxString& strEntry, long& nIndex);
|
|
bool GetNextEntry(wxString& strEntry, long& nIndex);
|
|
|
|
wxString Get(const wxString strVariable) const;
|
|
bool GetBool(const wxString strVariable) const;
|
|
int GetInt (const wxString strVariable) const;
|
|
bool Set(const wxString strVariable, const wxString strValue);
|
|
InstallationType GetInstallationType() const;
|
|
bool Set(const wxString strVariable, const int uValue);
|
|
|
|
CampoIniFile(const wxString strIniPath, wxString strGroup);
|
|
};
|
|
/*
|
|
class CampoIniFile : public wxFileConfig
|
|
{
|
|
protected:
|
|
public:
|
|
wxString Get(const wxString strVariable) const;
|
|
bool GetBool(const wxString strVariable) const;
|
|
int GetInt (const wxString strVariable) const;
|
|
bool Set(const wxString strVariable, const wxString strValue);
|
|
InstallationType GetInstallationType() const;
|
|
bool Set(const wxString strVariable, const int uValue);
|
|
|
|
CampoIniFile(const wxString strIniPath, wxString strValue);
|
|
};
|
|
*/
|
|
|
|
|
|
bool ErrorBox(const wxString str);
|
|
bool WarningBox(const wxString str);
|
|
|
|
void CheckAndMakeDir(const wxString& strDir, const wxString& strMsg);
|
|
bool UnzipFile(const char* strZipFile, const char* strDestdir);
|
|
|
|
wxString GetWindowsProgramDirectory();
|
|
int GetSessionId();
|
|
|
|
#endif |