*** empty log message ***

svn path=/trunk/boinc/; revision=10510
This commit is contained in:
Rom Walton 2006-06-23 23:19:19 +00:00
parent 9d9b248a20
commit a23450e126
3 changed files with 75 additions and 1 deletions

View File

@ -6788,3 +6788,9 @@ Rom 23 June 2006
BOINCBaseFrame.cpp, .h
MainFrame.cpp, .h
Rom 23 June 2006
- Enable the wizards for initial startups.
clientgui/
sg_BoincSimpleGUI.cpp.cpp, .h

View File

@ -33,6 +33,11 @@
#include "sg_DlgPreferences.h"
#include "sg_SkinClass.h"
#include "sg_BoincSimpleGUI.h"
#include "wizardex.h"
#include "BOINCWizards.h"
#include "BOINCBaseWizard.h"
#include "WizardAttachProject.h"
#include "WizardAccountManager.h"
#include "res/boinc.xpm"
@ -42,6 +47,7 @@ BEGIN_EVENT_TABLE(CSimpleFrame, CBOINCBaseFrame)
EVT_BUTTON(-1,CSimpleFrame::OnBtnClick)
EVT_SIZE(CSimpleFrame::OnSize)
EVT_ERASE_BACKGROUND(CSimpleFrame::OnEraseBackground)
EVT_FRAME_CONNECT(CSimpleFrame::OnConnect)
END_EVENT_TABLE()
@ -76,6 +82,68 @@ CSimpleFrame::~CSimpleFrame()
// m_player.Stop();
}
void CSimpleFrame::OnConnect(CFrameEvent& WXUNUSED(event)) {
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnConnect - Function Begin"));
CMainDocument* pDoc = wxGetApp().GetDocument();
CWizardAccountManager* pAMWizard = NULL;
CWizardAttachProject* pAPWizard = NULL;
wxString strComputer = wxEmptyString;
wxString strName = wxEmptyString;
wxString strURL = wxEmptyString;
bool bCachedCredentials = false;
ACCT_MGR_INFO ami;
PROJECT_INIT_STATUS pis;
wxASSERT(pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
// If we are connected to the localhost, run a really quick screensaver
// test to trigger a firewall popup.
pDoc->GetConnectedComputerName(strComputer);
if (pDoc->IsComputerNameLocal(strComputer)) {
wxGetApp().StartBOINCScreensaverTest();
}
pDoc->rpc.acct_mgr_info(ami);
if (ami.acct_mgr_url.size() && !ami.have_credentials) {
pAMWizard = new CWizardAccountManager(this);
if (!IsShown()) {
Show();
}
if (pAMWizard->Run()) {
// If successful, hide the main window
Hide();
}
} else if (0 >= pDoc->GetProjectCount()) {
pAPWizard = new CWizardAttachProject(this);
if (!IsShown()) {
Show();
}
pDoc->rpc.get_project_init_status(pis);
strName = wxString(pis.name.c_str(), wxConvUTF8);
strURL = wxString(pis.url.c_str(), wxConvUTF8);
bCachedCredentials = pis.url.length() && pis.has_account_key;
pAPWizard->Run(strName, strURL, bCachedCredentials);
}
if (pAMWizard)
pAMWizard->Destroy();
if (pAPWizard)
pAPWizard->Destroy();
wxLogTrace(wxT("Function Start/End"), wxT("CSimpleFrame::OnConnect - Function End"));
}
wxPoint& CSimpleFrame::SetwxPoint(long x,long y){
m_tmppoint.x=x;
m_tmppoint.y=y;

View File

@ -44,7 +44,7 @@ public:
~CSimpleFrame();
void OnConnect( CFrameEvent& event );
// Images