32 lines
928 B
C#
32 lines
928 B
C#
using System.Collections.Generic;
|
|
|
|
namespace PortfolioManager.Renderers
|
|
{
|
|
public class OffsetDictionary
|
|
{
|
|
public enum OffsetType
|
|
{
|
|
VerticalOffset15PC, VerticalOffset10PC, VerticalOffset7PC, VerticalOffset6P5PC, VerticalOffset6PC, VerticalOffset5PC, VerticalOffset3PC, VerticalOffset1PC, HorizontalOffset5PC, HorizontalOffset3PC, HorizontalOffset1PC,
|
|
MinBollingerDate, MaxBollingerDate, MinBollingerValue, MaxBollingerValue
|
|
};
|
|
|
|
private Dictionary<OffsetType, double> offsetDictionary = new Dictionary<OffsetType, double>();
|
|
|
|
public void Add(OffsetType offsetType, double value)
|
|
{
|
|
if (offsetDictionary.ContainsKey(offsetType))
|
|
{
|
|
offsetDictionary[offsetType] = value;
|
|
}
|
|
else
|
|
{
|
|
offsetDictionary.Add(offsetType, value);
|
|
}
|
|
}
|
|
|
|
public double Offset(OffsetType offsetType)
|
|
{
|
|
return offsetDictionary[offsetType];
|
|
}
|
|
}
|
|
} |