Пример #1
0
void ApplicationClass::Release()
{
	// Delete the used variables
	SafeDelete(m_pMesh);
	SafeDelete(m_pGrid);
	SafeDelete(m_pWindow);

	// Release all the singletons used in the dll
	ReleaseAllSingletons();
}
Пример #2
0
void ApplicationClass::Release()
{
	// Delete the used variables
	SafeDelete(pBoundingBox1);
	SafeDelete(pBoundingBox2);

	SafeDelete(m_pGrid);
	SafeDelete(m_pWindow);

	// Release all the singletons used in the dll
	ReleaseAllSingletons();
	m_pBSMngr->ReleaseInstance();
}
Пример #3
0
	void OnOk(UINT /*uNotifyCode*/, int nID, HWND /*hWnd*/)
	{
		CWaitCursor cursor;
		DoDataExchange(true);

		if (m_IniFile.isLinked() && m_DefaultConfig != m_ConfigLabel)
		{
			::SetDefaultConfig(m_IniFile, static_cast<const TCHAR *>(m_ConfigLabel));
		}

		m_config->Set(GLOBAL_USER, m_User);
		m_config->Set(GLOBAL_PASSWORD, m_Password);
		//if ( !VerifyCommsServerConfig() )
		//{
		//	MessageBox(_T("You still need to configure one or more servers. Click on Preferences to configure your servers."), m_Title);
		//	return;
		//}

		int retCode = 0;
		int passwordDaysRemaining = 0;
		int passwordExpirationWarningDays = 0;
		CString retMsg;

		m_autoUpdateLink.ShowWindow(SW_HIDE);
		CString accountServer = m_config->Get(GLOBAL_SERVER_ACCOUNT);
		if (!m_verifyUser || accountServer.IsEmpty() || VerifyUser(m_config, m_User, m_Password, retCode, retMsg, passwordExpirationWarningDays, passwordDaysRemaining))
		{
			ReleaseAllSingletons();
			if (CheckPasswordExpiration(passwordExpirationWarningDays, passwordDaysRemaining, retMsg))
			{
				CString server(m_config->Get(GLOBAL_SERVER_ATTRIBUTE));
				CComPtr<IRepository> rep = ::AttachRepository(server, m_User, m_Password, m_ConfigLabel);
			}
			EndDialog(nID);
		}
		else
		{
			MessageBeep(MB_ICONEXCLAMATION);
			m_Msg.Format(_T("%i:  %s"), retCode, retMsg);
			DoDataExchange();
		}
	}