ftpexampleconnectdlg.cpp

来自「Symbian智能手机操作系统源代码值的参考_网络ftp」· C++ 代码 · 共 59 行

CPP
59
字号
/*
* ============================================================================
*  Name     : CFtpExampleConnectDlg from FtpExampleConnectDlg.h
*  Part of  : FtpExample
*  Created  : 03/11/2005 by Forum Nokia
*  Version  : 1.0
*  Copyright: Nokia Corporation
* ============================================================================
*/

// INCLUDE FILES
#include "FtpExample.hrh"
#include "FtpExampleConnectDlg.h"

// ================= MEMBER FUNCTIONS =======================

// constructor
CFtpExampleConnectDlg::CFtpExampleConnectDlg(TDes& aServer, TDes& aUsername, TDes& aPassword)
	:	iServer(aServer),
		iUsername(aUsername),
		iPassword(aPassword)
	{
	}
	
// destructor
CFtpExampleConnectDlg::~CFtpExampleConnectDlg()
	{	
	}
		
// ---------------------------------------------------------
// CFtpExampleConnectDlg::PostLayoutDynInitL()
// Set form editable.
// ---------------------------------------------------------
//	
void CFtpExampleConnectDlg::PostLayoutDynInitL()
	{
	SetEditableL(ETrue);
	}

// ---------------------------------------------------------
// CFtpExampleConnectDlg::OkToExitL()
// Check that atleast FTP host name is entered.
// ---------------------------------------------------------
//			
TBool CFtpExampleConnectDlg::OkToExitL( TInt /*aKeycode*/ )
	{
	GetEdwinText(iServer, EHostNameEdwin);
	// Host name required.
	if (iServer.Length() == 0)
		{
		return EFalse;
		}
		
	GetEdwinText(iUsername, EUserNameEdwin);
	GetSecretEditorText(iPassword, EPasswordEdwin);
	return ETrue;
	}

// End of file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?