Пример #1
0
 public EngineProperties()
 {
     try {
         intervalDefault = new IntervalImpl(TickZoom.Api.BarUnit.Default, 0);
     } catch {
     }
 }
Пример #2
0
 public StarterProperties(ChartProperties chartProperties, EngineProperties engineProperties)
 {
     this.chartProperties  = chartProperties;
     this.engineProperties = engineProperties;
     startTime             = TimeStamp.MinValue;
     endTime = TimeStamp.MaxValue;
     try {
         IntervalDefault = new IntervalImpl(TickZoom.Api.BarUnit.Day, 1);
     } catch {
     }
 }
    public Interval Parse(string text)
    {
        string s = ((string)text).Trim();

        try
        {
            Interval interval;
            string[] parts    = s.Split(",".ToCharArray());
            string[] strings1 = parts[0].Split(" ".ToCharArray());
            int      period   = Convert.ToInt32(strings1[0]);
            BarUnit  unit     = (BarUnit)Enum.Parse(typeof(BarUnit), strings1[1], true);
            interval = new IntervalImpl(unit, period);
            return(interval);
        }
        catch (FormatException exception)
        {
            throw new FormatException("ConvertInvalidPrimitive = Interval: " + exception);
        }
    }