Patch level :4.0 nopatch
Files correlati : Ricompilazione Demo : [ ] Commento :iniziata installazione standard git-svn-id: svn://10.65.10.50/trunk@15516 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
607d517521
commit
ff8ef41194
@ -1,8 +1,12 @@
|
||||
//Il sorgente va scritto in notazione ungherese.
|
||||
//Le variabili seguono la seguente regola: 'acronimo tipo'+'nome variabile cammellata'
|
||||
//Es. wxArrayString 'as' + 'AcceptRefuse' -> asAcceptRefuse
|
||||
#include "wxinc.h"
|
||||
|
||||
#include <wx/dir.h>
|
||||
#include <wx/fileconf.h>
|
||||
#include <wx/filepicker.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/html/htmlwin.h>
|
||||
#include <wx/mimetype.h>
|
||||
#include <wx/radiobox.h>
|
||||
@ -20,6 +24,9 @@ extern "C"
|
||||
#include "../xvaga/skeylink.h"
|
||||
}
|
||||
|
||||
#define HGAP 4
|
||||
#define VGAP 2
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Utilities
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -232,6 +239,7 @@ public:
|
||||
CampoWizard(wxWindow* pParent);
|
||||
};
|
||||
|
||||
//Campo wizard page (pagina generica del programma, di cui saranno figlie le singole pagine)
|
||||
class CampoWizardPage : public wxWizardPageSimple
|
||||
{
|
||||
wxHtmlWindow* m_pText;
|
||||
@ -240,6 +248,8 @@ protected:
|
||||
CampoWizard& GetWizard() const {return *(CampoWizard*)GetParent();}
|
||||
void SetHTMLText(const wxString strTitle, const wxString strBody);
|
||||
void SetHTMLPage(const wxString strFile);
|
||||
void AddLabel(wxSizer* pSizer, const wxChar* label);
|
||||
void AddLabel(wxGridBagSizer* pSizer, const wxChar* label, unsigned int row, unsigned int column);
|
||||
|
||||
public:
|
||||
wxString Get(wxWindowID id) const;
|
||||
@ -297,6 +307,17 @@ void CampoWizardPage::SetHTMLText(wxString strTitle, wxString strBody)
|
||||
m_pText->SetPage(str);
|
||||
}
|
||||
|
||||
//metodo per aggiungere i prompt agli oggetti contenuti nelle GridSize e similia
|
||||
void CampoWizardPage::AddLabel(wxSizer* pSizer, const wxChar* label)
|
||||
{
|
||||
pSizer->Add(new wxStaticText(this, wxID_ANY, label), 0, wxALL|wxALIGN_CENTER_VERTICAL);
|
||||
}
|
||||
|
||||
void CampoWizardPage::AddLabel(wxGridBagSizer* pSizer, const wxChar* label, unsigned int row, unsigned int column)
|
||||
{
|
||||
pSizer->Add(new wxStaticText(this, wxID_ANY, label), wxGBPosition(row, column));
|
||||
}
|
||||
|
||||
//costruttore della finestra standard
|
||||
CampoWizardPage::CampoWizardPage(wxWizard* parent)
|
||||
: wxWizardPageSimple(parent)
|
||||
@ -828,15 +849,71 @@ CampoWizardPage5::CampoWizardPage5(wxWizard* parent) : CampoWizardPage(parent)
|
||||
class CampoWizardPage6 : public CampoWizardPage
|
||||
{
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE();
|
||||
void OnDirPick(wxCommandEvent& e);
|
||||
|
||||
public:
|
||||
CampoWizardPage6(wxWizard* parent);
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(CampoWizardPage6, CampoWizardPage)
|
||||
EVT_BUTTON(602, OnDirPick)
|
||||
EVT_BUTTON(604, OnDirPick)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
void CampoWizardPage6::OnDirPick(wxCommandEvent& e)
|
||||
{
|
||||
const wxWindowID wiTargetField = e.GetId() - 1;
|
||||
wxString strPath = Get(wiTargetField);
|
||||
wxDirDialog dlg(this, wxDirSelectorPromptStr, strPath,
|
||||
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
|
||||
if (dlg.ShowModal() == wxID_OK)
|
||||
{
|
||||
strPath = dlg.GetPath();
|
||||
Set(wiTargetField, strPath);
|
||||
}
|
||||
}
|
||||
|
||||
CampoWizardPage6::CampoWizardPage6(wxWizard* parent) : CampoWizardPage(parent)
|
||||
{
|
||||
wxString strTitle = wxT("Installazione di tipo Standard");
|
||||
wxString strBody = wxT("Pagina 6. Installazione Standard");
|
||||
wxString strBody = wxT("<p>Digitare nel campo <b>'Cartella programma'</b> il percorso completo della cartella dove si desidera installare il programma. ");
|
||||
strBody += wxT("Il percorso di default (consigliato) e' <i>C:\\Campo32</i> </p>");
|
||||
strBody += wxT("<p>Digitare nel campo <b>'Cartella Dati'</b> il percorso completo della cartella dove si desidera installare l'area dati. ");
|
||||
strBody += wxT("Il percorso di default (consigliato) e' <i>C:\\Campo32\\dati</i> </p>");
|
||||
SetHTMLText(strTitle, strBody);
|
||||
|
||||
//griglia per sistemare i campi
|
||||
wxGridBagSizer* gbsSizer = new wxGridBagSizer(VGAP, HGAP);
|
||||
GetSizer()->Add(gbsSizer);
|
||||
|
||||
//prima riga della griglia
|
||||
//prompt
|
||||
AddLabel(gbsSizer, "Cartella programmi", 0, 0);
|
||||
//campo testo
|
||||
wxString strPath;
|
||||
strPath = "C:\\";
|
||||
strPath += APPNAME;
|
||||
wxTextCtrl* tcPrgPath = new wxTextCtrl(this, 601, strPath,
|
||||
wxDefaultPosition, wxSize(320,-1), wxTE_READONLY);
|
||||
gbsSizer->Add(tcPrgPath, wxGBPosition(0, 1));
|
||||
//bottone 'sfoglia'
|
||||
wxButton* bPrgButton = new wxButton(this, 602, wxT("Sfoglia"), wxDefaultPosition, wxSize(48, -1));
|
||||
gbsSizer->Add(bPrgButton, wxGBPosition(0, 2));
|
||||
|
||||
//seconda riga della griglia
|
||||
//prompt
|
||||
AddLabel(gbsSizer, "Cartella dati", 1, 0);
|
||||
//campo testo
|
||||
strPath += "\\dati";
|
||||
wxTextCtrl* tcDataPath = new wxTextCtrl(this, 603, strPath,
|
||||
wxDefaultPosition, wxSize(320,-1), wxTE_READONLY);
|
||||
gbsSizer->Add(tcDataPath, wxGBPosition(1, 1));
|
||||
//bottone 'sfoglia'
|
||||
wxButton* bDataButton = new wxButton(this, 604, wxT("Sfoglia"), wxDefaultPosition, wxSize(48, -1));
|
||||
gbsSizer->Add(bDataButton, wxGBPosition(1, 2));
|
||||
}
|
||||
|
||||
/**********************************************************************************************************/
|
||||
// 7 Installazione server
|
||||
/**********************************************************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user