当前位置: 首页>>代码示例>>C++>>正文


C++ Server::GetData方法代码示例

本文整理汇总了C++中Server::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ Server::GetData方法的具体用法?C++ Server::GetData怎么用?C++ Server::GetData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Server的用法示例。


在下文中一共展示了Server::GetData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SettingsView


//.........这里部分代码省略.........
	cInputFrame.bottom = cInputFrame.top + INPUT_HEIGHT;
	m_pcUsernameInput = new InputView( cInputFrame, MSG_CFGWND_SENDINGEMAIL_SETTINGS_USERNAME, nInputLabelWidth );
	m_pcOutboundView->AddChild( m_pcUsernameInput );

	/* Password */
	cInputFrame.top = cInputFrame.bottom + 5;
	cInputFrame.bottom = cInputFrame.top + INPUT_HEIGHT;
	m_pcPasswordInput = new InputView( cInputFrame, MSG_CFGWND_SENDINGEMAIL_SETTINGS_PASSWORD, nInputLabelWidth );
	m_pcPasswordInput->SetPasswordMode();
	m_pcOutboundView->AddChild( m_pcPasswordInput );

	Rect cPortFrame = cBounds;
	cPortFrame.top = cInputFrame.bottom + 5;
	cPortFrame.bottom = cPortFrame.top + INPUT_HEIGHT;

	StringView *pcPortLabel = new StringView( cPortFrame, "outbound_port_label", MSG_CFGWND_SENDINGEMAIL_SETTINGS_SRVERPORT );
	cPortFrame.right = pcPortLabel->GetPreferredSize( false ).x;
	pcPortLabel->SetFrame( cPortFrame );
	m_pcOutboundView->AddChild( pcPortLabel );

	cPortFrame.left = cPortFrame.right + 5;
	cPortFrame.right = cBounds.right - 5;

	m_pcPort = new Spinner( cPortFrame, "outbound_port", 25, NULL );
	if( bOutboundValid )
		m_pcPort->SetValue( cOutboundServer.GetPort() );
	m_pcPort->SetMinValue( 1 );
	m_pcPort->SetMaxValue( 65535 );
	m_pcPort->SetStep( 1.0 );
	m_pcPort->SetFormat( "%.0f" );

	/* XXXKV: Spinner doesn't produce a usable width */
	//cPortFrame.right = cPortFrame.left + m_pcPort->GetPreferredSize( false ).x + 1;
	cPortFrame.right = cPortFrame.left + 70;
	cPortFrame.bottom = cPortFrame.top + m_pcPort->GetPreferredSize( false ).y + 1;
	m_pcPort->SetFrame( cPortFrame );
	m_pcOutboundView->AddChild( m_pcPort );

	cAuthFrame = cBounds;
	cAuthFrame.top = cPortFrame.bottom + 5;
	cAuthFrame.bottom = cAuthFrame.top + INPUT_HEIGHT;

	m_pcPopBeforeSmtp = new CheckBox( cAuthFrame, "outbound_auth2", MSG_CFGWND_SENDINGEMAIL_SETTINGS_POPBEFORESMTP, new Message( ID_POP3_AUTH ) );
	cAuthFrame.right = m_pcPopBeforeSmtp->GetPreferredSize( false ).x;
	m_pcPopBeforeSmtp->SetFrame( cAuthFrame );
	m_pcOutboundView->AddChild( m_pcPopBeforeSmtp );

	cAuthFrame.top = cAuthFrame.bottom + 5;
	cAuthFrame.bottom += INPUT_HEIGHT;

	StringView *pcAuthLabel = new StringView( cAuthFrame, "outbound_auth_label", MSG_CFGWND_SENDINGEMAIL_SETTINGS_SMTPAUTH );
	cAuthFrame.right = pcAuthLabel->GetPreferredSize( false ).x;
	pcAuthLabel->SetFrame( cAuthFrame );
	m_pcOutboundView->AddChild( pcAuthLabel );

	cAuthFrame.left = cAuthFrame.right + 5;
	cAuthFrame.right = cBounds.right - 5;

	m_pcPop3Account = new DropdownMenu( cAuthFrame, "outbound_pop3_auth_instance", CF_FOLLOW_LEFT | CF_FOLLOW_RIGHT );
	m_pcPop3Account->SetTabOrder( NEXT_TAB_ORDER );

	cAuthFrame.bottom = cAuthFrame.top + m_pcPop3Account->GetPreferredSize( false ).y + 1;
	m_pcPop3Account->SetFrame( cAuthFrame );

	int i = 0;
	Server cInboundServer;
	while( m_pcIdentity->GetServer( cInboundServer, SERVER_INBOUND, i++ ) == EOK )
		m_pcPop3Account->AppendItem( cInboundServer.GetServer() );

	m_pcOutboundView->AddChild( m_pcPop3Account );

	if( bOutboundValid && cOutboundServer.GetFlags() & AUTH_SMTP )
	{
		m_pcRequiresAuth->SetValue( true );
		m_pcUsernameInput->SetEnable( true );
		m_pcUsernameInput->SetText( cOutboundServer.GetUsername() );
		m_pcPasswordInput->SetEnable( true );
		m_pcPasswordInput->SetText( cOutboundServer.GetPassword() );
	}
	else
	{
		m_pcRequiresAuth->SetValue( false );
		m_pcUsernameInput->SetEnable( false );
		m_pcPasswordInput->SetEnable( false );
	}

	if( bOutboundValid && cOutboundServer.GetFlags() & AUTH_POP3_BEFORE )
	{
		m_pcPopBeforeSmtp->SetValue( true );
		m_pcPop3Account->SetEnable( true );
		m_pcPop3Account->SetSelection( cOutboundServer.GetData().AsInt32() );
	}
	else
	{
		m_pcPopBeforeSmtp->SetValue( false );
		m_pcPop3Account->SetEnable( false );
	}

	AddChild( m_pcOutboundView );
}
开发者ID:PyroOS,项目名称:Pyro,代码行数:101,代码来源:outbound_view.cpp


注:本文中的Server::GetData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。