//----------------------------------------------------------//
// CWinSysConfigDialog::Initialise
//----------------------------------------------------------//
//-- Description
// Initialises widgets and registers the rollup container
// class. Activates config dialog.
//----------------------------------------------------------//
s32 CWinSysConfigDialog::Initialise(const s8* strTitle, const s8* strVersion)
{
	s32 nReturnStatus = WINSYS_OK;

	gDebugLog.Printf("CWinSysConfigDialog::Initialise:");
	SCOPED_LOG_INDENT(gDebugLog);

	if (IS_FALSE(m_bRegistered))
	{
		CWinSysRollupContainer::RegisterRollupContainerClass();

		m_bRegistered = true;
	}

	if (IS_FALSE(m_ConfigIni.Initialise()))
	{
		//-- Failed to initialise config ini
		gDebugLog.Printf("Failed to initialise Configuration Ini storage.");
		return WINSYS_CONFIG_INI_NOT_LOADED;
	}

	m_strTitle = strTitle;
	m_strVersion = strVersion;

	ChangeShowAtStartup(true);
	SetDesiredWindowMode(DesiredWindowMode::Windowed);
	SetDesiredResolution(DesiredResolution::Res640x480);
	SetDesiredBPP(DesiredBPP::Bpp32);
	SetServerAddress("192.168.1.100:1234");
	SetServerLoginEmail("*****@*****.**");
	SetServerLoginPassword("ABC123");

	if (IS_FALSE(m_ConfigIni.Load(WINSYS_CONFIG_SAVE_FILE)))
	{
		//-- Failed to load config ini
		MessageBox(NULL, "Configuration Ini cannot be created. Using defaults.", TEXT(m_strTitle.ConstBuffer()), MB_OK|MB_ICONEXCLAMATION);
	}

	nReturnStatus = m_RollupContainer.Initialise(this);
	if (WINSYS_OK != nReturnStatus)
	{
		//-- Failed to Initialise rollup container
		gDebugLog.Printf("Failed to initialise rollup container.");
		return nReturnStatus;
	}

	gDebugLog.Printf("Complete. (OK)");

	//-- Success
	return WINSYS_OK;
}
Example #2
0
void CNetworkManager::ConnectionSuccess(RakNet::Packet *pPacket)
{
	// Dodanie wiadomoœci o po³¹czeniu do czatu.
	g_pClient->GetChatbox()->AddDebugMessage("Po³¹czono pomyœlnie!");

	// Ustalenie aktualnego adresu serwera
	SetServerAddress(pPacket->systemAddress);
	
	//Ustawianie informacji o stanie po³¹czenia.
	SetConnected(true);

	// Wys³anie pakietu z podstawowymi informacjami o graczu.
	RakNet::BitStream bitStream;
	bitStream.Write(m_pPlayerManager->GetLocalPlayer()->GetName().Get(), MAX_PLAYER_NAME);
	Call("Player_Connect", &bitStream, HIGH_PRIORITY, RELIABLE, 0, true);
}
Example #3
0
XmlRpcConnection::XmlRpcConnection(const std::string& address, const std::string& port)
{
    SetServerAddress(address, port);
}