Пример #1
0
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
WlanOsa::WlanOsa() : iPimpl( NULL ), iDfcQueue( NULL )
    {
    TraceDump(INFO_LEVEL, ("[WLAN] WlanOsa ctor"));

    iPimpl = new WlanOsaImpl();
    if ( iPimpl )
        {
        if ( iPimpl->IsValid() )
            {
            // allocation success & object valid -> proceed

            Validate();

            const TUint mutex_order( KMutexOrdGeneral7 );
            TraceDump(MUTEX_LEVEL,
                (("[WLAN] WlanOsa mutex create: order: %d"), mutex_order));

            const TInt ret( Kern::MutexCreate(
                Pimpl().iMutex, KNullDesC, mutex_order) );

            if ( ret != KErrNone )
                {
                delete iPimpl;
                // and invalidate
                InValidate();
                }
            }
        else
            {
            // osa impl is invalid. Deallocate it
            delete iPimpl;
            // we are invalid, too
            InValidate();
            }
        }
    else
        {
        // allocation failed invalidate object
        InValidate();
        }
    }
Пример #2
0
void CDrawRFinance::OnUpdateFinaceData()
{
	// 数据更新从第二列开始
	int index = m_ayCell.GetCount() / 2;
	char strText[64];
	memset(strText, 0, sizeof(strText));
	for (int i = 0; i < m_ayTitleInt.GetCount(); i++, index++)
	{	
		int nIndex = m_ayTitleInt.GetAt(i);
		CHSCalculate::GetTextByID(nIndex, &m_ayFinanceData.GetAt(0), strText);
		SetCellText(index, 0, strText, 0, 0, 0, 0, FALSE);
	}
	InValidate(&GetTableRect(), FALSE);
}
Пример #3
0
int CDrawInfo::OnUpdateData( DataHead* pData )
{
	if (pData->m_nType == RT_TEXTDATAWITHINDEX_NEGATIVE)
	{
		m_bIsShow = TRUE;
		AnsTextData* pTextData = (AnsTextData*)pData;
		if (pTextData->m_nSize <= 0)
		{
			return 0;
		}
		//////////////////////////////////////////////////////////////////////////
		// 初始化一些变量
		RemoveAllCell();
		DelAllInfoIndex();
		m_pViewInfo->SetText("");
		//////////////////////////////////////////////////////////////////////////
		int nCount(0);
		InfoIndex* pRefIndex = CAnalysisTextData::GetInfoIndexData(pTextData, pTextData->m_nSize, nCount);
		if (pRefIndex)
		{
			// 加入到指针
			InfoIndex* pIndex = NULL;
			for(int i = 0; i < nCount; i++,pRefIndex++ )
			{
				pIndex = new InfoIndex;
				memcpy(pIndex, pRefIndex, sizeof(InfoIndex));
				m_ayInfoIndex.Add(pIndex);
			}
			CreateSelf();
			
			CPoint pos = IndexToPoint(m_nActiveCellID);
			RequestText(GetArrayIndexFromPoint(pos));  
		}
	}
	else if (pData->m_nType == RT_BYINDEXRETDATA)
	{
		AnsTextData* pTextData = (AnsTextData*)pData;
		CString strText(pTextData->m_cData, pTextData->m_nSize);

		m_pViewInfo->SetText(strText);
		SetRect(m_rect);
		InValidate(NULL, FALSE);
	}
	return TRUE;
}