コード例 #1
0
void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderYahoo& rProvider)
{
	switch(m_chr)
	{
	case _T('o'):
		FormatDoubleHelper(DB_STR_YAHOO_OPEN_VALUE);
		break;
	case _T('h'):
		FormatDoubleHelper(DB_STR_YAHOO_DAY_HIGH);
		break;
	case _T('P'):
		FormatDoubleHelper(DB_STR_YAHOO_PREVIOUS_CLOSE);
		break;
	case _T('c'):
		FormatDoubleHelper(DB_STR_YAHOO_CHANGE);
		break;
	case _T('g'):
		FormatDoubleHelper(DB_STR_YAHOO_DAY_LOW);
		break;
	case _T('n'):
		m_sResult = Quotes_DBGetStringT(m_hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_DESCRIPTION);
		break;
	}

}
コード例 #2
0
void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderBase& rProvider)
{
	switch(m_chr)
	{
// 	default:
// 		m_sResult = m_chr;
// 		break;
	case _T('%'):
	case _T('\t'):
	case _T('\\'):
		m_sResult = m_chr;
		break;
	case _T('S'):
		m_sResult = Quotes_DBGetStringT(m_hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_PROVIDER);
		break;
	case _T('s'):
		m_sResult = Quotes_DBGetStringT(m_hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_SYMBOL);
		break;
	case _T('X'):
		//m_sResult = format_fetch_time(rProvider,m_hContact,_T("%H:%M:%S"));
		m_sResult = format_fetch_time(rProvider,m_hContact,Quotes_GetTimeFormat(true));
		break;
	case _T('x'):
		//m_sResult = format_fetch_time(rProvider,m_hContact,_T("%d.%m.%y"));
		m_sResult = format_fetch_time(rProvider,m_hContact,Quotes_GetDateFormat(true));
		break;
	case _T('t'):
		{
			tstring sFrmt = Quotes_GetDateFormat(true);
			sFrmt += _T(" ");
			sFrmt += Quotes_GetTimeFormat(true);
			m_sResult = format_fetch_time(rProvider,m_hContact,sFrmt);

			//m_sResult = format_fetch_time(rProvider,m_hContact,_T("%d.%m.%y %H:%M:%S"));
		}
		break;
	case _T('r'):
	case _T('R'):
		FormatDoubleHelper(DB_STR_QUOTE_CURR_VALUE);
		break;
	case _T('p'):
		FormatDoubleHelper(DB_STR_QUOTE_PREV_VALUE);
		break;
// 	case _T('c'):
// 		FormatChangeValueHelper(false);
// 		break;
// 	case _T('C'):
// 		FormatChangeValueHelper(true);
// 		break;
	}
}
コード例 #3
0
void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderGoogleFinance&/* rProvider*/)
{
	switch (m_chr) {
	case _T('o'):
		FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_OPEN_VALUE);
		break;
	case _T('d'):
		FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_DIFF, _T("0"));
		break;
	case _T('y'):
		FormatDoubleHelper(DB_STR_GOOGLE_FINANCE_PERCENT_CHANGE_TO_YERSTERDAY_CLOSE, _T("0"));
		break;
	case _T('n'):
		m_sResult = Quotes_DBGetStringT(m_hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_DESCRIPTION);
		break;
	}
}