summaryrefslogtreecommitdiff
path: root/plugins/Quotes/src/QuotesProviderVisitorDbSettings.cpp
blob: c5ea95b59842b04711696b16d98f53adb8252801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#include "StdAfx.h"

CQuotesProviderVisitorDbSettings::CQuotesProviderVisitorDbSettings()
								 : m_pszDbRefreshRateType(NULL),
								   m_pszDbRefreshRateValue(NULL),
								   m_pszDbDisplayNameFormat(NULL),
								   m_pszDefDisplayFormat(NULL),
								   m_pszDefLogFileFormat(NULL),
								   m_pszDefHistoryFormat(NULL),
								   m_pszXMLIniFileName(NULL),
								   m_pszDbStatusMsgFormat(NULL),
								   m_pszDefStatusMsgFormat(NULL),
								   m_pszDbLogMode(NULL),
								   m_pszDbHistoryFormat(NULL),
								   m_pszDbHistoryCondition(NULL),
								   m_pszDbLogFile(NULL),
								   m_pszDbLogFormat(NULL),
								   m_pszDbLogCondition(NULL),
								   m_pszDbPopupFormat(NULL),
								   m_pszDefPopupFormat(NULL),
								   m_pszDbPopupCondition(NULL),
								   m_pszDbPopupColourMode(NULL),
								   m_pszDbPopupBkColour(NULL),
								   m_pszDbPopupTextColour(NULL),
								   m_pszDbPopupDelayMode(NULL),
								   m_pszDbPopupDelayTimeout(NULL),
								   m_pszDbPopupHistoryFlag(NULL),
								   m_pszDbTendencyFormat(nullptr),
								   m_pszDefTendencyFormat(_T("%r>%p"))
{
}

CQuotesProviderVisitorDbSettings::~CQuotesProviderVisitorDbSettings()
{
}

void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderBase&/* rProvider*/)
{
	m_pszDefLogFileFormat = _T("%s\\t%t\\t%r\\n");
	m_pszDefHistoryFormat = _T("%s %r");
	m_pszDefPopupFormat = _T("\\nCurrent = %r\\nPrevious = %p");
}

void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderDukasCopy&/* rProvider*/)
{
	m_pszDbRefreshRateType = DB_STR_REFRESH_RATE_TYPE;
	m_pszDbRefreshRateValue = DB_STR_REFRESH_RATE_VALUE;
	m_pszDbDisplayNameFormat = DB_STR_DC_DISPLAY_NAME_FORMAT;
	m_pszDefDisplayFormat = _T("%s %r");
	m_pszXMLIniFileName = _T("Dukascopy.xml");
	m_pszDbStatusMsgFormat = "DC_StatusMessageFormat";

	m_pszDbLogMode = "DC_LogMode";
	m_pszDbHistoryFormat = "DC_HistoryFormat";
	m_pszDbHistoryCondition = "DC_AddToHistoryOnlyIfValueIsChanged";
	m_pszDbLogFile = "DC_LogFile";
	m_pszDbLogFormat = "DC_LogFileFormat";
	m_pszDbLogCondition = "DC_AddToLogOnlyIfValueIsChanged";
	m_pszDbPopupFormat ="DC_PopupFormat";
	m_pszDbPopupCondition = "DC_ShowPopupOnlyIfValueChanged";

	m_pszDbPopupColourMode = "DC_PopupColourMode";
	m_pszDbPopupBkColour = "DC_PopupColourBk";
	m_pszDbPopupTextColour = "DC_PopupColourText";
	m_pszDbPopupDelayMode = "DC_PopupDelayMode";
	m_pszDbPopupDelayTimeout = "DC_PopupDelayTimeout";
	m_pszDbPopupHistoryFlag = "DC_PopupHistoryFlag";
	m_pszDbTendencyFormat = "DC_TendencyFormat";
}

