Esempio n. 1
0
	void CProgressUI::SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue)
	{
		if( _tcsicmp(pstrName, _T("hor")) == 0 ) SetHorizontal(_tcsicmp(pstrValue, _T("true")) == 0);
		else if( _tcsicmp(pstrName, _T("min")) == 0 ) SetMinValue(_ttoi(pstrValue));
		else if( _tcsicmp(pstrName, _T("max")) == 0 ) SetMaxValue(_ttoi(pstrValue));
		else if( _tcsicmp(pstrName, _T("value")) == 0 ) SetValue(_ttoi(pstrValue));
		else if( _tcsicmp(pstrName, _T("isstretchfore"))==0) SetStretchForeImage(_tcsicmp(pstrValue, _T("true")) == 0? true : false);
		else CLabelUI::SetAttribute(pstrName, pstrValue);
	}
Esempio n. 2
0
	void CProgressUI::SetAttribute(const wchar_t* pstrName, const wchar_t* pstrValue)
	{
		if( wcscmp(pstrName, L"foreimage") == 0 ) m_sForeImage.reset(new CImage(pstrValue));
		else if( wcscmp(pstrName, L"hor") == 0 ) SetHorizontal(wcscmp(pstrValue, L"true") == 0);
		else if( wcscmp(pstrName, L"min") == 0 ) SetMinValue(_wtoi(pstrValue));
		else if( wcscmp(pstrName, L"max") == 0 ) SetMaxValue(_wtoi(pstrValue));
		else if( wcscmp(pstrName, L"value") == 0 ) SetValue(_wtoi(pstrValue));
		else if( wcscmp(pstrName, L"isstretchfore")==0) SetStretchForeImage(wcscmp(pstrValue, L"true") == 0? true : false);
		else CLabelUI::SetAttribute(pstrName, pstrValue);
	}
Esempio n. 3
0
void CUIProgress::SetAttribute(LPCWSTR pstrName, LPCWSTR pstrValue)
{
	if( wcscmp(pstrName, L"foreimage") == 0 ) 
		SetForeImage(pstrValue);
	else if( wcscmp(pstrName, L"hor") == 0 ) 
		SetHorizontal(wcscmp(pstrValue, L"true") == 0);
	else if( wcscmp(pstrName, L"min") == 0 )
		SetMinValue(/*_wtoi(pstrValue)*/wcstol(pstrValue, NULL, 10));
	else if( wcscmp(pstrName, L"max") == 0 )
		SetMaxValue(/*_wtoi(pstrValue)*/wcstol(pstrValue, NULL, 10));
	else if( wcscmp(pstrName, L"value") == 0 )
		SetValue(/*_wtoi(pstrValue)*/wcstol(pstrValue, NULL, 10));
	else if( wcscmp(pstrName, L"isstretchfore")==0)
		SetStretchForeImage(wcscmp(pstrValue, L"true") == 0);
	else 
		CUILabel::SetAttribute(pstrName, pstrValue);
}