Beispiel #1
0
LRESULT CWzFtpPg1::OnRefresh(WPARAM wParam, LPARAM lParam)
{
	CRKey *pRk = (CRKey*)CWzFrame::GetData( GetSafeHwnd() );
	if ( pRk == NULL ) return -1;

	// Load values
	m_sName = pRk->GetSz( "ServerName" );
	m_sAddr = pRk->GetSz( "Address" ); 
	m_sFolder = pRk->GetSz( "Folder" );
	m_sHttpPath = pRk->GetSz( "HttpPath" );

	// Create a unique group name if needed
	if ( m_sName.IsEmpty() )
	{
		DWORD i = 1;
		char name[ CWF_STRSIZE ];
		do
		{	wsprintf( name, "FTP Server %lu", i++ );
		} while ( FTPSERVERS().FindGroup( name ) != NULL );
		m_sName = name;

	} // end if

	UpdateData( FALSE );

	// Verify HTTP Path
	UpdateHttpPath( TRUE );

	return 1;
}
Beispiel #2
0
BOOL CDlgStackTrace::FillList( CReg *pReg )
{_STT();

	// Lose previous tree values
	m_list.DeleteAllItems();

	if ( pReg == NULL ) return FALSE;

	// Get selected tab
	int tab = m_tabSource.GetCurSel();
	if ( tab < 0 ) return FALSE;

	// Get thread selection
	int sel = m_comboThread.GetCurSel();
	if ( sel < 0 ) return FALSE;

	// Get seleted thread
	char szKey[ CWF_STRSIZE ] = "";
	m_comboThread.GetLBText( sel, szKey );

	// Find selected thread information
	CRKey *pRk = NULL;
	if ( '*' == *szKey ) pRk = pReg->FindKey( &szKey[ 2 ] );
	else pRk = pReg->FindKey( szKey );
	if ( !pRk ) return FALSE;

	UINT i = 0;
	int item = 0;
	LPCTSTR pFn = NULL;

	// Write out the call stack
	do
	{
		// Create key
		wsprintf( szKey, "f_%lu", i );

		// Is there a function at this index
		pFn = pRk->GetSz( szKey );
		if ( *pFn ) item = m_list.InsertItem( m_list.GetItemCount(), pFn, 0 );

		if ( tab == 2 )
		{
			wsprintf( szKey, "t_%lu", i );

			// Set the total time spent in this function
			LPCTSTR pT = pRk->GetSz( szKey );
			if ( *pT ) m_list.SetItemText( item, 1, pT );

		} // end if

		i++;

	} while ( *pFn );

	return TRUE;
}
BOOL CDlgPublishHtml::FillCombo()
{
	// Fill in FTP servers
	m_comboFtpServer.ResetContent();
	HGROUP hGroup = NULL;
	while ( ( hGroup = FTPSERVERS().GetNext( hGroup ) ) != NULL )
		m_comboFtpServer.AddString( hGroup->name );

	// Fill in local server paths
	m_comboFolder.ResetContent();
	CRKey *pRk = WEBSETTINGS().GetKey( "FolderMap" );
	if ( pRk != NULL )
	{	LPREGVALUE	prv = NULL;
		while ( ( prv = (LPREGVALUE)pRk->GetNext( prv ) ) != NULL )
		{
			// Add this path
			int n = m_comboFolder.AddString( pRk->GetSz( prv ) );

			// Select the root
			if (	*prv->cpkey == 0 || !strcmp( prv->cpkey, "/" ) ||
					!strcmp( prv->cpkey, "\\" ) )
				m_comboFolder.SetCurSel( n );

		} // end while
	} // end if

	return TRUE;
}
Beispiel #4
0
LRESULT CWzEmailPg2::OnRefresh(WPARAM wParam, LPARAM lParam)
{
	CRKey *pRk = (CRKey*)CWzFrame::GetData( GetSafeHwnd() );
	if ( pRk == NULL ) return -1;

	m_bAuthDetect = pRk->GetDword( "AuthDetect", 1 ) != 0;
	m_bLogin = pRk->GetDword( "Login", 1 ) != 0;
	m_dwAuthType = pRk->GetDword( "AuthType" );

	m_sUsername = pRk->GetSz( "Username" );
	m_sPassword = pRk->GetSz( "Password" );
	
	UpdateData( FALSE );

	FillCombo();
	DoEnable();

	return 1;
}