Added AutoScale=2 and "k" postfix to Meter=STRING.

----
For instance:
A=2800000000, B=0

- AutoScale=0
AutoScale is disabled. Uses Scale value. (Same as before.)
A="2800000000", B="0"

- AutoScale=1
Scales value by 1024. (Same as before.)
A="2.6 G", B="0.0 "

- AutoScale=2
Scales value by 1000.
A="2.8 G", B="0.0 "

- AutoScale=1k
Scales value by 1024, and uses kilo as the lowest unit.
A="2.6 G", B="0.0 k"

- AutoScale=2k
Scales value by 1000, and uses kilo as the lowest unit.
A="2.8 G", B="0.0 k"
----
This commit is contained in:
spx
2011-01-19 15:31:45 +00:00
parent 837488871b
commit 235841e01f
24 changed files with 97 additions and 44 deletions

View File

@ -182,7 +182,7 @@ bool CMeterImage::Update()
if (m_Measure) // read from the measures
{
std::wstring val = m_Measure->GetStringValue(false, 1, 0, false);
std::wstring val = m_Measure->GetStringValue(AUTOSCALE_OFF, 1, 0, false);
if (m_ImageName.empty())
{
@ -197,7 +197,7 @@ bool CMeterImage::Update()
// Get the values for the other measures
for (size_t i = 0; i < m_Measures.size(); ++i)
{
stringValues.push_back(m_Measures[i]->GetStringValue(false, 1, 0, false));
stringValues.push_back(m_Measures[i]->GetStringValue(AUTOSCALE_OFF, 1, 0, false));
}
m_ImageNameResult = m_ImageName;