Patch level :4.0 setup

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :link sul desktop


git-svn-id: svn://10.65.10.50/trunk@15549 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-08-08 10:08:54 +00:00
parent c6877b531f
commit 7877dfa8db

View File

@ -334,6 +334,7 @@ public:
wxString Get(wxWindowID id) const;
bool GetBool(wxWindowID id) const;
bool Set(wxWindowID id, const wxString& str);
bool Set(wxWindowID id, const bool bul);
int GetSelection(wxWindowID id) const;
CampoWizardPage(wxWizard* parent);
@ -359,6 +360,14 @@ bool CampoWizardPage::Set(wxWindowID id, const wxString& str)
return (pWnd != NULL);
}
bool CampoWizardPage::Set(wxWindowID id, const bool bul)
{
wxCheckBox* pWnd = (wxCheckBox*)FindWindowById(id);
if (pWnd)
pWnd->SetValue(bul);
return (pWnd != NULL);
}
int CampoWizardPage::GetSelection(wxWindowID id) const
{
int n = -1;
@ -519,10 +528,12 @@ bool CampoWizardPage2::ForwardValidate()
GetWizard().SetDestinationPath(strPrgPath); //va alla pagina riassuntiva
GetWizard().SetPrgLocPath(strPrgPath); //questo serve solo per la creazione del link sul desktop!
GetWizard().SetInstallationType(3); //e' un aggiornamento!!
GetWizard().SetDesktopShortcut(false);
}
else //resetta il path in caso si scelga nuova installazione dopo aver scelto aggiornamento
{
GetWizard().SetDestinationPath("");
GetWizard().SetDesktopShortcut(true);
}
@ -1444,10 +1455,56 @@ CampoWizardPage8::CampoWizardPage8(wxWizard* parent) : CampoWizardPage(parent)
gbsSizer->Add(tcDiction, wxGBPosition(4, 2));
}
/**********************************************************************************************************/
// 9 pagina con la selezione di destinazione
// 9 pagina con la creazione icona sul desktop
/**********************************************************************************************************/
class CampoWizardPage9 : public CampoWizardPage
{
protected:
virtual bool TransferDataToWindow();
virtual bool ForwardValidate();
public:
CampoWizardPage9(wxWizard* parent);
};
bool CampoWizardPage9::TransferDataToWindow()
{
return Set(901, GetWizard().GetDesktopShortcut());
}
bool CampoWizardPage9::ForwardValidate()
{
const bool bDesktopShortcut = GetBool(901);
GetWizard().SetDesktopShortcut(bDesktopShortcut);
return true;
}
CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
{
wxString strTitle = wxT("Collegamenti");
wxString strBody;
strBody += wxT("E' possibile creare l'icona di APPNAME sul desktop ");
//strBody += wxT("ed associare l'estensione <b>.caz<b> al programma.");
SetHTMLText(strTitle, strBody);
wxCheckBox* pIcon = new wxCheckBox(this, 901, wxT("Creare l'icona sul desktop"));
GetSizer()->Add(pIcon, 0, wxALL, 0);
GetSizer()->AddSpacer(5);
//wxCheckBox* pLink = new wxCheckBox(this, 1002, wxT("Associare i file .caz al programma"));
//pLink->SetValue(true);
//GetSizer()->Add(pLink, 0, wxALL, 0);
}
/**********************************************************************************************************/
// 10 pagina con la selezione di destinazione
/**********************************************************************************************************/
class CampoWizardPage10 : public CampoWizardPage
{
unsigned int _uInstallType;
wxString _strInstallType;
@ -1457,15 +1514,16 @@ class CampoWizardPage9 : public CampoWizardPage
wxString _strSrvAuth;
wxString _strSrvDict;
bool _bInstDemoData;
bool _bDesktopShortcut;
protected:
virtual bool TransferDataToWindow();
public:
CampoWizardPage9(wxWizard* parent);
CampoWizardPage10(wxWizard* parent);
};
bool CampoWizardPage9::TransferDataToWindow()
bool CampoWizardPage10::TransferDataToWindow()
{
CampoWizard& cw = GetWizard();
@ -1501,6 +1559,8 @@ bool CampoWizardPage9::TransferDataToWindow()
_bInstDemoData = cw.GetInstDemoData();
break;
}
//questo vale per tutti
_bDesktopShortcut = cw.GetDesktopShortcut();
//se installazione o aggiornamento cambia sia il titolo che i contenuti
wxString strTitle;
@ -1547,47 +1607,20 @@ bool CampoWizardPage9::TransferDataToWindow()
if (_uInstallType == 0 && _bInstDemoData)
strBody += wxT("<p>Installazione area dati dimostrativa</p>");
if (_bDesktopShortcut)
strBody += wxT("<p>Creazione dellicona sul desktop</p>");
SetHTMLText(strTitle, strBody);
return true;
}
CampoWizardPage9::CampoWizardPage9(wxWizard* parent) : CampoWizardPage(parent)
{
}
/**********************************************************************************************************/
// 10 pagina con la creazione icona sul desktop
/**********************************************************************************************************/
class CampoWizardPage10 : public CampoWizardPage
{
public:
CampoWizardPage10(wxWizard* parent);
};
CampoWizardPage10::CampoWizardPage10(wxWizard* parent) : CampoWizardPage(parent)
{
wxString strTitle = wxT("Collegamenti");
wxString strBody;
strBody += wxT("E' possibile creare l'icona di APPNAME sul desktop ");
//strBody += wxT("ed associare l'estensione <b>.caz<b> al programma.");
SetHTMLText(strTitle, strBody);
wxCheckBox* pIcon = new wxCheckBox(this, 1001, wxT("Creare l'icona sul desktop"));
pIcon->SetValue(true);
GetSizer()->Add(pIcon, 0, wxALL, 0);
GetSizer()->AddSpacer(5);
//wxCheckBox* pLink = new wxCheckBox(this, 1002, wxT("Associare i file .caz al programma"));
//pLink->SetValue(true);
//GetSizer()->Add(pLink, 0, wxALL, 0);
}
///////////////////////////////////////////////////////////
// CampoWizard
///////////////////////////////////////////////////////////
@ -1776,9 +1809,10 @@ const bool CampoWizard::GetDesktopShortcut() const
CampoWizard::CampoWizard(wxWindow* pParent)
{
//resettatore dei booleans (che senno' prendono valore casuale ad ogni esecuzione)
_bInstDemoData = false; //installa dati dimostrativi
_bInstDemoData = false; //installa dati dimostrativi
_bInstUseAuth = false; //installa/usa server authoriz
_bInstUseDict = false; //installa/usa server diction
_bDesktopShortcut = false; //creazione link sul desktop
wxBitmap bitmap;
wxString strName = wxT("logo.gif");
@ -1794,8 +1828,8 @@ CampoWizard::CampoWizard(wxWindow* pParent)
m_pPage[5] = new CampoWizardPage6(this); //installazione standard
m_pPage[6] = new CampoWizardPage7(this); //installazione server
m_pPage[7] = new CampoWizardPage8(this); //installazione client
m_pPage[8] = new CampoWizardPage9(this); //riassuntino installazione
m_pPage[9] = new CampoWizardPage10(this); //creazione icona sul desktop e in start/programmi/campo
m_pPage[8] = new CampoWizardPage9(this); //creazione icona sul desktop e in start/programmi/campo
m_pPage[9] = new CampoWizardPage10(this); //riassuntino installazione
for (int p = 1; p < m_nPages; p++)