Пример #1
0
        public IStockPrice this[XAxisStyle scale, int index]
        {
            get
            {
                ArrayList src = null;
                switch (scale)
                {
                case XAxisStyle.MONTHLY:
                    src = monthly;
                    break;

                case XAxisStyle.DAILY:
                    src = dayly;
                    break;
                }
                if (src == null)
                {
                    return(null);
                }
                else
                {
                    return((StockPrice)src[index]);
                }
            }
        }
Пример #2
0
 public DataRange getDataRange(XAxisStyle scale)
 {
     if (scale == XAxisStyle.MONTHLY)
     {
         return(monthlyRange);
     }
     else
     {
         return(daylyRange);
     }
 }
Пример #3
0
        //public long this[XAxisStyle scale, int index]{ get{return 0;} }
        public IStockPrice this[XAxisStyle scale, int index]
        {
            get {
                StockPrice prev = (StockPrice)log[scale, index];
                // merge latest price today
                if (index == 0)
                {
                    prev.merge(sp_today);
                }

                return(prev);
            }
        }
Пример #4
0
 public DataRange getDataRange(XAxisStyle scale)
 {
     ((StockPrice)log[scale, 0]).merge(sp_today);
     return(log.getDataRange(scale));
 }
Пример #5
0
 public long this[XAxisStyle scale, int index] {
     get { return(array[index]); }
 }
Пример #6
0
 public DataRange getDataRange(XAxisStyle scale)
 {
     return(new DataRange(2, 79));
 }