265e661626
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunto controllo del producer sul cd in modo da fare apparire/scomparire l'installatore della teleassistenza git-svn-id: svn://10.65.10.50/trunk@17714 c028cbd2-c16b-5b4b-a496-9718f37d4682
62 lines
2.0 KiB
C++
Executable File
62 lines
2.0 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);
|
|
};
|
|
|
|
//progind
|
|
class CampoProgressDialog : public wxProgressDialog
|
|
{
|
|
public:
|
|
CampoProgressDialog(const wxString& strTitle, int nMaximum = 100, wxWindow* pParent = NULL);
|
|
};
|
|
|
|
//metodi generici
|
|
//finestre messaggio,errore,ecc...
|
|
bool ErrorBox(const wxString str);
|
|
bool WarningBox(const wxString str);
|
|
bool YesNoBox(const wxString str);
|
|
|
|
//trattamento files
|
|
void CheckAndMakeDir(const wxString& strDir, const wxString& strMsg);
|
|
bool UnzipFile(const char* strZipFile, const char* strDestdir);
|
|
bool CopiaFile(const wxString& file1, const wxString& file2);
|
|
|
|
//interfaccia con windows
|
|
wxString GetWindowsProgramDirectory();
|
|
int GetSessionId();
|
|
|
|
size_t ListNetworkDisks(wxArrayString& asList);
|
|
size_t ListSharedDirectories(wxArrayString& asList);
|
|
bool IsSharedDirectory (const wxString& strDir);
|
|
|
|
|
|
//cerca il producer del cd
|
|
bool IsAgaVersion(const wxString& strIniPath = wxEmptyString);
|
|
|
|
#endif |