Пример #1
0
TBool CConverterDialog::OkToExitL(TInt aKeycode)
	{
	CEikChoiceList* typesList = static_cast<CEikChoiceList*>(Control(ECvtTypeField));
	iTargetType = typesList->Array()->MdcaPoint(typesList->CurrentItem());

	// if format options button pressed, show dialog
	if (aKeycode == EFormatOptions)
		{
		if (CFormatOptionsDialog::RunDlgLD(iFileName, iTargetType, iMediaClientEngine, iFormatOptions)) 
			iOptionsSetFor = typesList->CurrentItem();
		return EFalse;
		}
	
	return ETrue;
    }
Пример #2
0
TBool CFormatOptionsDialog::OkToExitL(TInt /*aKeycode*/)
	{
	CEikChoiceList* list = static_cast<CEikChoiceList*>(Control(ECodecs));
	if (list->IsVisible()) 
		{iFormatOptions.i4CC = iDataTypes[list->CurrentItem()]; iFormatOptions.i4CCSet = ETrue; }
	list = static_cast<CEikChoiceList*>(Control(EBitRates));
	if (list->IsVisible()) 
		{iFormatOptions.iBitRate = iBitRates[list->CurrentItem()]; iFormatOptions.iBitRateSet = ETrue; }
	list = static_cast<CEikChoiceList*>(Control(ESampleRates));
	if (list->IsVisible()) 
		{iFormatOptions.iSampleRate = iSampleRates[list->CurrentItem()]; iFormatOptions.iSampleRateSet = ETrue; }
	list = static_cast<CEikChoiceList*>(Control(EChannels));
	if (list->IsVisible()) 
		{iFormatOptions.iChannel = iChannels[list->CurrentItem()]; iFormatOptions.iChannelSet = ETrue; }
	return ETrue;
	}
Пример #3
0
TBool CRecordDialog::OkToExitL(TInt aKeycode)
	{
	_LIT(KRecordFile, "c:\\record-output");
	CEikChoiceList* typesList = static_cast<CEikChoiceList*>(Control(ECvtTypeField));
	iFileName = KRecordFile;
	TPtrC type = typesList->Array()->MdcaPoint(typesList->CurrentItem());
	iFileName.Append(type);

	// if format options button pressed, show dialog
	if (aKeycode == EFormatOptions)
		{
		if (CRecordFormatOptionsDialog::RunDlgLD(type, iMediaClientEngine, iRecordFormatOptions)) 
			iOptionsSetFor = typesList->CurrentItem();
		return EFalse;
		}
	
	return ETrue;
    }
TBool CTcSettingsDialog::OkToExitL( TInt /*aKeycode*/ )
	{
	CEikChoiceList* iapList =
		reinterpret_cast< CEikChoiceList* >( Control( ECtrlIAPName ) );
	iSettings.iIAPId = iIAPManager->Id( iapList->CurrentItem() );

	iSettings.iBearerType = ChoiceListCurrentItem( ECtrlConnection );
	
	TBuf<40> remoteAddrText;
	GetEdwinText(remoteAddrText, ECtrlRemoteAddr);
	if (KErrNone != iSettings.iTCPRemoteAddr.Input(remoteAddrText))
		{
		_LIT(KInvalidAddressText, "Invalid remote IP");
		CEikonEnv::Static()->AlertWin(KInvalidAddressText);
		return EFalse;
		}

	iSettings.iTCPPort = NumberEditorValue( ECtrlTcpPort );
	
	iSettings.iCSYName = ChoiceListCurrentItem( ECtrlCSYName );
	                            
	iSettings.iCommPort = ChoiceListCurrentItem( ECtrlCommPort );
	                            
	iSettings.iBaudrate = NumberEditorValue( ECtrlBaudrate );

	if( ChoiceListCurrentItem( ECtrlAutoConnect ) == 1 )
		{
		iSettings.iAutoConnect = ETrue;
		}
	else
		{
		iSettings.iAutoConnect = EFalse;
		}

	iSettings.Store();
	return ETrue;
	}