2005-09-26 11:29:28 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2005 University of California
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
//
|
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma implementation "WelcomePage.h"
|
|
|
|
#endif
|
|
|
|
|
2007-01-05 00:24:54 +00:00
|
|
|
//#define __WIZ_DEBUG__
|
|
|
|
|
2005-09-26 11:29:28 +00:00
|
|
|
#include "stdwx.h"
|
2006-10-20 15:00:14 +00:00
|
|
|
#include "diagnostics.h"
|
|
|
|
#include "util.h"
|
|
|
|
#include "mfile.h"
|
|
|
|
#include "miofile.h"
|
|
|
|
#include "parse.h"
|
|
|
|
#include "error_numbers.h"
|
2005-09-26 11:29:28 +00:00
|
|
|
#include "wizardex.h"
|
|
|
|
#include "error_numbers.h"
|
|
|
|
#include "BOINCGUIApp.h"
|
2006-10-20 15:00:14 +00:00
|
|
|
#include "SkinManager.h"
|
|
|
|
#include "MainDocument.h"
|
2005-09-26 11:29:28 +00:00
|
|
|
#include "BOINCWizards.h"
|
|
|
|
#include "BOINCBaseWizard.h"
|
2006-02-16 19:03:02 +00:00
|
|
|
#include "WizardAttachProject.h"
|
|
|
|
#include "WizardAccountManager.h"
|
2005-09-26 11:29:28 +00:00
|
|
|
#include "WelcomePage.h"
|
|
|
|
|
|
|
|
////@begin XPM images
|
|
|
|
////@end XPM images
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* CWelcomePage type definition
|
|
|
|
*/
|
|
|
|
|
|
|
|
IMPLEMENT_DYNAMIC_CLASS( CWelcomePage, wxWizardPageEx )
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* CWelcomePage event table definition
|
|
|
|
*/
|
|
|
|
|
|
|
|
BEGIN_EVENT_TABLE( CWelcomePage, wxWizardPageEx )
|
|
|
|
|
|
|
|
////@begin CWelcomePage event table entries
|
|
|
|
EVT_WIZARDEX_PAGE_CHANGED( -1, CWelcomePage::OnPageChanged )
|
|
|
|
EVT_WIZARDEX_PAGE_CHANGING( -1, CWelcomePage::OnPageChanging )
|
|
|
|
EVT_WIZARDEX_CANCEL( -1, CWelcomePage::OnCancel )
|
2007-03-09 23:44:34 +00:00
|
|
|
EVT_SET_FOCUS( CWelcomePage::OnSetFocus )
|
|
|
|
EVT_SHOW( CWelcomePage::OnShow )
|
2005-09-26 11:29:28 +00:00
|
|
|
////@end CWelcomePage event table entries
|
|
|
|
|
|
|
|
END_EVENT_TABLE()
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* CWelcomePage constructors
|
|
|
|
*/
|
|
|
|
|
|
|
|
CWelcomePage::CWelcomePage( )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
CWelcomePage::CWelcomePage( CBOINCBaseWizard* parent )
|
|
|
|
{
|
|
|
|
Create( parent );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* WizardPage creator
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool CWelcomePage::Create( CBOINCBaseWizard* parent )
|
|
|
|
{
|
|
|
|
|
|
|
|
////@begin CWelcomePage member initialisation
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pTitleStaticCtrl = NULL;
|
|
|
|
m_pDescriptionStaticCtrl = NULL;
|
|
|
|
m_pDirectionsStaticCtrl = NULL;
|
2007-01-05 00:24:54 +00:00
|
|
|
#if defined(__WIZ_DEBUG__)
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pErrDescriptionCtrl = NULL;
|
|
|
|
m_pErrProjectPropertiesCtrl = NULL;
|
|
|
|
m_pErrProjectCommCtrl = NULL;
|
|
|
|
m_pErrProjectPropertiesURLCtrl = NULL;
|
|
|
|
m_pErrAccountCreationDisabledCtrl = NULL;
|
|
|
|
m_pErrClientAccountCreationDisabledCtrl = NULL;
|
|
|
|
m_pErrAccountAlreadyExistsCtrl = NULL;
|
|
|
|
m_pErrProjectAlreadyAttachedCtrl = NULL;
|
|
|
|
m_pErrProjectAttachFailureCtrl = NULL;
|
|
|
|
m_pErrGoogleCommCtrl = NULL;
|
|
|
|
m_pErrYahooCommCtrl = NULL;
|
|
|
|
m_pErrNetDetectionCtrl = NULL;
|
2005-09-26 11:29:28 +00:00
|
|
|
#endif
|
|
|
|
////@end CWelcomePage member initialisation
|
|
|
|
|
|
|
|
////@begin CWelcomePage creation
|
2006-01-25 11:58:02 +00:00
|
|
|
wxBitmap wizardBitmap(wxNullBitmap);
|
2007-03-09 23:44:34 +00:00
|
|
|
wxWizardPageEx::Create( parent, ID_WELCOMEPAGE, wizardBitmap );
|
2005-09-26 11:29:28 +00:00
|
|
|
|
|
|
|
CreateControls();
|
|
|
|
GetSizer()->Fit(this);
|
|
|
|
////@end CWelcomePage creation
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Control creation for WizardPage
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CWelcomePage::CreateControls()
|
|
|
|
{
|
|
|
|
////@begin CWelcomePage content construction
|
|
|
|
CWelcomePage* itemWizardPage2 = this;
|
|
|
|
|
|
|
|
wxBoxSizer* itemBoxSizer3 = new wxBoxSizer(wxVERTICAL);
|
|
|
|
itemWizardPage2->SetSizer(itemBoxSizer3);
|
|
|
|
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pTitleStaticCtrl = new wxStaticText;
|
|
|
|
m_pTitleStaticCtrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxSize(355,24), 0 );
|
|
|
|
m_pTitleStaticCtrl->SetFont(wxFont(12, wxSWISS, wxNORMAL, wxBOLD, FALSE, _T("Verdana")));
|
|
|
|
itemBoxSizer3->Add(m_pTitleStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
|
2005-09-26 11:29:28 +00:00
|
|
|
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pDescriptionStaticCtrl = new wxStaticText;
|
|
|
|
m_pDescriptionStaticCtrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
itemBoxSizer3->Add(m_pDescriptionStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
|
2005-09-26 11:29:28 +00:00
|
|
|
|
|
|
|
itemBoxSizer3->Add(5, 5, 0, wxALIGN_LEFT|wxALL, 5);
|
|
|
|
|
2007-01-05 00:24:54 +00:00
|
|
|
#if defined(__WIZ_DEBUG__)
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pErrDescriptionCtrl = new wxStaticBox(itemWizardPage2, wxID_ANY, wxEmptyString);
|
|
|
|
wxStaticBoxSizer* itemStaticBoxSizer7 = new wxStaticBoxSizer(m_pErrDescriptionCtrl, wxVERTICAL);
|
2005-09-26 11:29:28 +00:00
|
|
|
itemBoxSizer3->Add(itemStaticBoxSizer7, 0, wxGROW|wxALL, 5);
|
|
|
|
|
|
|
|
wxFlexGridSizer* itemFlexGridSizer8 = new wxFlexGridSizer(-1, 2, 0, 0);
|
|
|
|
itemFlexGridSizer8->AddGrowableCol(0);
|
|
|
|
itemFlexGridSizer8->AddGrowableCol(1);
|
|
|
|
itemStaticBoxSizer7->Add(itemFlexGridSizer8, 0, wxGROW|wxALL, 5);
|
|
|
|
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pErrProjectPropertiesCtrl = new wxCheckBox;
|
|
|
|
m_pErrProjectPropertiesCtrl->Create( itemWizardPage2, ID_ERRPROJECTPROPERTIES, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrProjectPropertiesCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrProjectPropertiesCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrProjectCommCtrl = new wxCheckBox;
|
|
|
|
m_pErrProjectCommCtrl->Create( itemWizardPage2, ID_ERRPROJECTCOMM, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrProjectCommCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrProjectCommCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrProjectPropertiesURLCtrl = new wxCheckBox;
|
|
|
|
m_pErrProjectPropertiesURLCtrl->Create( itemWizardPage2, ID_ERRPROJECTPROPERTIESURL, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrProjectPropertiesURLCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrProjectPropertiesURLCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrAccountCreationDisabledCtrl = new wxCheckBox;
|
|
|
|
m_pErrAccountCreationDisabledCtrl->Create( itemWizardPage2, ID_ERRACCOUNTCREATIONDISABLED, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrAccountCreationDisabledCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrAccountCreationDisabledCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrClientAccountCreationDisabledCtrl = new wxCheckBox;
|
|
|
|
m_pErrClientAccountCreationDisabledCtrl->Create( itemWizardPage2, ID_ERRCLIENTACCOUNTCREATIONDISABLED, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrClientAccountCreationDisabledCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrClientAccountCreationDisabledCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrAccountAlreadyExistsCtrl = new wxCheckBox;
|
|
|
|
m_pErrAccountAlreadyExistsCtrl->Create( itemWizardPage2, ID_ERRACCOUNTALREADYEXISTS, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrAccountAlreadyExistsCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrAccountAlreadyExistsCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrProjectAlreadyAttachedCtrl = new wxCheckBox;
|
|
|
|
m_pErrProjectAlreadyAttachedCtrl->Create( itemWizardPage2, ID_ERRPROJECTALREADYATTACHED, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrProjectAlreadyAttachedCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrProjectAlreadyAttachedCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrProjectAttachFailureCtrl = new wxCheckBox;
|
|
|
|
m_pErrProjectAttachFailureCtrl->Create( itemWizardPage2, ID_ERRPROJECTATTACHFAILURE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrProjectAttachFailureCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrProjectAttachFailureCtrl, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
|
|
|
m_pErrGoogleCommCtrl = new wxCheckBox;
|
|
|
|
m_pErrGoogleCommCtrl->Create( itemWizardPage2, ID_ERRGOOGLECOMM, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrGoogleCommCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrGoogleCommCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
2005-09-26 11:29:28 +00:00
|
|
|
|
|
|
|
itemFlexGridSizer8->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
|
|
|
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pErrYahooCommCtrl = new wxCheckBox;
|
|
|
|
m_pErrYahooCommCtrl->Create( itemWizardPage2, ID_ERRYAHOOCOMM, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrYahooCommCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrYahooCommCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
2005-09-26 11:29:28 +00:00
|
|
|
|
|
|
|
itemFlexGridSizer8->Add(5, 5, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
|
|
|
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pErrNetDetectionCtrl = new wxCheckBox;
|
|
|
|
m_pErrNetDetectionCtrl->Create( itemWizardPage2, ID_ERRNETDETECTION, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
|
|
|
|
m_pErrNetDetectionCtrl->SetValue(FALSE);
|
|
|
|
itemFlexGridSizer8->Add(m_pErrNetDetectionCtrl, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 0);
|
2005-09-26 11:29:28 +00:00
|
|
|
#endif
|
|
|
|
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pDirectionsStaticCtrl = new wxStaticText;
|
|
|
|
m_pDirectionsStaticCtrl->Create( itemWizardPage2, wxID_STATIC, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
itemBoxSizer3->Add(m_pDirectionsStaticCtrl, 0, wxALIGN_LEFT|wxALL, 5);
|
2005-09-26 11:29:28 +00:00
|
|
|
|
2007-03-09 23:44:34 +00:00
|
|
|
itemWizardPage2->SetSizer(itemBoxSizer3);
|
|
|
|
|
2005-09-26 11:29:28 +00:00
|
|
|
////@end CWelcomePage content construction
|
|
|
|
}
|
2006-01-25 11:58:02 +00:00
|
|
|
|
2005-09-26 11:29:28 +00:00
|
|
|
/*!
|
|
|
|
* Gets the previous page.
|
|
|
|
*/
|
|
|
|
|
|
|
|
wxWizardPageEx* CWelcomePage::GetPrev() const
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Gets the next page.
|
|
|
|
*/
|
|
|
|
|
|
|
|
wxWizardPageEx* CWelcomePage::GetNext() const
|
|
|
|
{
|
|
|
|
if (CHECK_CLOSINGINPROGRESS()) {
|
|
|
|
// Cancel Event Detected
|
|
|
|
return PAGE_TRANSITION_NEXT(ID_COMPLETIONERRORPAGE);
|
|
|
|
} else if (IS_ATTACHTOPROJECTWIZARD()) {
|
|
|
|
return PAGE_TRANSITION_NEXT(ID_PROJECTINFOPAGE);
|
2006-02-16 19:03:02 +00:00
|
|
|
} else if (IS_ACCOUNTMANAGERUPDATEWIZARD() || IS_ACCOUNTMANAGERREMOVEWIZARD()) {
|
|
|
|
return PAGE_TRANSITION_NEXT(ID_ACCOUNTMANAGERPROCESSINGPAGE);
|
2006-01-27 00:34:53 +00:00
|
|
|
} else if (IS_ACCOUNTMANAGERWIZARD()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
return PAGE_TRANSITION_NEXT(ID_ACCOUNTMANAGERINFOPAGE);
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Should we show tooltips?
|
|
|
|
*/
|
|
|
|
|
|
|
|
bool CWelcomePage::ShowToolTips()
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Get bitmap resources
|
|
|
|
*/
|
|
|
|
|
2006-07-21 08:23:26 +00:00
|
|
|
wxBitmap CWelcomePage::GetBitmapResource( const wxString& WXUNUSED(name) )
|
2005-09-26 11:29:28 +00:00
|
|
|
{
|
|
|
|
// Bitmap retrieval
|
|
|
|
////@begin CWelcomePage bitmap retrieval
|
|
|
|
return wxNullBitmap;
|
|
|
|
////@end CWelcomePage bitmap retrieval
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Get icon resources
|
|
|
|
*/
|
|
|
|
|
2006-07-21 08:23:26 +00:00
|
|
|
wxIcon CWelcomePage::GetIconResource( const wxString& WXUNUSED(name) )
|
2005-09-26 11:29:28 +00:00
|
|
|
{
|
|
|
|
// Icon retrieval
|
|
|
|
////@begin CWelcomePage icon retrieval
|
|
|
|
return wxNullIcon;
|
|
|
|
////@end CWelcomePage icon retrieval
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_WIZARD_PAGE_CHANGED event handler for ID_WELCOMEPAGE
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CWelcomePage::OnPageChanged( wxWizardExEvent& event ) {
|
2007-03-09 23:44:34 +00:00
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnPageChanged - Function Begin"));
|
2006-01-27 00:34:53 +00:00
|
|
|
if (event.GetDirection() == false) return;
|
|
|
|
|
2007-08-02 20:03:21 +00:00
|
|
|
CMainDocument* pDoc = wxGetApp().GetDocument();
|
2006-02-16 19:03:02 +00:00
|
|
|
CWizardAccountManager* pWAM = ((CWizardAccountManager*)GetParent());
|
2007-08-02 20:03:21 +00:00
|
|
|
ACCT_MGR_INFO ami;
|
|
|
|
bool is_acct_mgr_detected = false;
|
|
|
|
wxString strBuffer = wxEmptyString;
|
2006-02-16 19:03:02 +00:00
|
|
|
|
|
|
|
|
2007-08-02 20:03:21 +00:00
|
|
|
wxASSERT(pDoc);
|
|
|
|
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
|
2006-01-27 00:34:53 +00:00
|
|
|
wxASSERT(m_pTitleStaticCtrl);
|
|
|
|
wxASSERT(m_pDescriptionStaticCtrl);
|
|
|
|
wxASSERT(m_pDirectionsStaticCtrl);
|
2007-01-05 00:24:54 +00:00
|
|
|
#if defined(__WIZ_DEBUG__)
|
2006-01-27 00:34:53 +00:00
|
|
|
wxASSERT(m_pErrDescriptionCtrl);
|
|
|
|
wxASSERT(m_pErrProjectPropertiesCtrl);
|
|
|
|
wxASSERT(m_pErrProjectCommCtrl);
|
|
|
|
wxASSERT(m_pErrProjectPropertiesURLCtrl);
|
|
|
|
wxASSERT(m_pErrAccountCreationDisabledCtrl);
|
|
|
|
wxASSERT(m_pErrClientAccountCreationDisabledCtrl);
|
|
|
|
wxASSERT(m_pErrAccountAlreadyExistsCtrl);
|
|
|
|
wxASSERT(m_pErrProjectAlreadyAttachedCtrl);
|
|
|
|
wxASSERT(m_pErrProjectAttachFailureCtrl);
|
|
|
|
wxASSERT(m_pErrGoogleCommCtrl);
|
|
|
|
wxASSERT(m_pErrYahooCommCtrl);
|
|
|
|
wxASSERT(m_pErrNetDetectionCtrl);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
if (IS_ATTACHTOPROJECTWIZARD()) {
|
2007-08-02 20:03:21 +00:00
|
|
|
pDoc->rpc.acct_mgr_info(ami);
|
|
|
|
is_acct_mgr_detected = ami.acct_mgr_url.size() ? true : false;
|
|
|
|
|
|
|
|
if (is_acct_mgr_detected) {
|
|
|
|
m_pTitleStaticCtrl->SetLabel(
|
2007-08-11 03:30:03 +00:00
|
|
|
_("Attach to project")
|
2007-08-02 20:03:21 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
strBuffer.Printf(
|
2007-08-11 03:30:03 +00:00
|
|
|
_("If possible, add projects at the\n"
|
|
|
|
"%s web site.\n"
|
2007-08-02 20:03:21 +00:00
|
|
|
"\n"
|
2007-08-11 03:30:03 +00:00
|
|
|
"Projects added via this wizard will not be\n"
|
|
|
|
"listed on or managed via %s."),
|
|
|
|
wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str(),
|
|
|
|
wxString(ami.acct_mgr_name.c_str(), wxConvUTF8).c_str()
|
2007-08-02 20:03:21 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
m_pDescriptionStaticCtrl->SetLabel(
|
|
|
|
strBuffer
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
m_pTitleStaticCtrl->SetLabel(
|
|
|
|
_("Attach to project")
|
|
|
|
);
|
|
|
|
m_pDescriptionStaticCtrl->SetLabel(
|
|
|
|
_("We'll now guide you through the process of attaching\n"
|
|
|
|
"to a project.")
|
|
|
|
);
|
|
|
|
}
|
2006-02-16 19:03:02 +00:00
|
|
|
} else if (IS_ACCOUNTMANAGERREMOVEWIZARD()) {
|
2007-08-07 20:10:36 +00:00
|
|
|
wxASSERT(pWAM);
|
|
|
|
wxASSERT(wxDynamicCast(pWAM, CWizardAccountManager));
|
2006-02-16 19:03:02 +00:00
|
|
|
strBuffer.Printf(
|
2007-01-17 20:28:17 +00:00
|
|
|
_("&Stop using%s"),
|
2006-02-16 19:03:02 +00:00
|
|
|
pWAM->m_strProjectName.c_str()
|
|
|
|
);
|
|
|
|
m_pTitleStaticCtrl->SetLabel(
|
|
|
|
strBuffer
|
|
|
|
);
|
|
|
|
strBuffer.Printf(
|
2007-01-06 01:07:35 +00:00
|
|
|
_("We'll now remove this computer from %s. From now on,\n"
|
|
|
|
"attach and detach projects directly from this computer.\n"
|
|
|
|
),
|
2006-02-16 19:03:02 +00:00
|
|
|
pWAM->m_strProjectName.c_str()
|
|
|
|
);
|
|
|
|
m_pDescriptionStaticCtrl->SetLabel(
|
|
|
|
strBuffer
|
|
|
|
);
|
2006-01-27 00:34:53 +00:00
|
|
|
} else if (IS_ACCOUNTMANAGERWIZARD()) {
|
2007-08-07 20:10:36 +00:00
|
|
|
wxASSERT(pWAM);
|
|
|
|
wxASSERT(wxDynamicCast(pWAM, CWizardAccountManager));
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pTitleStaticCtrl->SetLabel(
|
|
|
|
_("Account manager")
|
|
|
|
);
|
|
|
|
m_pDescriptionStaticCtrl->SetLabel(
|
2007-01-05 00:24:54 +00:00
|
|
|
_("We'll now guide you through the process of attaching\n"
|
|
|
|
"to an account manager.\n\n"
|
|
|
|
"If you want to attach to a single project, click Cancel,\n"
|
|
|
|
"then select the 'Attach to project' menu item instead."
|
|
|
|
)
|
2006-01-27 00:34:53 +00:00
|
|
|
);
|
|
|
|
} else {
|
|
|
|
wxASSERT(FALSE);
|
|
|
|
}
|
|
|
|
|
2007-01-05 00:24:54 +00:00
|
|
|
#if defined(__WIZ_DEBUG__)
|
2006-01-27 00:34:53 +00:00
|
|
|
m_pErrDescriptionCtrl->SetLabel(
|
|
|
|
_("Debug Flags")
|
|
|
|
);
|
|
|
|
m_pErrProjectPropertiesCtrl->SetLabel(
|
|
|
|
_("Project Properties Failure")
|
|
|
|
);
|
|
|
|
m_pErrProjectCommCtrl->SetLabel(
|
|
|
|
_("Project Comm Failure")
|
|
|
|
);
|
|
|
|
m_pErrProjectPropertiesURLCtrl->SetLabel(
|
|
|
|
_("Project Properties URL Failure")
|
|
|
|
);
|
|
|
|
m_pErrAccountCreationDisabledCtrl->SetLabel(
|
|
|
|
_("Account Creation Disabled")
|
|
|
|
);
|
|
|
|
m_pErrClientAccountCreationDisabledCtrl->SetLabel(
|
|
|
|
_("Client Account Creation Disabled")
|
|
|
|
);
|
|
|
|
m_pErrAccountAlreadyExistsCtrl->SetLabel(
|
|
|
|
_("Account Already Exists")
|
|
|
|
);
|
|
|
|
m_pErrProjectAlreadyAttachedCtrl->SetLabel(
|
|
|
|
_("Project Already Attached")
|
|
|
|
);
|
|
|
|
m_pErrProjectAttachFailureCtrl->SetLabel(
|
|
|
|
_("Project Attach Failure")
|
|
|
|
);
|
|
|
|
m_pErrGoogleCommCtrl->SetLabel(
|
|
|
|
_("Google Comm Failure")
|
|
|
|
);
|
|
|
|
m_pErrYahooCommCtrl->SetLabel(
|
|
|
|
_("Yahoo Comm Failure")
|
|
|
|
);
|
|
|
|
m_pErrNetDetectionCtrl->SetLabel(
|
|
|
|
_("Net Detection Failure")
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
m_pDirectionsStaticCtrl->SetLabel(
|
|
|
|
_("To continue, click Next.")
|
|
|
|
);
|
|
|
|
|
2006-01-27 08:11:29 +00:00
|
|
|
Fit();
|
2007-03-09 23:44:34 +00:00
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnPageChanged - Function End"));
|
2005-09-26 11:29:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_WIZARD_PAGE_CHANGING event handler for ID_WELCOMEPAGE
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CWelcomePage::OnPageChanging( wxWizardExEvent& event ) {
|
|
|
|
if (event.GetDirection() == false) return;
|
|
|
|
|
|
|
|
unsigned long ulFlags = 0;
|
|
|
|
|
2007-01-05 00:24:54 +00:00
|
|
|
#if defined(__WIZ_DEBUG__)
|
2006-01-27 00:34:53 +00:00
|
|
|
if (m_pErrProjectPropertiesCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRPROJECTPROPERTIES;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrProjectPropertiesURLCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRPROJECTPROPERTIESURL;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrProjectCommCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRPROJECTCOMM;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrGoogleCommCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRGOOGLECOMM;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrYahooCommCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRYAHOOCOMM;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrAccountAlreadyExistsCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRACCOUNTALREADYEXISTS;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrAccountCreationDisabledCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRACCOUNTCREATIONDISABLED;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrClientAccountCreationDisabledCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRCLIENTACCOUNTCREATIONDISABLED;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrProjectAttachFailureCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRPROJECTATTACH;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrProjectAlreadyAttachedCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRPROJECTALREADYATTACHED;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
|
|
|
if (m_pErrNetDetectionCtrl->GetValue()) {
|
2005-09-26 11:29:28 +00:00
|
|
|
ulFlags |= WIZDEBUG_ERRNETDETECTION;
|
2006-01-27 00:34:53 +00:00
|
|
|
}
|
2005-09-26 11:29:28 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
PROCESS_DEBUG_FLAG( ulFlags );
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_WIZARD_CANCEL event handler for ID_WELCOMEPAGE
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CWelcomePage::OnCancel( wxWizardExEvent& event ) {
|
|
|
|
PROCESS_CANCELEVENT(event);
|
|
|
|
}
|
|
|
|
|
2007-03-09 23:44:34 +00:00
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_SET_FOCUS event handler for ID_WELCOMEPAGE
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CWelcomePage::OnSetFocus( wxFocusEvent& event ) {
|
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnSetFocus - Function Begin"));
|
|
|
|
event.Skip();
|
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnSetFocus - Function End"));
|
|
|
|
}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* wxEVT_SHOW event handler for ID_WELCOMEPAGE
|
|
|
|
*/
|
|
|
|
|
|
|
|
void CWelcomePage::OnShow( wxShowEvent& event ) {
|
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnShow - Function Begin"));
|
|
|
|
event.Skip();
|
|
|
|
wxLogTrace(wxT("Function Start/End"), wxT("CWelcomePage::OnShow - Function End"));
|
|
|
|
}
|
|
|
|
|