void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderGoogle&/* rProvider*/)
{
	m_pszDbRefreshRateType = DB_STR_GOOGLE_REFRESH_RATE_TYPE;
	m_pszDbRefreshRateValue = DB_STR_GOOGLE_REFRESH_RATE_VALUE;
	m_pszDbDisplayNameFormat = DB_STR_GOOGLE_DISPLAY_NAME_FORMAT;
	m_pszDefDisplayFormat = _T("1 %f = %r %i");
	m_pszXMLIniFileName = _T("Google.xml");
	m_pszDbStatusMsgFormat = "Google_StatusMessageFormat";

	m_pszDbLogMode = "Google_LogMode";
	m_pszDbHistoryFormat = "Google_HistoryFormat";
	m_pszDbHistoryCondition = "Google_AddToHistoryOnlyIfValueIsChanged";
	m_pszDbLogFile = "Google_LogFile";
	m_pszDbLogFormat = "Google_LogFileFormat";
	m_pszDbLogCondition = "Google_AddToLogOnlyIfValueIsChanged";
	m_pszDbPopupFormat ="Google_PopupFormat";
	m_pszDbPopupCondition = "Google_ShowPopupOnlyIfValueChanged";

	m_pszDbPopupColourMode = "Google_PopupColourMode";
	m_pszDbPopupBkColour = "Google_PopupColourBk";
	m_pszDbPopupTextColour = "Google_PopupColourText";
	m_pszDbPopupDelayMode = "Google_PopupDelayMode";
	m_pszDbPopupDelayTimeout = "Google_PopupDelayTimeout";
	m_pszDbPopupHistoryFlag = "Google_PopupHistoryFlag";

	m_pszDbTendencyFormat = "Google_TendencyFormat";
}

void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderGoogleFinance&/* rProvider*/)
{
	m_pszDbRefreshRateType = "GoogleFinance_RefreshRateType";
	m_pszDbRefreshRateValue = "GoogleFinance_RefreshRateValue";
	m_pszDbDisplayNameFormat = "GoogleFinance_DspNameFrmt";
	m_pszDefDisplayFormat = _T("%s %r");
	m_pszXMLIniFileName = _T("GoogleFinance.xml");
	m_pszDbStatusMsgFormat = "GoogleFinance_StatusMessageFormat";

	m_pszDbLogMode = "GoogleFinance_LogMode";
	m_pszDbHistoryFormat = "GoogleFinance_HistoryFormat";
	m_pszDbHistoryCondition = "GoogleFinance_AddToHistoryOnlyIfValueIsChanged";
	m_pszDbLogFile = "GoogleFinance_LogFile";
	m_pszDbLogFormat = "GoogleFinance_LogFileFormat";
	m_pszDbLogCondition = "GoogleFinance_AddToLogOnlyIfValueIsChanged";
	m_pszDbPopupFormat ="GoogleFinance_PopupFormat";
	m_pszDbPopupCondition = "GoogleFinance_ShowPopupOnlyIfValueChanged";

	m_pszDbPopupColourMode = "GoogleFinance_PopupColourMode";
	m_pszDbPopupBkColour = "GoogleFinance_PopupColourBk";
	m_pszDbPopupTextColour = "GoogleFinance_PopupColourText";
	m_pszDbPopupDelayMode = "GoogleFinance_PopupDelayMode";
	m_pszDbPopupDelayTimeout = "GoogleFinance_PopupDelayTimeout";
	m_pszDbPopupHistoryFlag = "GoogleFinance_PopupHistoryFlag";

	m_pszDbTendencyFormat = "GoogleFinance_TendencyFormat";
}

void CQuotesProviderVisitorDbSettings::Visit(const CQuotesProviderYahoo& rProvider)
{
	m_pszDbRefreshRateType = "Yahoo_RefreshRateType";
	m_pszDbRefreshRateValue = "Yahoo_RefreshRateValue";
	m_pszDbDisplayNameFormat = "Yahoo_DspNameFrmt";
	m_pszDefDisplayFormat = _T("%s %r");
	m_pszXMLIniFileName = _T("Yahoo.xml");
	m_pszDbStatusMsgFormat = "Yahoo_StatusMessageFormat";

	m_pszDbLogMode = "Yahoo_LogMode";
	m_pszDbHistoryFormat = "Yahoo_HistoryFormat";
	m_pszDbHistoryCondition = "Yahoo_AddToHistoryOnlyIfValueIsChanged";
	m_pszDbLogFile = "Yahoo_LogFile";
	m_pszDbLogFormat = "Yahoo_LogFileFormat";
	m_pszDbLogCondition = "Yahoo_AddToLogOnlyIfValueIsChanged";
	m_pszDbPopupFormat ="Yahoo_PopupFormat";
	m_pszDbPopupCondition = "Yahoo_ShowPopupOnlyIfValueChanged";

	m_pszDbPopupColourMode = "Yahoo_PopupColourMode";
	m_pszDbPopupBkColour = "Yahoo_PopupColourBk";
	m_pszDbPopupTextColour = "Yahoo_PopupColourText";
	m_pszDbPopupDelayMode = "Yahoo_PopupDelayMode";
	m_pszDbPopupDelayTimeout = "Yahoo_PopupDelayTimeout";
	m_pszDbPopupHistoryFlag = "Yahoo_PopupHistoryFlag";

	m_pszDbTendencyFormat = "Yahoo_TendencyFormat";
}